why always use default port
leadscloud opened this issue · 0 comments
leadscloud commented
import socks
import socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 1083, rdns=False)
socket.socket = socks.socksocket
r = requests.get("http://www.bing.com", timeout=15)
print(r.status_code)
but response is
2019-05-24 11:19:19,892 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 127.0.0.1:1080
can not set port