|
@ -86,10 +86,10 @@ class Socks5Server(SocketServer.StreamRequestHandler): |
|
|
return |
|
|
return |
|
|
port = struct.unpack('>H', self.decrypt(self.rfile.read(2))) |
|
|
port = struct.unpack('>H', self.decrypt(self.rfile.read(2))) |
|
|
try: |
|
|
try: |
|
|
|
|
|
print 'Tcp connecting to', addr, port[0] |
|
|
remote = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|
|
remote = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|
|
remote.connect((addr, port[0])) |
|
|
remote.connect((addr, port[0])) |
|
|
local = remote.getsockname() |
|
|
local = remote.getsockname() |
|
|
print 'Tcp connect to', addr, port[0] |
|
|
|
|
|
except socket.error: |
|
|
except socket.error: |
|
|
# Connection refused |
|
|
# Connection refused |
|
|
return |
|
|
return |
|
|