return
elif Socks5Auth.AUTH_USER_PASS in methods:
- self.connection.sendall(struct.pack("!BB", SOCKS5_VERSION, Socks5Auth.AUTH_USER_PASS))
+ self.connection.sendall(struct.pack('!BB', SOCKS5_VERSION, Socks5Auth.AUTH_USER_PASS))
_, user_len = struct.unpack('!BB', self.connection.recv(2))
username = self.connection.recv(user_len).decode()
if 0x0 < dest_ip <= 0xFF:
use_remote_dns = True
else:
- socks_info['ipv4_address'] = socket.inet_ntoa(struct.pack("!I", dest_ip))
+ socks_info['ipv4_address'] = socket.inet_ntoa(struct.pack('!I', dest_ip))
user_id = self._read_until_null().decode()
if user_id != (self.socks_kwargs.get('user_id') or ''):
('Urllib', 'http'),
('Requests', 'http'),
('Websockets', 'ws'),
- ('CurlCFFI', 'http')
+ ('CurlCFFI', 'http'),
], indirect=True)
class TestSocks4Proxy:
def test_socks4_no_auth(self, handler, ctx):
('Urllib', 'http'),
('Requests', 'http'),
('Websockets', 'ws'),
- ('CurlCFFI', 'http')
+ ('CurlCFFI', 'http'),
], indirect=True)
class TestSocks5Proxy: