Browse Source

better error message with wrong password

1.4
clowwindy 11 years ago
parent
commit
9b3f608a62
  1. 4
      shadowsocks/local.py
  2. 4
      shadowsocks/server.py

4
shadowsocks/local.py

@ -141,8 +141,8 @@ class Socks5Server(SocketServer.StreamRequestHandler):
addr = socket.inet_ntop(socket.AF_INET6, addr_ip) addr = socket.inet_ntop(socket.AF_INET6, addr_ip)
addr_to_send += addr_ip addr_to_send += addr_ip
else: else:
logging.warn('addr_type not support') logging.warn('addr_type not supported')
# not support # not supported
return return
addr_port = self.rfile.read(2) addr_port = self.rfile.read(2)
addr_to_send += addr_port addr_to_send += addr_port

4
shadowsocks/server.py

@ -110,8 +110,8 @@ class Socks5Server(SocketServer.StreamRequestHandler):
addr = socket.inet_ntop(socket.AF_INET6, addr = socket.inet_ntop(socket.AF_INET6,
self.decrypt(self.rfile.read(16))) self.decrypt(self.rfile.read(16)))
else: else:
# not support # not supported
logging.warn('addr_type not support') logging.warn('addr_type not supported, maybe wrong password')
return return
port = struct.unpack('>H', self.decrypt(self.rfile.read(2))) port = struct.unpack('>H', self.decrypt(self.rfile.read(2)))
try: try:

Loading…
Cancel
Save