qwj / python-proxy

HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
MIT License
1.93k stars 323 forks source link

socket getaddrinfo failed #150

Open HadiH2o opened 2 years ago

HadiH2o commented 2 years ago

hi im trying to shadowsocks but every time i try that i get this error:

socket.gaierror: [Errno 11001] getaddrinfo failed

Traceback (most recent call last):
  File "F:\0_Projects\python\Test\main.py", line 25, in <module>
    asyncio.run(test_tcp('ss://YWVzLTI1Ni1nY206NDA2M0BubnMuY2hpdGFjZG4ueHl6OjI4NjYw#chitavpn_netherlands'))
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
    return future.result()
  File "F:\0_Projects\python\Test\main.py", line 19, in test_tcp
    reader, writer = await conn.tcp_connect('google.com', 80)
  File "F:\0_Projects\python\Test\venv\lib\site-packages\pproxy\server.py", line 230, in tcp_connect
    reader, writer = await self.open_connection(host, port, local_addr, lbind)
  File "F:\0_Projects\python\Test\venv\lib\site-packages\pproxy\server.py", line 223, in open_connection
    reader, writer = await asyncio.wait_for(wait, timeout=timeout)
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 447, in wait_for
    return fut.result()
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\streams.py", line 47, in open_connection
    transport, _ = await loop.create_connection(
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1016, in create_connection
    infos = await self._ensure_resolved(
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1395, in _ensure_resolved
    return await loop.getaddrinfo(host, port, family=family, type=type,
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 855, in getaddrinfo
    return await self.run_in_executor(
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\HadiH2o\AppData\Local\Programs\Python\Python310\lib\socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed