add ipv6 tests

This commit is contained in:
clowwindy
2014-11-08 02:28:37 +08:00
parent e476a54658
commit fa31a233b6
5 changed files with 24 additions and 3 deletions

View File

@ -241,7 +241,7 @@ class TCPRelayHandler(object):
header = b'\x05\x00\x00\x04'
else:
header = b'\x05\x00\x00\x01'
addr, port = self._local_sock.getsockname()
addr, port = self._local_sock.getsockname()[:2]
addr_to_send = socket.inet_pton(self._local_sock.family,
addr)
port_to_send = struct.pack('>H', port)