MiService icon indicating copy to clipboard operation
MiService copied to clipboard

How to run script through http and https proxy?

Open hillbun opened this issue 3 years ago • 1 comments

I set export http_proxy=http://x.x.x.x:3128 export https_proxy=http://x.x.x.x:3128

in /etc/profile

But when I run micli.py, it return errors:

Exception on login xxxxxxx: Cannot connect to host account.xiaomi.com:443 ssl:default [Connect call failed ('110.43.87.14', 443)]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('110.43.87.14', 443)

how to set proxy in micli.py script?

hillbun avatar Sep 08 '21 02:09 hillbun

I am under firewall

hillbun avatar Sep 08 '21 02:09 hillbun