1
1
shadowsocks
2
2
===========
3
3
4
- |Build Status |
4
+ Current version: 1.4.4 |Build Status |
5
5
6
6
shadowsocks is a lightweight tunnel proxy which can help you get through
7
- firewalls
7
+ firewalls.
8
8
9
- Other ports and clients can be found
10
- `here <https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients >`__.
9
+ Both TCP CONNECT and UDP ASSOCIATE are implemented.
11
10
12
- Usage
13
- -----
11
+ `中文说明 <https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E >`__
12
+
13
+ Install
14
+ -------
14
15
15
16
First, make sure you have Python 2.6 or 2.7.
16
17
@@ -19,40 +20,90 @@ First, make sure you have Python 2.6 or 2.7.
19
20
$ python --version
20
21
Python 2.6.8
21
22
22
- Install shadowsocks.
23
+ Install Shadowsocks.
24
+
25
+ Debian / Ubuntu:
26
+ ^^^^^^^^^^^^^^^^
27
+
28
+ ::
29
+
30
+ apt-get install python-pip python-gevent python-m2crypto
31
+ pip install shadowsocks
32
+
33
+ CentOS:
34
+ ^^^^^^^
23
35
24
36
::
25
37
38
+ yum install m2crypto python-setuptools
39
+ easy_install pip
26
40
pip install shadowsocks
27
41
28
- Create a file named ``config.json ``, with the following content.
42
+ OS X:
43
+ ^^^^^
44
+
45
+ ::
46
+
47
+ git clone https://github.com/clowwindy/M2Crypto.git
48
+ cd M2Crypto
49
+ pip install .
50
+ pip install shadowsocks
51
+
52
+ Windows:
53
+ ^^^^^^^^
54
+
55
+ Choose a `GUI
56
+ client <https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients> `__
57
+
58
+ Usage
59
+ -----
60
+
61
+ Create a config file ``/etc/shadowsocks.json `` (or put it in other
62
+ path). Example:
29
63
30
64
::
31
65
32
66
{
33
67
"server":"my_server_ip",
34
68
"server_port":8388,
69
+ "local_address": "127.0.0.1",
35
70
"local_port":1080,
36
- "password":"barfoo!",
37
- "timeout":600,
38
- "method":null
71
+ "password":"mypassword",
72
+ "timeout":300,
73
+ "method":"aes-256-cfb",
74
+ "fast_open": false,
75
+ "workers": 1
39
76
}
40
77
41
78
Explanation of the fields:
42
79
43
- ::
44
-
45
- server your server IP (IPv4/IPv6), notice that your server will listen to this IP
46
- server_port server port
47
- local_port local port
48
- password a password used to encrypt transfer
49
- timeout in seconds
50
- method encryption method, "bf-cfb", "aes-256-cfb", "des-cfb", "rc4", etc. Default is table
51
-
52
- ``cd `` into the directory of ``config.json ``. Run ``ssserver `` on your
53
- server. To run it in the background, run ``nohup ssserver > log & ``.
54
-
55
- On your client machine, run ``sslocal ``.
80
+ +------------------+-----------------------------------------------------------------------------------------------------+
81
+ | Name | Explanation |
82
+ +==================+=====================================================================================================+
83
+ | server | the address your server listens |
84
+ +------------------+-----------------------------------------------------------------------------------------------------+
85
+ | server\_ port | server port |
86
+ +------------------+-----------------------------------------------------------------------------------------------------+
87
+ | local\_ address | the address your local listens |
88
+ +------------------+-----------------------------------------------------------------------------------------------------+
89
+ | local\_ port | local port |
90
+ +------------------+-----------------------------------------------------------------------------------------------------+
91
+ | password | password used for encryption |
92
+ +------------------+-----------------------------------------------------------------------------------------------------+
93
+ | timeout | in seconds |
94
+ +------------------+-----------------------------------------------------------------------------------------------------+
95
+ | method | encryption method, "aes-256-cfb" is recommended |
96
+ +------------------+-----------------------------------------------------------------------------------------------------+
97
+ | fast\_ open | use `TCP\_ FASTOPEN <https://github.com/clowwindy/shadowsocks/wiki/TCP-Fast-Open >`__, true / false |
98
+ +------------------+-----------------------------------------------------------------------------------------------------+
99
+ | workers | number of workers, available on Unix/Linux |
100
+ +------------------+-----------------------------------------------------------------------------------------------------+
101
+
102
+ Run ``ssserver -c /etc/shadowsocks.json `` on your server. To run it in
103
+ the background, `use
104
+ supervisor <https://github.com/clowwindy/shadowsocks/wiki/Configure-Shadowsocks-with-Supervisor> `__.
105
+
106
+ On your client machine, run ``sslocal -c /etc/shadowsocks.json ``.
56
107
57
108
Change the proxy settings in your browser to
58
109
@@ -62,6 +113,12 @@ Change the proxy settings in your browser to
62
113
hostname: 127.0.0.1
63
114
port: your local_port
64
115
116
+ **Notice: If you want to use encryption methods other than "table",
117
+ please install M2Crypto (See Encryption Section). **
118
+
119
+ It's recommended to use shadowsocks with AutoProxy or Proxy
120
+ SwitchySharp.
121
+
65
122
Command line args
66
123
-----------------
67
124
@@ -70,42 +127,30 @@ You can use args to override settings from ``config.json``.
70
127
::
71
128
72
129
sslocal -s server_name -p server_port -l local_port -k password -m bf-cfb
73
- ssserver -p server_port -k password -m bf-cfb
130
+ ssserver -p server_port -k password -m bf-cfb --workers 2
74
131
ssserver -c /etc/shadowsocks/config.json
75
132
76
- Encryption
77
- ----------
78
-
79
- If you want to use non-default encryption methods like "bf-cfb", please
80
- install `M2Crypto <http://chandlerproject.org/Projects/MeTooCrypto >`__.
81
-
82
- Ubuntu:
83
-
84
- ::
85
-
86
- sudo apt-get install python-m2crypto
87
-
88
- Others:
133
+ Salsa20
134
+ -------
89
135
90
- ::
136
+ Salsa20 is a fast stream cipher.
91
137
92
- pip install M2Crypto
138
+ Use "salsa20-ctr" in shadowsocks.json.
93
139
94
- Performance
95
- -----------
140
+ And install these packages:
96
141
97
- You may want to install gevent for better performance.
142
+ Debian / Ubuntu:
143
+ ^^^^^^^^^^^^^^^^
98
144
99
145
::
100
146
101
- $ sudo apt-get install python-gevent
147
+ apt-get install python-numpy
148
+ pip install salsa20
102
149
103
- Or:
150
+ Wiki
151
+ ----
104
152
105
- ::
106
-
107
- $ sudo apt-get install libevent-dev python-pip
108
- $ sudo pip install gevent
153
+ https://github.com/clowwindy/shadowsocks/wiki
109
154
110
155
License
111
156
-------
@@ -118,5 +163,10 @@ Bugs and Issues
118
163
Please visit `issue
119
164
tracker <https://github.com/clowwindy/shadowsocks/issues?state=open> `__
120
165
121
- .. |Build Status | image :: https://travis-ci.org/clowwindy/shadowsocks.png
166
+ Mailing list: http://groups.google.com/group/shadowsocks
167
+
168
+ Also see
169
+ `troubleshooting <https://github.com/clowwindy/shadowsocks/wiki/Troubleshooting >`__
170
+
171
+ .. |Build Status | image :: https://travis-ci.org/clowwindy/shadowsocks.png?branch=master
122
172
:target: https://travis-ci.org/clowwindy/shadowsocks
0 commit comments