Browse Source

add checkout for header

1.4
clowwindy 11 years ago
parent
commit
10358ffebd
  1. 5
      shadowsocks/udprelay.py

5
shadowsocks/udprelay.py

@ -199,7 +199,10 @@ class UDPRelay(object):
data) data)
if not data: if not data:
return return
# addrtype, dest_addr, dest_port, header_length = parse_header(data) header_result = parse_header(data)
if header_result is None:
return
# addrtype, dest_addr, dest_port, header_length = header_result
response = '\x00\x00\0x00' + data response = '\x00\x00\0x00' + data
client_addr = self._client_fd_to_server_addr.get(sock.fileno(), None) client_addr = self._client_fd_to_server_addr.get(sock.fileno(), None)
if client_addr: if client_addr:

Loading…
Cancel
Save