This commit is contained in:
light
2017-09-01 16:13:48 +08:00
parent 3f9837983e
commit c744b83eae
10 changed files with 344 additions and 2 deletions
+84
View File
@@ -0,0 +1,84 @@
# 使用shadowsockes
> https://yq.aliyun.com/articles/137280?commentId=11711
> https://github.com/shadowsocks/
## install
``` bash
sudo apt update
sudo apt upgrade
sudo pip install shadowsocks
```
## 服务端配置
```
{
"server":"0.0.0.0",
"server_port":××,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"×××××",
"timeout":300,
"method":"rc4-md5"
}
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop
```
## ubuntu客户端配置
1. chrome 安装SwitchyOmega
2. 本地安装shadowsocks
3. 配置本地连接到服务器
```
{
"server":"serverIP",
"server_port":**,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"*****",
"timeout":300,
"method":"rc4-md5",
"fast_open": true,
"workers": 1
}
```
4. 运行和停止服务
> sudo sslocal -c /etc/shadowsocks.json -d start
> sudo sslocal -c /etc/shadowsocks.json -d stop
5. SwitchyOmega 设置socks5 连接到127.0.0.1 1080
## haproxy
```
global
ulimit-n 51200
defaults
log global
mode tcp
option dontlognull
timeout connect 1000ms
timeout client 150000ms
timeout server 150000ms
frontend 110-in
bind *:110
default_backend 110-out
backend 110-out
server server1 ******:3801 maxconn 20480
```
haproxy -f /etc/haproxy/haproxy.cfg