| @@ -75,6 +75,9 @@ class Socks4Protocol(SocksProtocol): | |||||
| super().__init__(proxy, proxy_auth, dst, remote_resolve, loop) | super().__init__(proxy, proxy_auth, dst, remote_resolve, loop) | ||||
| if proxy_auth is None: | |||||
| self._auth = Socks4Auth('') | |||||
| async def socks_request(self, cmd): | async def socks_request(self, cmd): | ||||
| # prepare destination addr/port | # prepare destination addr/port | ||||
| host, port = self._dst_host, self._dst_port | host, port = self._dst_host, self._dst_port | ||||
| @@ -119,6 +122,9 @@ class Socks5Protocol(SocksProtocol): | |||||
| super().__init__(proxy, proxy_auth, dst, remote_resolve, loop) | super().__init__(proxy, proxy_auth, dst, remote_resolve, loop) | ||||
| if proxy_auth is None: | |||||
| self._auth = Socks5Auth('', '') | |||||
| async def socks_request(self, cmd): | async def socks_request(self, cmd): | ||||
| # send available auth methods | # send available auth methods | ||||
| if self._auth.login and self._auth.password: | if self._auth.login and self._auth.password: | ||||