diff --git a/README.md b/README.md index 282c259..5d0babb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ shadowsocks =========== [![Build Status](https://travis-ci.org/clowwindy/shadowsocks.png)](https://travis-ci.org/clowwindy/shadowsocks) -Current version: 1.2.2 +Current version: 1.2.3 shadowsocks is a lightweight tunnel proxy which can help you get through firewalls @@ -55,8 +55,8 @@ Command line args You can use args to override settings from `config.json`. - python local.py -s server_name -p server_port -l local_port -k password -m bf-cfb - python server.py -p server_port -k password -m bf-cfb + python local.py -s server_name -p server_port -l local_port -k password -m bf-cfb -b bind_address -6 + python server.py -p server_port -k password -m bf-cfb -6 Performance ------------ diff --git a/local.py b/local.py index 79d1d74..bd40e62 100755 --- a/local.py +++ b/local.py @@ -151,7 +151,7 @@ if __name__ == '__main__': ("windows_exe", "console_exe"): p = os.path.dirname(os.path.abspath(sys.executable)) os.chdir(p) - print 'shadowsocks v1.2.2' + print 'shadowsocks v1.2.3' with open('config.json', 'rb') as f: config = json.load(f) @@ -160,9 +160,10 @@ if __name__ == '__main__': PORT = config['local_port'] KEY = config['password'] METHOD = config.get('method', None) + LOCAL = config.get('local', '') IPv6 = False - optlist, args = getopt.getopt(sys.argv[1:], 's:p:k:l:m:6') + optlist, args = getopt.getopt(sys.argv[1:], 's:b:p:k:l:m:6') for key, value in optlist: if key == '-p': REMOTE_PORT = int(value) @@ -174,6 +175,8 @@ if __name__ == '__main__': SERVER = value elif key == '-m': METHOD = value + elif key == '-b': + LOCAL = value elif key == '-6': IPv6 = True @@ -186,8 +189,8 @@ if __name__ == '__main__': try: if IPv6: ThreadingTCPServer.address_family = socket.AF_INET6 - server = ThreadingTCPServer(('', PORT), Socks5Server) - logging.info("starting server at port %d ..." % PORT) + server = ThreadingTCPServer((LOCAL, PORT), Socks5Server) + logging.info("starting server at %s:%d" % tuple(server.server_address[:2])) server.serve_forever() except socket.error, e: logging.error(e) diff --git a/packaging/py2exe/setup.py b/packaging/py2exe/setup.py index 94ffcb8..30340aa 100644 --- a/packaging/py2exe/setup.py +++ b/packaging/py2exe/setup.py @@ -9,7 +9,7 @@ except ImportError: pass setup(name='shadowsocks', - version='1.2.2', + version='1.2.3', description='a lightweight tunnel proxy which can help you get through firewalls', author='clowwindy', author_email='clowwindy42@gmail.com', diff --git a/server.py b/server.py index 8c1c564..d656733 100755 --- a/server.py +++ b/server.py @@ -126,7 +126,7 @@ class Socks5Server(SocketServer.StreamRequestHandler): if __name__ == '__main__': os.chdir(os.path.dirname(__file__) or '.') - print 'shadowsocks v1.2.2' + print 'shadowsocks v1.2.3' with open('config.json', 'rb') as f: config = json.load(f) diff --git a/test.py b/test.py index 1a5ca3b..ab3bbda 100755 --- a/test.py +++ b/test.py @@ -101,7 +101,7 @@ try: for fd in r: line = fd.readline() sys.stdout.write(line) - if line.find('starting server at port') >= 0: + if line.find('starting server') >= 0: ready_count += 1 if ready_count == 2 and p3 is None: