You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-10Lines changed: 23 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,21 +26,16 @@ go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-local
26
26
27
27
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.
28
28
29
-
The configuration syntax is the same with [shadowsocks-nodejs](https://github.com/clowwindy/shadowsocks-nodejs/). You can download the sample [`config.json`](https://github.com/shadowsocks/shadowsocks-go/blob/master/config.json), change the following values:
29
+
Configuration file is in json format and has the same syntax with [shadowsocks-nodejs](https://github.com/clowwindy/shadowsocks-nodejs/). You can download the sample [`config.json`](https://github.com/shadowsocks/shadowsocks-go/blob/master/config.json), change the following values:
30
30
31
31
```
32
32
server your server ip or hostname
33
33
server_port server port
34
34
local_port local socks5 proxy port
35
35
password a password used to encrypt transfer
36
-
37
36
timeout server option, in seconds
38
-
port_password server option, specify multiple ports and passwords to support multiple users
39
-
cache_enctable server option, store computed encryption table on disk to speedup server startup
40
37
```
41
38
42
-
Given `port_password` option, server program will ignore `server_port` and `password` options.
43
-
44
39
Run `shadowsocks-server` on your server. To run it in the background, run `shadowsocks-server > log &`.
45
40
46
41
On client, run `shadowsocks-local`. Change proxy settings of your browser to
If the server has many different passwords, startup would be slow because it takes much time to calculate encryption tables. It's recommended to enable the `cache_enctable` option if you have more than 20 different passwords. This will save the computed encryption table in the file `table.cache`.
59
+
## Use multiple servers on client
60
+
61
+
```
62
+
server_password specify multiple server and password, server should be in the form of host:port
63
+
```
64
+
65
+
Here's a sample configuration [`client-multi-server.json`](https://github.com/shadowsocks/shadowsocks-go/blob/master/sample-config/client-multi-server.json). Given `server_password`, client program will ignore `server_port`, `server` and `password` options.
66
+
67
+
Servers are chosen in round robin fasion. If a server can't be connected, the client will try the next one. The client does not try to detect connection problems caused by incorrect password, this is intended for the user to notice the error.
68
+
69
+
## Multiple users with different passwords on server
70
+
71
+
The server can support users with different passwords. Each user will be served by a unique port. Use the following options on the server for such setup:
72
+
73
+
```
74
+
port_password specify multiple ports and passwords to support multiple users
75
+
cache_enctable store computed encryption table on disk to speedup server startup
76
+
```
77
+
78
+
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.
66
79
67
-
Note: unused password will not be deleted, so you may need to delete the table cache file if it grows too big.
80
+
Enabling `cache_enctable` is recommended if you have more than 20 different passwords. Unused password will not be deleted, so you may need to delete the file `table.cache` if it grows too big.
68
81
69
-
##Updating port password for a running server ##
82
+
### Update port password for a running server###
70
83
71
84
Edit the config file used to start the server, then send `SIGHUP` to the server process.
0 commit comments