和这篇文章里面的配置相比只是去掉了套udp2raw。
udp2raw只是解决运营商qos的问题,但如果运营商根本没有qos那自然也就不需要udp2raw了。我这边的电信在之前很长一段时间都是有qos的,所以我之前的配置一直都是套个udp2raw使用。但我最近测试了下,直接连接kcptun几个小时也不会出现断流的问题了,所以针对我个人的网络而言就没有必要套udp2raw了。
这里只把相应的配置写上来,关于整个搭建的步骤看之前的文章即可。
新建sing-box配置文件:
nano /usr/local/etc/sing-box/config.json
写入如下配置:
{ "log": { "level": "info" }, "inbounds": [ { "type": "shadowsocks", "tag": "ss-in", "listen": "0.0.0.0", "listen_port": 10000, "method": "aes-256-gcm", "password": "shadowsockspassword" } ], "outbounds": [ { "type": "direct", "tag": "direct" } ] }
新建kcptun配置文件:
nano /usr/local/etc/kcpserver/server.json
写入如下配置:
{ "listen": ":4000", "target": "127.0.0.1:10000", "key": "kcptunpassword", "crypt": "salsa20", "mode": "fast3", "mtu": 1350, "sndwnd": 4096, "rcvwnd": 4096, "datashard": 2, "parityshard": 2, "dscp": 46, "nocomp": true }
新建supervisor配置文件:
nano /etc/supervisor/conf.d/game.conf
写入如下配置:
[program:kcptun] command=/usr/local/bin/server_linux_amd64 -c /usr/local/etc/kcpserver/server.json autostart=true autorestart=true redirect_stderr=true stdout_logfile=/var/log/supervisor/kcptun.log [program:speederv2] command=/usr/local/bin/speederv2_amd64 -s -l 0.0.0.0:4001 -r 127.0.0.1:10000 -f 2:4 -k "udpspeederpassword" autostart=true autorestart=true redirect_stderr=true stdout_logfile=/var/log/supervisor/speederv2.log [program:singbox] command=/usr/local/bin/sing-box run -c /usr/local/etc/sing-box/config.json autostart=true autorestart=true redirect_stderr=true stdout_logfile=/var/log/supervisor/singbox.log
客户端:
.client_windows_amd64.exe -l :12345 -r VPSIP:4000 -key "kcptunpassword" -crypt salsa20 -nocomp -datashard 2 -parityshard 2 -mtu 1350 -sndwnd 512 -rcvwnd 2048 -dscp 46 -mode fast3
.speederv2_wepoll.exe -c -l 0.0.0.0:12345 -r VPSIP:4001 -f 2:4 -k "udpspeederpassword"
netch配置ss连接本地的12345端口:
整个连接过程:
localhost:12345(tcp)->server:4000->server:10000
localhost:12345(udp)->server:4001->server:10000
LALA
我什么都不卖了,告辞!
最新评论
5211314
能不能教我 一点不会