From 07dc98f60d7d09f3cfff7a21a67b268f96ce49ad Mon Sep 17 00:00:00 2001 From: breakwa11 Date: Tue, 16 Jun 2015 13:00:30 +0800 Subject: [PATCH] udp fix sendto argv --- shadowsocks/tcprelay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index 18aa1f5..070e234 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -209,7 +209,7 @@ class TCPRelayHandler(object): if addrs: af, socktype, proto, canonname, server_addr = addrs[0] data = data[header_length:] - sock.sendto(data, server_addr) + sock.sendto(data, (server_addr[0], dest_port)) except Exception as e: trace = traceback.format_exc()