shadowsocks/README.rst

156 lines
6 KiB
ReStructuredText
Raw Normal View History

shadowsocks
===========
2014-12-27 15:36:09 +00:00
|PyPI version| |Build Status| |Coverage Status|
2014-06-01 03:22:57 +00:00
2014-11-06 06:52:15 +00:00
A fast tunnel proxy that helps you bypass firewalls.
2014-05-17 07:43:19 +00:00
Install
-------
2014-11-06 06:52:15 +00:00
You'll have a client on your local side, and setup a server on a remote
server.
2014-06-20 15:23:14 +00:00
Client
~~~~~~
2014-12-27 15:36:09 +00:00
- `Windows <https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#windows>`__
2014-06-20 15:23:14 +00:00
/ `OS
2014-11-06 06:52:15 +00:00
X <https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-Help>`__
2014-12-27 15:36:09 +00:00
- `Android <https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#android>`__
2014-11-06 06:52:15 +00:00
/ `iOS <https://github.com/shadowsocks/shadowsocks-iOS/wiki/Help>`__
2014-12-27 15:36:09 +00:00
- `OpenWRT <https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#openwrt>`__
2014-06-20 15:23:14 +00:00
Server
~~~~~~
2014-05-17 07:43:19 +00:00
Debian / Ubuntu:
^^^^^^^^^^^^^^^^
::
2014-11-06 06:52:15 +00:00
apt-get install python-pip
2014-05-17 07:43:19 +00:00
pip install shadowsocks
2014-11-06 06:52:15 +00:00
Or simply ``apt-get install shadowsocks`` if you have `Debian
sid <https://packages.debian.org/unstable/python/shadowsocks>`__ in your
source list.
2014-05-17 07:43:19 +00:00
CentOS:
^^^^^^^
::
2014-11-06 06:52:15 +00:00
yum install python-setuptools
2014-05-17 07:43:19 +00:00
easy_install pip
pip install shadowsocks
2014-11-06 06:52:15 +00:00
Windows:
^^^^^^^^
2014-12-21 06:06:28 +00:00
Download `OpenSSL for
Windows <http://slproweb.com/products/Win32OpenSSL.html>`__ and install.
Then install shadowsocks via easy\_install and pip as Linux. If you
don't know how to use them, you can directly download `the
2014-11-06 06:52:15 +00:00
package <https://pypi.python.org/pypi/shadowsocks>`__, and use
``python shadowsocks/server.py`` instead of ``ssserver`` command below.
2014-06-20 15:23:14 +00:00
Configuration
-------------
2014-05-17 07:43:19 +00:00
2014-06-20 15:23:14 +00:00
On your server create a config file ``/etc/shadowsocks.json``. Example:
::
{
"server":"my_server_ip",
"server_port":8388,
2014-05-17 07:43:19 +00:00
"local_address": "127.0.0.1",
"local_port":1080,
2014-05-17 07:43:19 +00:00
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
2014-12-21 06:06:28 +00:00
"fast_open": false
}
2013-09-16 05:20:30 +00:00
Explanation of the fields:
2014-12-27 15:36:09 +00:00
+------------------+-----------------------------------------------------------------------------------------------------------+
| Name | Explanation |
+==================+===========================================================================================================+
| server | the address your server listens |
+------------------+-----------------------------------------------------------------------------------------------------------+
| server\_port | server port |
+------------------+-----------------------------------------------------------------------------------------------------------+
| local\_address | the address your local listens |
+------------------+-----------------------------------------------------------------------------------------------------------+
| local\_port | local port |
+------------------+-----------------------------------------------------------------------------------------------------------+
| password | password used for encryption |
+------------------+-----------------------------------------------------------------------------------------------------------+
| timeout | in seconds |
+------------------+-----------------------------------------------------------------------------------------------------------+
| method | default: "aes-256-cfb", see `Encryption <https://github.com/shadowsocks/shadowsocks/wiki/Encryption>`__ |
+------------------+-----------------------------------------------------------------------------------------------------------+
| fast\_open | use `TCP\_FASTOPEN <https://github.com/shadowsocks/shadowsocks/wiki/TCP-Fast-Open>`__, true / false |
+------------------+-----------------------------------------------------------------------------------------------------------+
| workers | number of workers, available on Unix/Linux |
+------------------+-----------------------------------------------------------------------------------------------------------+
2014-05-17 07:43:19 +00:00
2014-12-21 06:06:28 +00:00
On your server:
2014-05-17 07:43:19 +00:00
2014-12-21 06:06:28 +00:00
To run in the foreground:
::
2014-12-21 06:06:28 +00:00
ssserver -c /etc/shadowsocks.json
2014-12-21 06:06:28 +00:00
To run in the background:
2014-06-20 15:23:14 +00:00
::
2014-12-21 06:09:07 +00:00
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop
2014-06-20 15:23:14 +00:00
2014-12-21 06:06:28 +00:00
On your client machine, use the same configuration as your server. Check
the README of your client for more information.
2014-05-17 07:43:19 +00:00
2014-12-21 06:06:28 +00:00
Command Line Options
--------------------
2014-12-21 06:06:28 +00:00
Check the options via ``-h``.You can use args to override settings from
``config.json``.
::
sslocal -s server_name -p server_port -l local_port -k password -m bf-cfb
2014-05-17 07:43:19 +00:00
ssserver -p server_port -k password -m bf-cfb --workers 2
2014-12-21 06:08:11 +00:00
ssserver -c /etc/shadowsocks/config.json -d start --pid-file=/tmp/shadowsocks.pid
ssserver -c /etc/shadowsocks/config.json -d stop --pid-file=/tmp/shadowsocks.pid
2014-06-20 15:23:14 +00:00
2014-12-21 06:06:28 +00:00
Documentation
-------------
2014-11-06 06:52:15 +00:00
You can find all the documentation in the wiki:
2014-12-27 15:36:09 +00:00
https://github.com/shadowsocks/shadowsocks/wiki
License
-------
MIT
Bugs and Issues
---------------
2014-12-27 15:36:09 +00:00
- `Troubleshooting <https://github.com/shadowsocks/shadowsocks/wiki/Troubleshooting>`__
2014-07-06 15:43:50 +00:00
- `Issue
2014-12-27 15:36:09 +00:00
Tracker <https://github.com/shadowsocks/shadowsocks/issues?state=open>`__
2014-07-06 15:43:50 +00:00
- `Mailing list <http://groups.google.com/group/shadowsocks>`__
2014-05-17 07:43:19 +00:00
2014-06-21 03:18:33 +00:00
.. |PyPI version| image:: https://img.shields.io/pypi/v/shadowsocks.svg?style=flat
2014-06-05 13:02:36 +00:00
:target: https://pypi.python.org/pypi/shadowsocks
2014-12-27 15:36:09 +00:00
.. |Build Status| image:: https://img.shields.io/travis/shadowsocks/shadowsocks/master.svg?style=flat
:target: https://travis-ci.org/shadowsocks/shadowsocks
2015-01-03 08:48:05 +00:00
.. |Coverage Status| image:: https://jenkins.shadowvpn.org/result/shadowsocks
:target: https://jenkins.shadowvpn.org/job/Shadowsocks/ws/htmlcov/index.html