Created
August 17, 2018 12:49
-
-
Save simonchen/030f79f2ba5ed91a7ab3eb63d64b8a60 to your computer and use it in GitHub Desktop.
Revisions
-
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -202,7 +202,7 @@ 注意配置文件中的以下参数必须与上面服务端的配置文件参数完全一致: *key*, *crypt*, *mode*, *mtu*, *datashard*, *parityshard*, *nocomp*。 **localaddr** 参数为本地服务的端口号,亦即 shadowsocks 客户端中填写的端口号; **remoteaddr** 参数为 shadowsocks 服务器的 IP 地址和其 kcptun 服务的端口号。 其他设置事项请参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ * Ubuntu 14.04 64位环境部署**多端口** shadowsocks 服务端 * 启用相对更节约资源的 **CHACHA20** 加密 -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,8 @@ * 在 Android 和 Windows 环境下 **kcptun 客户端** 的配置 ------ 1. 安装必要组件 * 更新系统,安装可以直接从 apt 更新的软件: @@ -242,7 +244,7 @@ 目前 [shadowsocks Android 客户端](https://play.google.com/store/apps/details?id=com.github.shadowsocks)已经集成了对 kcptun 的支持。 * 在 shadowsocks Android 客户端的配置中**启用 KCP 协议**,在 **KCP端口** 中填写 kcptun 服务的端口号。 * 在 **KCP 参数**中填写参数,**除最后一项外其他参数必须与服务端配置文件中的参数一致**。 @@ -252,6 +254,8 @@ * 启动 shadowsocks 客户端服务即可。 ------ * 使用的项目的Github地址: ***shadowsocks***: https://github.com/shadowsocks/shadowsocks -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -179,7 +179,7 @@ * 在上述文件夹中新建文本文档 `run.vbs`: ```vbs Dim RunKcptun Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") @@ -246,16 +246,20 @@ * 在 **KCP 参数**中填写参数,**除最后一项外其他参数必须与服务端配置文件中的参数一致**。 ``` --key password3 --crypt salsa20 --mode fast --datashard 5 --parityshard 5 --nocomp --dscp 46 ``` * 启动 shadowsocks 客户端服务即可。 * 使用的项目的Github地址: ***shadowsocks***: https://github.com/shadowsocks/shadowsocks ***kcptun***: https://github.com/xtaci/kcptun ***supervisor***: https://github.com/Supervisor/supervisor ***libsodium***: https://github.com/jedisct1/libsodium ***shadowsocks Android***: https://github.com/shadowsocks/shadowsocks-android -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 25 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,9 @@ * 启用相对更节约资源的 **CHACHA20** 加密 * 部署更快速的 **kcptun** 服务端 * 在 Android 和 Windows 环境下 **kcptun 客户端** 的配置 1. 安装必要组件 @@ -35,7 +35,7 @@ ldconfig ``` 2. 部署 shadowsocks 服务端 * 编辑 shadowsocks 配置文件: @@ -51,7 +51,7 @@ * 下面配置文件中1080和8080为服务端口号,后面为对应的密码,可以不同。 ```JSON { "server":"0.0.0.0", "port_password": @@ -73,7 +73,7 @@ *如果需要选定1024内的端口号,可能必须用root用户。* ```JSON [program:shadowsocks] command=ssserver -c /etc/shadowsocks.json autorestart=true @@ -89,9 +89,9 @@ * 在 shadowsocks 客户端检查连接无误后再进入下一步。 3. kcptun 服务端的部署 * 下载安装 kcptun: ```bash mkdir /root/kcptun @@ -101,9 +101,9 @@ tar -zxf kcptun-linux-amd64-*.tar.gz ``` * 配置 kcptun 启动和停止文件: *启动文件无需任何修改,通过配置文件控制 kcptun 服务参数。* ```bash vi /root/kcptun/start.sh @@ -132,16 +132,16 @@ echo "Kcptun stoped." ``` * 编辑 kcptun 的配置文件: ```bash vi /root/kcptun/server-config.json ``` * 下面的配置文件中,需要注意以下参数: **listen** 参数为 kcptun 服务的端口; **target** 参数必须为本地 shadowsocks 使用的端口之一,也就是通过 kcptun 加速的端口; **key** 参数为 kcptun 使用的密码,自行设定。其他参数参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 ```JSON { "listen": ":443", "target": "127.0.0.1:1080", @@ -165,21 +165,21 @@ } ``` * 现在可以通过`sh /root/kcptun/start.sh`命令启动 kcptun 服务,通过`sh /root/kcptun/stop.sh`停止。 * 将 kcptun 服务设为开机启动: ```bash echo "sh /root/kcptun/start.sh" >> /etc/rc.local ``` 4. kcptun 在 Windows 客户端上的启用与配置 * 在[项目发布页](https://github.com/xtaci/kcptun/releases/)下载 Windows 版 kcptun 并解压缩。注意最好将 ***client_windows_amd64.exe*** 文件放在全英文路径的单独文件夹中。 * 在上述文件夹中新建文本文档 `run.vbs`: ```Visual Basic Dim RunKcptun Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") @@ -204,7 +204,7 @@ 其他设置事项请参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 ```JSON { "localaddr": ":12345", "remoteaddr": "10.10.10.10:443", @@ -230,13 +230,13 @@ } ``` * 新建`stop.bat`文件,用于停止 kcptun 客户端。 ```bat taskkill /f /im client_windows_amd64.exe ``` * 现在即可双击`run.vbs`运行 kcptun 服务,同时打开 shadowsocks 客户端,服务器地址填写 `localhost`,服务器端口为上述 kcptun 客户端配置文件中 *localaddr* 参数的数值,密码为服务器上 shadowsocks 配置文件中设置的密码,加密方式为 *CHACHA20*。 5. 在 shadowsocks Android 客户端配置 kcptun @@ -254,3 +254,8 @@ * 使用的项目的Github地址: ***shadowsocks***: https://github.com/shadowsocks/shadowsocks ***kcptun***: https://github.com/xtaci/kcptun ***supervisor***: https://github.com/Supervisor/supervisor ***libsodium***: https://github.com/jedisct1/libsodium ***shadowsocks Android***: https://github.com/shadowsocks/shadowsocks-android -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 17 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,21 +10,21 @@ * 更新系统,安装可以直接从 apt 更新的软件: ```bash apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ``` * 安装 shadowsocks: ```bash pip install shadowsocks ``` * 安装加密用软件 libsodium: ```bash wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz tar zxvf libsodium-1.0.11.tar.gz cd libsodium-1.0.11 @@ -39,7 +39,7 @@ * 编辑 shadowsocks 配置文件: ```bash vi /etc/shadowsocks.json ``` @@ -67,7 +67,7 @@ * 编辑 supervisor 的配置文件: ```bash vi /etc/supervisor/conf.d/shadowsocks.conf ``` @@ -82,7 +82,7 @@ * 现在即可通过下面的命令启动 shadowsocks 服务端,并检查其状态: ```bash supervisorctl reload supervisorctl status ``` @@ -93,7 +93,7 @@ * 下载安装 KCPTUN: ```bash mkdir /root/kcptun cd /root/kcptun ln -sf /bin/bash /bin/sh @@ -105,23 +105,23 @@ *启动文件无需任何修改,通过配置文件控制 KCPTUN 服务参数。* ```bash vi /root/kcptun/start.sh ``` ```bash #!/bin/bash cd /root/kcptun/ ./server_linux_amd64 -c /root/kcptun/server-config.json > kcptun.log 2>&1 & echo "Kcptun started." ``` ```bash vi /root/kcptun/stop.sh ``` ```bash #!/bin/bash echo "Stopping Kcptun..." PID=`ps -ef | grep server_linux_amd64 | grep -v grep | awk '{print $2}'` @@ -134,14 +134,14 @@ * 编辑 KCPTUN 的配置文件: ```bash vi /root/kcptun/server-config.json ``` * 下面的配置文件中,需要注意以下参数: **listen** 参数为 KCPTUN 服务的端口; **target** 参数必须为本地 shadowsocks 使用的端口之一,也就是通过 KCPTUN 加速的端口; **key** 参数为 KCPTUN 使用的密码,自行设定。其他参数参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 ```son { "listen": ":443", "target": "127.0.0.1:1080", @@ -169,7 +169,7 @@ * 将 KCPTUN 服务设为开机启动: ```bash echo "sh /root/kcptun/start.sh" >> /etc/rc.local ``` @@ -179,7 +179,7 @@ * 在上述文件夹中新建文本文档 `run.vbs`: ```vbscript Dim RunKcptun Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") @@ -204,7 +204,7 @@ 其他设置事项请参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 ```son { "localaddr": ":12345", "remoteaddr": "10.10.10.10:443", @@ -232,7 +232,7 @@ * 新建`stop.bat`文件,用于停止 KCPTUN 客户端。 ```bat taskkill /f /im client_windows_amd64.exe ``` -
guomuller renamed this gist
Nov 28, 2016 . 1 changed file with 18 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -179,7 +179,7 @@ * 在上述文件夹中新建文本文档 `run.vbs`: ```vbs Dim RunKcptun Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") @@ -237,4 +237,20 @@ ``` * 现在即可双击`run.vbs`运行 KCPTUN 服务,同时打开 shadowsocks 客户端,服务器地址填写 `localhost`,服务器端口为上述 KCPTUN 客户端配置文件中 *localaddr* 参数的数值,密码为服务器上 shadowsocks 配置文件中设置的密码,加密方式为 *CHACHA20*。 5. 在 shadowsocks Android 客户端配置 kcptun 目前 [shadowsocks Android 客户端](https://play.google.com/store/apps/details?id=com.github.shadowsocks)已经集成了对 kcptun 的支持。 * 在 shadowsocks Android 客户端的配置中*启用 KCP 协议*,在 *KCP端口* 中填写 kcptun 服务的端口号。 * 在 **KCP 参数**中填写参数,**除最后一项外其他参数必须与服务端配置文件中的参数一致**。 ``` --key password3 --crypt salsa20 --mode fast --datashard 5 --parityshard 5 --nocomp --dscp 46 ``` * 启动 shadowsocks 客户端服务即可。 * 使用的项目的Github地址: -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 68 additions and 63 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ * 部署更快速的 **KCPTUN** 服务端 * 在 Android 和 Windows 环境下 **KCPTUN 客户端** 的配置 1. 安装必要组件 @@ -16,13 +16,13 @@ apt-get install build-essential python-pip m2crypto supervisor ``` * 安装 shadowsocks: ``` pip install shadowsocks ``` * 安装加密用软件 libsodium: ``` wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz @@ -91,7 +91,7 @@ 3. KCPTUN 的部署 * 下载安装 KCPTUN: ``` mkdir /root/kcptun @@ -139,7 +139,7 @@ ``` * 下面的配置文件中,需要注意以下参数: **listen** 参数为 KCPTUN 服务的端口; **target** 参数必须为本地 shadowsocks 使用的端口之一,也就是通过 KCPTUN 加速的端口; **key** 参数为 KCPTUN 使用的密码,自行设定。其他参数参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 ``` { @@ -173,63 +173,68 @@ echo "sh /root/kcptun/start.sh" >> /etc/rc.local ``` 4. KCPTUN 在 Windows 客户端上的启用与配置 * 在[项目发布页](https://github.com/xtaci/kcptun/releases/)下载 Windows 版 KCPTUN 并解压缩。注意最好将 ***client_windows_amd64.exe*** 文件放在全英文路径的单独文件夹中。 * 在上述文件夹中新建文本文档 `run.vbs`: ``` Dim RunKcptun Set fso = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") currentPath = fso.GetFile(Wscript.ScriptFullName).ParentFolder.Path & "\" configFile = currentPath & "client-config.json" logFile = currentPath & "kcptun.log" exeConfig = currentPath & "client_windows_amd64.exe -c " & configFile cmdLine = "cmd /c " & exeConfig & " > " & logFile & " 2>&1" WshShell.Run cmdLine, 0, False 'WScript.Sleep 1000 'Wscript.echo cmdLine Set WshShell = Nothing Set fso = Nothing WScript.quit ``` * 在同一文件夹中新建客户端配置文件 `client-config.json`: 注意配置文件中的以下参数必须与上面服务端的配置文件参数完全一致: *key*, *crypt*, *mode*, *mtu*, *datashard*, *parityshard*, *nocomp*。 **localaddr** 参数为本地服务的端口号,亦即 shadowsocks 客户端中填写的端口号; **remoteaddr** 参数为 shadowsocks 服务器的 IP 地址和其 KCPTUN 服务的端口号。 其他设置事项请参考[项目介绍](https://github.com/xtaci/kcptun/blob/master/README.md)。 ``` { "localaddr": ":12345", "remoteaddr": "10.10.10.10:443", "key": "password3", "crypt": "salsa20", "mode": "fast", "conn": 1, "autoexpire": 60, "mtu": 1350, "sndwnd": 128, "rcvwnd": 1024, "datashard": 5, "parityshard": 5, "dscp": 46, "nocomp": true, "acknodelay": false, "nodelay": 0, "interval": 40, "resend": 0, "nc": 0, "sockbuf": 4194304, "keepalive": 10 } ``` * 新建`stop.bat`文件,用于停止 KCPTUN 客户端。 ``` taskkill /f /im client_windows_amd64.exe ``` * 现在即可双击`run.vbs`运行 KCPTUN 服务,同时打开 shadowsocks 客户端,服务器地址填写 `localhost`,服务器端口为上述 KCPTUN 客户端配置文件中 *localaddr* 参数的数值,密码为服务器上 shadowsocks 配置文件中设置的密码,加密方式为 *CHACHA20*。 -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 21 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,28 +1,28 @@ * Ubuntu 14.04 64位环境部署**多端口** Shadowsocks 服务端 * 启用相对更节约资源的 **CHACHA20** 加密 * 部署更快速的 **KCPTUN** 服务端 * 在 Android 和 Windows 环境下 **KCPTUN客户端** 的配置 1. 安装必要组件 * 更新系统,安装可以直接从 apt 更新的软件: ``` apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ``` * 安装 shadowsocks : ``` pip install shadowsocks ``` * 安装加密用软件 libsodium : ``` wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz @@ -35,9 +35,9 @@ ldconfig ``` 2. 配置 shadowsocks * 编辑 shadowsocks 配置文件: ``` vi /etc/shadowsocks.json @@ -65,7 +65,7 @@ } ``` * 编辑 supervisor 的配置文件: ``` vi /etc/supervisor/conf.d/shadowsocks.conf @@ -80,18 +80,18 @@ user=root ``` * 现在即可通过下面的命令启动 shadowsocks 服务端,并检查其状态: ``` supervisorctl reload supervisorctl status ``` * 在 shadowsocks 客户端检查连接无误后再进入下一步。 3. KCPTUN 的部署 * 下载安装 KCPTUN : ``` mkdir /root/kcptun @@ -101,9 +101,9 @@ tar -zxf kcptun-linux-amd64-*.tar.gz ``` * 配置 KCPTUN 启动和停止文件: *启动文件无需任何修改,通过配置文件控制 KCPTUN 服务参数。* ``` vi /root/kcptun/start.sh @@ -132,16 +132,14 @@ echo "Kcptun stoped." ``` * 编辑 KCPTUN 的配置文件: ``` vi /root/kcptun/server-config.json ``` * 下面的配置文件中,需要注意以下参数: **listen** 参数为 KCPTUN 服务的端口; **target** 参数必须为本地 shadowsocks 使用的端口之一,也就是通过 KCPTUN 加速的端口; **key** 参数为 KCPTUN 使用的密码,自行设定。其他参数参考项目主页。 ``` { @@ -167,15 +165,15 @@ } ``` * 现在可以通过`sh /root/kcptun/start.sh`命令启动 KCPTUN 服务,通过`sh /root/kcptun/stop.sh`停止。 * 将 KCPTUN 服务设为开机启动: ``` echo "sh /root/kcptun/start.sh" >> /etc/rc.local ``` 4. KCPTUN 在客户端上的启用与配置 * WINDOWS VBS run.vbs -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -176,7 +176,8 @@ ``` 4.KCPTUN在客户端上的启用与配置 * WINDOWS VBS run.vbs Dim RunKcptun -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 37 additions and 29 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -137,37 +137,45 @@ ``` vi /root/kcptun/server-config.json ``` * 下面的配置文件中,需要注意以下参数: **listen**参数为KCPTUN服务的端口;**target**参数必须为本地shadowsocks使用的端口之一,也就是通过KCPTUN加速的端口。 **key**参数为KCPTUN使用的密码,自行设定。其他参数参考项目主页。 ``` { "listen": ":443", "target": "127.0.0.1:1080", "key": "password3", "crypt": "salsa20", "mode": "fast", "mtu": 1350, "sndwnd": 1024, "rcvwnd": 1024, "datashard": 5, "parityshard": 5, "dscp": 46, "nocomp": true, "acknodelay": false, "nodelay": 0, "interval": 40, "resend": 0, "nc": 0, "sockbuf": 4194304, "keepalive": 10 } ``` * 现在可以通过`sh /root/kcptun/start.sh`命令启动KCPTUN服务,通过`sh /root/kcptun/stop.sh`停止。 * 将KCPTUN服务设为开机启动: ``` echo "sh /root/kcptun/start.sh" >> /etc/rc.local ``` 4.KCPTUN在客户端上的启用与配置 ###### WINDOWS VBS run.vbs -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 50 additions and 30 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -86,28 +86,58 @@ supervisorctl reload supervisorctl status ``` * 在shadowsocks客户端检查连接无误后再进入下一步。 3. KCPTUN的部署 * 下载安装KCPTUN: ``` mkdir /root/kcptun cd /root/kcptun ln -sf /bin/bash /bin/sh wget https://github.com/xtaci/kcptun/releases/download/v20161118/kcptun-linux-amd64-20161118.tar.gz tar -zxf kcptun-linux-amd64-*.tar.gz ``` * 配置KCPTUN启动和停止文件: *启动文件无需任何修改,通过配置文件控制KCPTUN服务参数。* ``` vi /root/kcptun/start.sh ``` ``` #!/bin/bash cd /root/kcptun/ ./server_linux_amd64 -c /root/kcptun/server-config.json > kcptun.log 2>&1 & echo "Kcptun started." ``` ``` vi /root/kcptun/stop.sh ``` ``` #!/bin/bash echo "Stopping Kcptun..." PID=`ps -ef | grep server_linux_amd64 | grep -v grep | awk '{print $2}'` if [ "" != "$PID" ]; then echo "killing $PID" kill -9 $PID fi echo "Kcptun stoped." ``` * 编辑KCPTUN的配置文件: ``` vi /root/kcptun/server-config.json ``` { "listen": ":443", "target": "127.0.0.1:1080", @@ -130,16 +160,6 @@ vi /root/kcptun/server-config.json "keepalive": 10 } ### sh /root/kcptun/start.sh -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 50 additions and 36 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,42 +36,56 @@ ``` 2. 配置shadowsocks * 编辑shadowsocks配置文件: ``` vi /etc/shadowsocks.json ``` *按`I`进入插入模式,粘贴后按`Esc`退出,* *光标选中需要修改的位置按`X`删除,再进入插入模式修改。* *最后按`Esc`退出,再输入`:wq`保存退出。* * 下面配置文件中1080和8080为服务端口号,后面为对应的密码,可以不同。 ``` { "server":"0.0.0.0", "port_password": { "1080":"password1", "8080":"password2" }, "timeout":600, "method":"chacha20", "auth": true } ``` * 编辑supervisor的配置文件: ``` vi /etc/supervisor/conf.d/shadowsocks.conf ``` *如果需要选定1024内的端口号,可能必须用root用户。* ``` [program:shadowsocks] command=ssserver -c /etc/shadowsocks.json autorestart=true user=root ``` * 现在即可通过下面的命令启动shadowsocks服务端,并检查其状态: ``` supervisorctl reload supervisorctl status ``` 3. KCPTUN的部署 下载安装KCPTUN: -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,11 +15,15 @@ apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ``` * 安装shadowsocks: ``` pip install shadowsocks ``` * 安装加密用软件libsodium: ``` wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz tar zxvf libsodium-1.0.11.tar.gz -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 20 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,26 +10,26 @@ * 更新系统,安装可以直接从apt更新的软件: ``` apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ``` * 安装shadowsocks: ``` pip install shadowsocks ``` * 安装加密用软件libsodium: ``` wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz tar zxvf libsodium-1.0.11.tar.gz cd libsodium-1.0.11 ./configure make && make check make install echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf ldconfig ``` 2. 配置shadowsocks 编辑shadowsocks配置文件: -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,8 @@ 1. 安装必要组件 * 更新系统,安装可以直接从apt更新的软件: ``` apt-get update apt-get upgrade -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,13 @@ * Ubuntu 14.04 64位环境部署**多端口**Shadowsocks服务端 * 启用相对更节约资源的**CHACHA20**加密 * 部署更快速的**KCPTUN**服务端 * 在Android和Windows环境下**KCPTUN客户端**的配置 1. 安装必要组件 更新系统,安装可以直接从apt更新的软件: ``` apt-get update -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 38 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,21 @@ * Ubuntu 14.04 64位环境部署**多端口**Shadowsocks服务端 * 启用相对更节约资源的**CHACHA20**加密 * 部署更快速的**KCPTUN**服务端 * 在Android和Windows环境下**KCPTUN客户端**的配置 1. 安装必要组件 更新系统,安装可以直接从apt更新的软件: ``` apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ``` 安装shadowsocks: ``` pip install shadowsocks ``` 安装加密用软件libsodium: ``` wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz tar zxvf libsodium-1.0.11.tar.gz cd libsodium-1.0.11 @@ -19,9 +24,17 @@ make && make check make install echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf ldconfig ``` 2. 配置shadowsocks 编辑shadowsocks配置文件: ``` vi /etc/shadowsocks.json ``` *按`I`进入插入模式,粘贴后按`Esc`退出,光标选中需要修改的位置按`X`删除,再进入插入模式修改。* *最后按`Esc`退出,再输入`:wq`保存退出。* 下面配置文件中1080和8080为服务端口号,后面为对应的密码,可以不同。 ``` { "server":"0.0.0.0", "port_password": @@ -33,31 +46,43 @@ vi /etc/shadowsocks.json "method":"chacha20", "auth": true } ``` 编辑supervisor的配置文件: ``` vi /etc/supervisor/conf.d/shadowsocks.conf ``` 如果需要选定1024内的端口号,可能必须用root用户。 ``` [program:shadowsocks] command=ssserver -c /etc/shadowsocks.json autorestart=true user=root ``` 现在即可通过下面的命令启动shadowsocks服务端,并检查其状态: ``` supervisorctl reload supervisorctl status ``` 3. KCPTUN的部署 下载安装KCPTUN: ``` mkdir /root/kcptun cd /root/kcptun ln -sf /bin/bash /bin/sh wget https://github.com/xtaci/kcptun/releases/download/v20161118/kcptun-linux-amd64-20161118.tar.gz tar -zxf kcptun-linux-amd64-*.tar.gz ``` 配置KCPTUN启动文件: ``` vi /root/kcptun/start.sh ``` ``` #!/bin/bash cd /root/kcptun/ ./server_linux_amd64 -c /root/kcptun/server-config.json > kcptun.log 2>&1 & echo "Kcptun started." ``` vi /root/kcptun/server-config.json { -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,11 @@ * 在Android和Windows环境下Shadowsocks客户端的配置 1. 更新系统,安装必要组件 ``` apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ``` pip install shadowsocks wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,11 @@ * 在Android和Windows环境下Shadowsocks客户端的配置 1. 更新系统,安装必要组件 apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor pip install shadowsocks wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,11 @@ * 在Android和Windows环境下Shadowsocks客户端的配置 1. 更新系统,安装必要组件 ` apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor ` pip install shadowsocks wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,10 +4,11 @@ * 在Android和Windows环境下Shadowsocks客户端的配置 1. 更新系统,安装必要组件 · apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor · pip install shadowsocks wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,9 @@ * 在Android和Windows环境下Shadowsocks客户端的配置 1. 更新系统,安装必要组件 apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor pip install shadowsocks -
guomuller revised this gist
Nov 28, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,12 @@ * Ubuntu 14.04环境部署**多端口**Shadowsocks服务端 * 启用相对更节约资源的**CHACHA20**加密 * 部署更快速的**KCPTUN**服务端 * 在Android和Windows环境下Shadowsocks客户端的配置 1. 更新系统,安装必要组件 apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto supervisor pip install shadowsocks -
guomuller renamed this gist
Nov 28, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
guomuller revised this gist
Nov 27, 2016 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,6 @@ apt-get update apt-get upgrade apt-get install build-essential python-pip m2crypto build-essential supervisor pip install shadowsocks -
guomuller revised this gist
Nov 26, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,6 @@ apt-get update apt-get upgrade apt-get install python-pip apt-get install m2crypto apt-get install build-essential apt-get install supervisor @@ -46,6 +45,8 @@ cd /root/kcptun wget https://github.com/xtaci/kcptun/releases/download/v20161118/kcptun-linux-amd64-20161118.tar.gz tar -zxf kcptun-linux-amd64-*.tar.gz ln -sf /bin/bash /bin/sh vi /root/kcptun/start.sh #!/bin/bash -
guomuller revised this gist
Nov 19, 2016 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ apt-get install supervisor pip install shadowsocks wget https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz tar zxvf libsodium-1.0.11.tar.gz cd libsodium-1.0.11 ./configure make && make check make install @@ -43,7 +43,7 @@ supervisorctl status mkdir /root/kcptun cd /root/kcptun wget https://github.com/xtaci/kcptun/releases/download/v20161118/kcptun-linux-amd64-20161118.tar.gz tar -zxf kcptun-linux-amd64-*.tar.gz vi /root/kcptun/start.sh @@ -59,7 +59,7 @@ vi /root/kcptun/server-config.json "listen": ":443", "target": "127.0.0.1:1080", "key": "test", "crypt": "salsa20", "mode": "fast2", "mtu": 1350, "sndwnd": 1024, @@ -129,7 +129,7 @@ client-config.json "localaddr": ":132466", "remoteaddr": "10.10.10.10:443", "key": "test", "crypt": "salsa20", "mode": "fast2", "conn": 1, "autoexpire": 60, -
guomuller renamed this gist
Nov 19, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
guomuller renamed this gist
Nov 19, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.
NewerOlder