Skip to content

Commit 1ee4520

Browse files
author
clowwindy
committed
update rst
1 parent c055fee commit 1ee4520

File tree

1 file changed

+100
-50
lines changed

1 file changed

+100
-50
lines changed

README.rst

Lines changed: 100 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
shadowsocks
22
===========
33

4-
|Build Status|
4+
Current version: 1.4.4 |Build Status|
55

66
shadowsocks is a lightweight tunnel proxy which can help you get through
7-
firewalls
7+
firewalls.
88

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.
1110

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+
-------
1415

1516
First, make sure you have Python 2.6 or 2.7.
1617

@@ -19,40 +20,90 @@ First, make sure you have Python 2.6 or 2.7.
1920
$ python --version
2021
Python 2.6.8
2122

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+
^^^^^^^
2335

2436
::
2537

38+
yum install m2crypto python-setuptools
39+
easy_install pip
2640
pip install shadowsocks
2741

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:
2963

3064
::
3165

3266
{
3367
"server":"my_server_ip",
3468
"server_port":8388,
69+
"local_address": "127.0.0.1",
3570
"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
3976
}
4077

4178
Explanation of the fields:
4279

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``.
56107

57108
Change the proxy settings in your browser to
58109

@@ -62,6 +113,12 @@ Change the proxy settings in your browser to
62113
hostname: 127.0.0.1
63114
port: your local_port
64115

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+
65122
Command line args
66123
-----------------
67124

@@ -70,42 +127,30 @@ You can use args to override settings from ``config.json``.
70127
::
71128

72129
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
74131
ssserver -c /etc/shadowsocks/config.json
75132

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+
-------
89135

90-
::
136+
Salsa20 is a fast stream cipher.
91137

92-
pip install M2Crypto
138+
Use "salsa20-ctr" in shadowsocks.json.
93139

94-
Performance
95-
-----------
140+
And install these packages:
96141

97-
You may want to install gevent for better performance.
142+
Debian / Ubuntu:
143+
^^^^^^^^^^^^^^^^
98144

99145
::
100146

101-
$ sudo apt-get install python-gevent
147+
apt-get install python-numpy
148+
pip install salsa20
102149

103-
Or:
150+
Wiki
151+
----
104152

105-
::
106-
107-
$ sudo apt-get install libevent-dev python-pip
108-
$ sudo pip install gevent
153+
https://github.com/clowwindy/shadowsocks/wiki
109154

110155
License
111156
-------
@@ -118,5 +163,10 @@ Bugs and Issues
118163
Please visit `issue
119164
tracker <https://github.com/clowwindy/shadowsocks/issues?state=open>`__
120165

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
122172
:target: https://travis-ci.org/clowwindy/shadowsocks

0 commit comments

Comments
 (0)