From c1f1281b83a2ce38b2ef3916470e8ccf90e8c8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Fri, 12 May 2017 18:52:22 +0800 Subject: [PATCH] let py2 works --- shadowsocks/udprelay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index 8271d1e..ece08a4 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -142,7 +142,7 @@ class UDPAsyncDNSHandler(object): ip = result[1] if ip: if self.call_back: - self.call_back(*self.params, self.remote_addr, None, ip, True) + self.call_back(self.remote_addr, None, ip, True, *self.params) return logging.warning("can't resolve %s" % (self.remote_addr,)) @@ -409,9 +409,9 @@ class UDPRelay(object): handler = UDPAsyncDNSHandler((data, r_addr, uid, header_length)) handler.resolve(self._dns_resolver, (server_addr, server_port), self._handle_server_dns_resolved) else: - self._handle_server_dns_resolved(data, r_addr, uid, header_length, (server_addr, server_port), None, server_addr, False) + self._handle_server_dns_resolved((server_addr, server_port), None, server_addr, False, data, r_addr, uid, header_length) - def _handle_server_dns_resolved(self, data, r_addr, uid, header_length, remote_addr, addrs, server_addr, dns_resolved): + def _handle_server_dns_resolved(self, remote_addr, addrs, server_addr, dns_resolved, data, r_addr, uid, header_length): try: server_port = remote_addr[1] if addrs is None: