配置ubnt

开启硬件NAT

show ubnt offload
configure
set system offload hwnat enable
commit
save
sudo reboot
show ubnt offload

sudo su
configure
set service upnp2 wan pppoe0
set service upnp2 listen-on switch0
set service upnp2 nat-pmp enable
set service upnp2 secure-mode enable
commit
save
exit

安装Shadowsocks

https://github.com/imMMX/ubnt-mips-shadowsocks-libev

安装KCPTUN

set KCP_VER 20200701
set KCP_URL https://github.com/xtaci/kcptun/releases/download/v$KCP_VER/kcptun-linux-mipsle-$KCP_VER.tar.gz
wget $KCP_URL 
tar -zxvf kcptun-linux-mipsle-$KCP_VER.tar.gz
sudo mv client_linux_mipsle /usr/bin/kcptun_client
sudo vi /etc/systemd/system/kcptun.service
Description=kcptun

Wants=network.target
After=syslog.target network-online.target

[Service]
Type=simple
Environment=GOGC=20
ExecStart=/usr/bin/kcptun_client -c /etc/kcptun/config.json
Restart=on-failure
RestartSec=10
KillMode=process
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
sudo systemctl enable kcptun.service