bbr加速

wget --no-check-certificate -O tcp.sh https://github.com/cx9208/Linux-NetSpeed/raw/master/tcp.sh && chmod +x tcp.sh && ./tcp.sh

iptables中转脚本:

wget --no-check-certificate -qO natcfg.sh https://raw.githubusercontent.com/arloor/iptablesUtils/master/natcfg.sh && bash natcfg.sh

nftables-nat
Debian10-nat-vps皆可用

1.环境源安装

apt install -y wget

2.安装apt

apt install  -y nftables

3.下载可执行文件 分开执行下面2段代码

wget -O /usr/local/bin/nat http://cdn.arloor.com/tool/dnat
chmod +x /usr/local/bin/nat

4.创建systemd服务 复制下面整段代码即可

cat > /lib/systemd/system/nat.service <<EOF
[Unit]
Description=dnat-service
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/nat /etc/nat.conf
LimitNOFILE=100000
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target
EOF

5.设置开机启动,并启动该服务,分开执行下面2段代码

systemctl daemon-reload
systemctl enable nat

6.生成配置文件,配置文件可按需求修改,复制下面整段代码,可以修改下方需要转发端口IP再执行代码

cat > /etc/nat.conf <<EOF
SINGLE,49999,59999,baidu.com
RANGE,50000,50010,baidu.com
EOF

说明:多台转发就多复制一条转发命令
SINGLE:单端口转发:本机49999端口转发到baidu.com:59999
RANGE:范围端口转发:本机50000-50010转发到baidu.com:50000-50010
最后执行

systemctl start nat

执行中转规则

systemctl status nat

看是否安装成功结果等于1:sysctl net.ipv4.ip_forward

作者源仓:https://github.com/arloor/nftables-nat-rust

gost隧道搭建:
1.落地鸡安装+中转机安装gost

wget -N --no-check-certificate https://github.com/ginuerzh/gost/releases/download/v2.11.0/gost linux-amd64-2.11.0.gz && gzip -d gost-linux-amd64-2.11.0.gz
mv gost-linux-amd64-2.11.0 gost
chmod +x gost

2.中转命令
落地机命令(不用修改)

落地鸡:./gost -D -L "ws://:8080?path=/ws&rbuf=4096&wbuf=4096&compression=false"
中转机:./gost -L=:本地端口/落地IP:落地端口 -F=ws://落地IP:8080/ws

3.如果中转没启动设置下中转机的防火墙

centos防火墙关闭:    systemctl stop firewalld.service 
禁止开机启动:    systemctl disable firewalld.service 

4.安装 screen ,新建窗口运行,代码如下:

apt install screen     #Debian/Ubuntu系统
yum install screen     #centos系统
安装运行:screen -S gost
Last modification:January 5, 2022
如果觉得我的文章对你有用,请随意赞赏