Updated Shadowsocks 使用说明 (markdown)
parent
7e230af647
commit
31f50a285f
1 changed files with 50 additions and 93 deletions
|
@ -1,129 +1,86 @@
|
||||||
[![PyPI 版本]][PyPI] [![构建状态]][Travis CI] [![Coverage Status]][Coverage]
|
shadowsocks
|
||||||
|
===========
|
||||||
|
|
||||||
一个可穿透防火墙的轻量代理。
|
[![PyPI version]][PyPI]
|
||||||
|
[![Build Status]][Travis CI]
|
||||||
|
[![Coverage Status]][Coverage]
|
||||||
|
|
||||||
安装
|
一个可穿透防火墙的快速代理。
|
||||||
----
|
|
||||||
|
|
||||||
你需要在本地装一个客户端,在远程服务器上搭一个服务端。
|
服务器
|
||||||
|
------
|
||||||
|
|
||||||
### 客户端
|
### 安装
|
||||||
|
|
||||||
* [Windows] / [OS X]
|
|
||||||
* [Android] / [iOS]
|
|
||||||
* [OpenWRT]
|
|
||||||
|
|
||||||
### 服务端
|
|
||||||
|
|
||||||
#### Debian / Ubuntu:
|
#### Debian / Ubuntu:
|
||||||
|
|
||||||
apt-get install python-pip
|
apt-get install python-pip
|
||||||
pip install shadowsocks
|
pip install shadowsocks
|
||||||
|
|
||||||
如果你添加了 [Debian sid] 的源,可直接 `apt-get install shadowsocks`.
|
|
||||||
|
|
||||||
#### CentOS:
|
#### CentOS:
|
||||||
|
|
||||||
yum install python-setuptools
|
yum install python-setuptools && easy_install pip
|
||||||
easy_install pip
|
|
||||||
pip install shadowsocks
|
pip install shadowsocks
|
||||||
|
|
||||||
#### Windows:
|
#### Windows:
|
||||||
|
|
||||||
下载安装 [OpenSSL for Windows]。然后类似 Linux 通过 easy_install 或 pip 来安装。
|
参见 [Windows 上安装服务器]
|
||||||
如果你不清楚如何使用 easy_install,也可以直接[下载],然后用 `python shadowsocks/server.py`
|
|
||||||
代替下文的 `ssserver`。
|
|
||||||
|
|
||||||
服务器配置
|
### 使用
|
||||||
---------
|
|
||||||
|
|
||||||
服务端安装好以后,创建一个配置文件 `/etc/shadowsocks.json`。
|
ssserver -p 8000 -k password -m rc4-md5
|
||||||
示例:
|
|
||||||
|
|
||||||
{
|
如果要后台运行:
|
||||||
"server":"服务器 IP 地址",
|
|
||||||
"server_port":8388,
|
|
||||||
"local_address": "127.0.0.1",
|
|
||||||
"local_port":1080,
|
|
||||||
"password":"mypassword",
|
|
||||||
"timeout":300,
|
|
||||||
"method":"aes-256-cfb",
|
|
||||||
"fast_open": false
|
|
||||||
}
|
|
||||||
|
|
||||||
各个字段的意思:
|
ssserver -p 8000 -k password -m rc4-md5 -d start
|
||||||
|
ssserver -p 8000 -k password -m rc4-md5 -d stop
|
||||||
|
|
||||||
| 字段名 | 含义 |
|
用 `-h` 查看所有参数。你也可以使用 [配置文件] 进行配置。
|
||||||
| ------------- | ----------------------------------------------- |
|
|
||||||
| server | 服务端监听的地址,服务端可填写 0.0.0.0 |
|
|
||||||
| server_port | 服务端的端口 |
|
|
||||||
| local_address | 本地端监听的地址 |
|
|
||||||
| local_port | 本地端的端口 |
|
|
||||||
| password | 用于加密的密码 |
|
|
||||||
| timeout | 超时时间,单位秒 |
|
|
||||||
| method | 默认 "aes-256-cfb",参见[加密方法] |
|
|
||||||
| fast_open | 是否使用 [TCP_FASTOPEN], true / false |
|
|
||||||
| workers | worker 数量,Unix/Linux 可用,如果不理解含义请不要改 |
|
|
||||||
|
|
||||||
在服务器上:
|
客户端
|
||||||
|
------
|
||||||
|
|
||||||
前台运行:
|
* [Windows] / [OS X]
|
||||||
|
* [Android] / [iOS]
|
||||||
|
* [OpenWRT]
|
||||||
|
|
||||||
ssserver -c /etc/shadowsocks.json
|
在你本地的 PC 或手机上使用图形客户端。具体使用参见它们的使用说明。
|
||||||
|
|
||||||
后台运行:
|
|
||||||
|
|
||||||
ssserver -c /etc/shadowsocks.json -d start
|
|
||||||
ssserver -c /etc/shadowsocks.json -d stop
|
|
||||||
|
|
||||||
在客户端上填写和服务器端一样的配置。关于客户端的使用请参见各个客户端的说明。
|
|
||||||
|
|
||||||
如果想直接用命令行运行客户端,可以运行 `sslocal -c /etc/shadowsocks.json`。
|
|
||||||
|
|
||||||
命令行参数
|
|
||||||
---------
|
|
||||||
|
|
||||||
用 `-h` 查看所有参数。你可以用命令行参数覆盖 `config.json` 中的设置:
|
|
||||||
|
|
||||||
sslocal -s server_name -p server_port -l local_port -k password -m bf-cfb
|
|
||||||
ssserver -p server_port -k password -m bf-cfb --workers 2
|
|
||||||
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
|
|
||||||
|
|
||||||
文档
|
文档
|
||||||
----
|
----
|
||||||
|
|
||||||
所有的文档都可以在 Wiki 里找到:
|
可以在 [Wiki] 里找到所有的文档。
|
||||||
https://github.com/shadowsocks/shadowsocks/wiki
|
|
||||||
|
|
||||||
协议
|
License
|
||||||
----
|
-------
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
问题反馈
|
Bugs and Issues
|
||||||
--------
|
----------------
|
||||||
* [常见问题]
|
|
||||||
* [邮件列表]
|
* [Troubleshooting]
|
||||||
* [Issue Tracker]
|
* [Issue Tracker]
|
||||||
|
* [Mailing list]
|
||||||
|
|
||||||
|
|
||||||
|
[Android]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#android
|
||||||
|
[Build Status]: https://img.shields.io/travis/shadowsocks/shadowsocks/master.svg?style=flat
|
||||||
|
[Chinese Readme]: https://github.com/shadowsocks/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
|
||||||
|
[配置文件]: https://github.com/shadowsocks/shadowsocks/wiki/Configuration-via-Config-File
|
||||||
[Coverage Status]: https://jenkins.shadowvpn.org/result/shadowsocks
|
[Coverage Status]: https://jenkins.shadowvpn.org/result/shadowsocks
|
||||||
[Coverage]: https://jenkins.shadowvpn.org/job/Shadowsocks/ws/htmlcov/index.html
|
[Coverage]: https://jenkins.shadowvpn.org/job/Shadowsocks/ws/htmlcov/index.html
|
||||||
[Windows]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#windows
|
|
||||||
[OS X]: https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-%E5%B8%AE%E5%8A%A9
|
|
||||||
[Android]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#android
|
|
||||||
[Debian sid]: https://packages.debian.org/unstable/python/shadowsocks
|
[Debian sid]: https://packages.debian.org/unstable/python/shadowsocks
|
||||||
|
[Encryption]: https://github.com/shadowsocks/shadowsocks/wiki/Encryption
|
||||||
[iOS]: https://github.com/shadowsocks/shadowsocks-iOS/wiki/Help
|
[iOS]: https://github.com/shadowsocks/shadowsocks-iOS/wiki/Help
|
||||||
[OpenWRT]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#openwrt
|
|
||||||
[构建状态]: https://img.shields.io/travis/shadowsocks/shadowsocks/master.svg?style=flat
|
|
||||||
[图形界面版本]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients
|
|
||||||
[Issue Tracker]: https://github.com/shadowsocks/shadowsocks/issues?state=open
|
[Issue Tracker]: https://github.com/shadowsocks/shadowsocks/issues?state=open
|
||||||
[OpenSSL for Windows]: http://slproweb.com/products/Win32OpenSSL.html
|
[Windows 上安装服务器]: https://github.com/shadowsocks/shadowsocks/wiki/Install-Shadowsocks-Server-on-Windows
|
||||||
|
[Mailing list]: https://groups.google.com/group/shadowsocks
|
||||||
|
[OpenWRT]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#openwrt
|
||||||
|
[OS X]: https://github.com/shadowsocks/shadowsocks-iOS/wiki/Shadowsocks-for-OSX-Help
|
||||||
[PyPI]: https://pypi.python.org/pypi/shadowsocks
|
[PyPI]: https://pypi.python.org/pypi/shadowsocks
|
||||||
[PyPI 版本]: https://img.shields.io/pypi/v/shadowsocks.svg?style=flat
|
[PyPI version]: https://img.shields.io/pypi/v/shadowsocks.svg?style=flat
|
||||||
[TCP_FASTOPEN]: https://github.com/shadowsocks/shadowsocks/wiki/TCP-Fast-Open
|
[TCP_FASTOPEN]: https://github.com/shadowsocks/shadowsocks/wiki/TCP-Fast-Open
|
||||||
[Travis CI]: https://travis-ci.org/shadowsocks/shadowsocks
|
[Travis CI]: https://travis-ci.org/shadowsocks/shadowsocks
|
||||||
[加密方法]: https://github.com/shadowsocks/shadowsocks/wiki/Encryption
|
[Troubleshooting]: https://github.com/shadowsocks/shadowsocks/wiki/Troubleshooting
|
||||||
[常见问题]: https://github.com/shadowsocks/shadowsocks/wiki/Troubleshooting
|
[Wiki]: https://github.com/shadowsocks/shadowsocks/wiki
|
||||||
[邮件列表]: http://groups.google.com/group/shadowsocks
|
[Windows]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#windows
|
||||||
[下载]: https://pypi.python.org/pypi/shadowsocks
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue