From 5d34ac2fa880f8f824808551d28130b30fc1bab5 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Fri, 11 May 2012 11:01:09 +0800 Subject: [PATCH] documentation improvements --- README.md | 2 ++ local.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ca6d46a..4f489dd 100755 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ Put `server.py` on your server. Edit `server.py`, change the following values: Run `python server.py` on your server. To run it in the background, run `setsid python server.py`. +If you want to listen to IPv6 port, run `python server.py -6`. + Put `local.py` on your client machine. Edit `local.py`, change these values: SERVER your server ip or hostname diff --git a/local.py b/local.py index 2df9878..00095d1 100755 --- a/local.py +++ b/local.py @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -SERVER = '::1' +SERVER = 'my_server_ip_or_host' REMOTE_PORT = 8499 PORT = 1080 KEY = "foobar!" @@ -123,8 +123,8 @@ class Socks5Server(SocketServer.StreamRequestHandler): sock = self.connection remote = socket_create_connection((SERVER, REMOTE_PORT)) self.handle_tcp(sock, remote) - except socket.error: - lock_print('socket error') + except socket.error as e: + lock_print('socket error: %s' % str(e)) def main():