ProxyPoolxSocks
ProxyPoolxSocks copied to clipboard
试了好几个py版本,还是报错,不知道啥原因
[16:01:55][Node] [] 获取节点中...... [16:01:55][Node] [+] 节点读取成功! [16:01:55][Node] [] 已开始测试可用节点 -> 当前测试节点共有: 18个
/ProxyPoolxSocks/Client-check# python3 client.py Client 客户端测试代理连接脚本 Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/socks.py", line 787, in connect super(socksocket, self).connect(proxy_addr) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) File "/usr/local/lib/python3.8/dist-packages/socks.py", line 47, in wrapper return function(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/socks.py", line 800, in connect raise ProxyConnectionError(msg, error) socks.ProxyConnectionError: Error connecting to SOCKS5 proxy 0.0.0.0:12000: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f9634672670>: Failed to establish a new connection: Error connecting to SOCKS5 proxy 0.0.0.0:12000: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f9634672670>: Failed to establish a new connection: Error connecting to SOCKS5 proxy 0.0.0.0:12000: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Client-check/client.py", line 21, in
看报错大概是服务端的节点没搭起来,所以运行client.py时客户端连接失败。可以提供下服务端运行时终端的截图。
谢谢解答
谢谢解答
可能是你在一台系统上同时搭了客户端和服务端,看你提供的图片。你需要保持服务端运行脚本不要断开,至于client的部分建议你使用另一台系统连接服务端的ip和端口再看看是否报错,详细再仔细查看使用说明吧
好的,谢谢解答
师傅,仔细拜读后我又来了。
1 我用Oenwrt把其他协议节点转成socks后加入程序里,可以正常执行,可是无法有效切换ip
2 运行中还是偶尔有报错
Client 客户端测试代理连接脚本
测试成功 当前代理: 168.xxx.xxx.246
测试成功 当前代理: 168.xxx.xxx.246
测试成功 当前代理: 168.xxx.xxx.246
测试成功 当前代理: 152.xxx.xxx.196
测试成功 当前代理: 152.xxx.xxx.196
测试成功 当前代理: 152xxx.xxx.196
测试成功 当前代理: 158.xxx.xxx.189
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/socks.py", line 809, in connect
negotiate(self, dest_addr, dest_port)
File "/usr/local/lib/python3.10/dist-packages/socks.py", line 443, in _negotiate_SOCKS5
self.proxy_peername, self.proxy_sockname = self._SOCKS5_request(
File "/usr/local/lib/python3.10/dist-packages/socks.py", line 524, in _SOCKS5_request
resp = self._readall(reader, 3)
File "/usr/local/lib/python3.10/dist-packages/socks.py", line 276, in _readall
d = file.read(count - len(data))
File "/usr/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn conn = connection.create_connection( File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 96, in create_connection raise err File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 86, in create_connection sock.connect(sa) File "/usr/local/lib/python3.10/dist-packages/socks.py", line 47, in wrapper return function(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/socks.py", line 814, in connect raise GeneralProxyError("Socket error", error) socks.GeneralProxyError: Socket error: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect conn = self._new_conn() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f996adda8c0>: Failed to establish a new connection: Socket error: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f996adda8c0>: Failed to establish a new connection: Socket error: timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/桌面/ProxyPoolxSocks/Client-check/client.py", line 21, in
大概率是某些节点不稳定的问题,检查下客户端节点