From 4028332ec403ce9eaa501a6137a1692bd8872ea4 Mon Sep 17 00:00:00 2001 From: Chen Yufei Date: Wed, 23 Jan 2013 16:34:00 +0800 Subject: [PATCH 1/2] Bump version to 0.6 --- shadowsocks/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks/util.go b/shadowsocks/util.go index c390c7e..04c7f82 100644 --- a/shadowsocks/util.go +++ b/shadowsocks/util.go @@ -7,7 +7,7 @@ import ( ) func PrintVersion() { - const version = "0.5" + const version = "0.6" fmt.Println("shadowsocks-go version", version) } From 9ebf730c04586f84c976c14001c7324b021428b3 Mon Sep 17 00:00:00 2001 From: Chen Yufei Date: Wed, 23 Jan 2013 16:34:27 +0800 Subject: [PATCH 2/2] Update README and CHANGELOG. --- CHANGELOG | 6 +++--- README.md | 38 ++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a703b36..1084747 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -0.6 (not released) +0.6 (2013-01-23) - * Generate ciphers on demand. (Encryption table cache is removed.) - * Support RC4 encryption. + * Generate ciphers on demand (encryption table cache is removed) + * Support RC4 encryption diff --git a/README.md b/README.md index a866818..94d87bb 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,27 @@ -# shadowsocks-go # +# shadowsocks-go + +Current version: 0.6 shadowsocks-go is a lightweight tunnel proxy which can help you get through firewalls. It is a port of [shadowsocks](https://github.com/clowwindy/shadowsocks). The protocol is compatible with the origin shadowsocks (if both have been upgraded to the latest version). -# Install # +# Install -Compiled client binaries are provided on [google code](http://code.google.com/p/shadowsocks-go/downloads/list). +Compiled client binaries are provided on [google code](http://code.google.com/p/shadowsocks-go/downloads/list). (Compiled with cgo disabled.) You can also install from source (assume you have go installed): -On server, run - ``` +# on server go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server -``` - -On client, run - -``` +# on client go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-local ``` -# Usage # +It's recommend to disable cgo when compiling shadowsocks-go. This will prevent the go runtime from creating too many threads for dns lookup. + +# Usage Both the server and client program will look for `config.json` in the current directory. You can use `-c` option to specify another configuration file. @@ -32,6 +31,7 @@ Configuration file is in json format and has the same syntax with [shadowsocks-n server your server ip or hostname server_port server port local_port local socks5 proxy port +method encryption method, null by default, or use "rc4" password a password used to encrypt transfer timeout server option, in seconds ``` @@ -44,13 +44,13 @@ On client, run `shadowsocks-local`. Change proxy settings of your browser to SOCKS5 127.0.0.1:local_port ``` -## Command line options ## +## Command line options -Command line options can override settings from configuration files. +Command line options can override settings from configuration files. Use `-h` option to see all available options. ``` -shadowsocks-local -s server_name -p server_port -l local_port -k password -c config.json -shadowsocks-server -p server_port -k password -t timeout -c config.json +shadowsocks-local -s server_name -p server_port -l local_port -k password -m rc4 -c config.json +shadowsocks-server -p server_port -k password -t timeout -m rc4 -c config.json ``` Use `-d` option to enable debug message. @@ -76,6 +76,12 @@ port_password specify multiple ports and passwords to support multiple users Here's a sample configuration [`server-multi-port.json`](https://github.com/shadowsocks/shadowsocks-go/blob/master/sample-config/server-multi-port.json). Given `port_password`, server program will ignore `server_port` and `password` options. -### Update port password for a running server ### +### Update port password for a running server Edit the config file used to start the server, then send `SIGHUP` to the server process. + +# Note to OpenVZ users + +**Use OpenVZ VM that supports vswap**. Otherwise, the OS will incorrectly account much more memory than actually used. shadowsocks-go on OpenVZ VM with vswap takes about 3MB memory after startup. (Refer to [this issue](https://github.com/shadowsocks/shadowsocks-go/issues/3) for more details.) + +If vswap is not an option and memory usage is a problem for you, try [shadowsocks-libuv](https://github.com/dndx/shadowsocks-libuv).