aiosocks
aiosocks copied to clipboard
host/port and sock can not be specified at the same time
create_connection
with sock only raises error create_connection() missing 1 required positional argument: 'proxy'
.
With proxy as None: proxy must be Socks4Addr() or Socks5Addr() tuple
With both sock and proxy: host/port and sock can not be specified at the same time
None is not allowed as host value
using aiosocks.Socks5Addr(None, None)
I am trying to do this because I need raw socket, connected to a proxy server to use in the aiosmtplib
(EDIT: can be solved using transport.get_extra_info('socket')
, but problem with custom sock still exists)
Try python-socks, it should help