Closed hktalent closed 5 years ago
只能说,太快了,用了一个月,流量超限185G 只能迁移到docker
1、环境准备
docker pull alpine:latest
docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix --privileged --net=host -v /root/kcp:/kcp -P --name=kcp cdf98d1859c1 /bin/sh
(ps:cdf98d1859c1 是docker images|grep alpine看到的那个哈)
2、进入docker后
echo "ulimit -n 65535">>~/.bashrc
source ~/.bashrc
cat <<EOT>>/etc/sysctl.conf
net.core.rmem_max=26214400 // BDP - bandwidth delay product
net.core.rmem_default=26214400
net.core.wmem_max=26214400
net.core.wmem_default=26214400
net.core.netdev_max_backlog=2048 // proportional to -rcvwnd
EOT
3、如果你已经退出了docker重新进入
docker start 92507b990a7c
docker exec -it 92507b990a7c /bin/sh
(ps: 92507b990a7c 是
docker ps -a|grep kcp
看到的)
# 进入docker后
cd /kcp/;./server_linux_amd64 -c kcp.json
ps:关键点:
kcp.json中ss的ip用宿主机docker0的ip
{
"listen": ":110",
"target": "172.17.0.1:443",
"key": "xxxxxxxxx",
"crypt": "aes-128",
"mode": "manual",
"mtu": 1400,
"sndwnd": 1024,
"rcvwnd": 1024,
"datashard": 30,
"parityshard": 15,
"dscp": 46,
"nocomp": true,
"acknodelay": false,
"nodelay": 0,
"interval": 20,
"resend": 2,
"nc": 1,
"sockbuf": 4194304,
"keepalive": 10
}
@xtaci 你的地址错了 https://hub.docker.com/r/xtaci/kcptun
kcptun使用分享
https://github.com/xtaci/kcptun/issues/646
1、编译kcptun,这一步需要在翻墙的状态下完成
2、将编译好的文件拷贝到远程的服务器上
3、vps上运行
4、你的机器上运行,win时(client_windows_amd64.exe)
5、运行ss客户端,连接本机127.0.0.1的1099
more see: 51pwn