Socks5 proxy for udp not comply with rfc1928?
Humburto opened this issue · 1 comments
Humburto commented
This is my simple script with PySocks:
import socks
import socket
s = socks.socksocket(socket.AF_INET, socket.SOCK_DGRAM)
s.set_proxy(socks.SOCKS5, "127.0.0.1", 9922)
s.connect(("10.0.21.2", 20000))
s.sendall("HELLO".encode('utf-8'))
print(s.recv(4096))
As rfc1928 says, each UDP datagram must carries a UDP request header with it (on page 7). However, my socks5 server only received "HELLO" without any header. Is this some kind of bug of PySocks ? Or is there something wrong with my code?
lilanleo commented
try s.set_proxy(socket.SOCK_DGRAM, address, port)
instead