aiosocks icon indicating copy to clipboard operation
aiosocks copied to clipboard

host/port and sock can not be specified at the same time

Open starfear opened this issue 4 years ago • 2 comments

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

starfear avatar Sep 18 '20 01:09 starfear

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)

starfear avatar Sep 18 '20 01:09 starfear

Try python-socks, it should help

rigens avatar Dec 27 '20 15:12 rigens