@forestsheep
2018-02-11T10:40:13.000000Z
字数 1794
阅读 1411
服务器
SSR配置
以下是新版ssrr的配置
SSR
增加TCP连接数量
nano /etc/security/limits.conf
添加两行:
* soft nofile 51200
* hard nofile 51200
设置ulimit:
ulimit -n 51200
连接SSH,运行下面的命令
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh
添加一些优化内容
修改sysctl.conf
nano /etc/sysctl.conf
复制代码:
#TCP配置优化(不然你自己根本不知道你在干什么)
fs.file-max = 51200
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096
#net.core.default_qdisc = fq
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = bbr
保存(Ctrl + X —— y ——回车)
应用
sysctl -p
执行 sysctl net.ipv4.tcp_available_congestion_control
apt-get update
apt-get install m2crypto git build-essential python-pip python-m2crypto -y
wget https://github.com/jedisct1/libsodium/releases/download/1.0.13/libsodium-1.0.13.tar.gz
tar xf libsodium-1.0.13.tar.gz && cd libsodium-1.0.13
./configure && make -j2 && make install
ldconfig
git clone -b akkariiin/master https://github.com/shadowsocksrr/shadowsocksr
cd ~/shadowsocksr
bash initcfg.sh
shadowsocksr目录内,对userapiconfig.py里以下内容进行相应修改:
API_INTERFACE = 'mudbjson' #修改接口类型
SERVER_PUB_ADDR = '127.0.0.1' #修改生成链接对应的公网IP
python mujson_mgr.py -a -u boccaro -p 80 -k fkgfw -m none -O auth_chain_a -o http_simple -t 512
python mujson_mgr.py -a -u fs -p 443 -k fkgfw -m chacha20 -O auth_sha1_v4 -o tls1.2_ticket_auth -t 512
python mujson_mgr.py -a -u tuzi -p 35288 -k Tz791121 -m chacha20 -O auth_sha1_v4 -o tls1.2_ticket_auth -t 512
To run in the backg
./logrun
To stop:
./stop.sh
To monitor the log:
./tail.sh
ssr windows c# 客户端
ssr andriod 客户端