https://github.com/mmmdbybyd/CNS

一键搭建cns

安装

wget http://binary.quicknet.cyou/cns/cns.sh && chmod +x cns.sh && ./cns.sh 

卸载

wget http://binary.quicknet.cyou/cns/cns.sh && chmod +x cns.sh && ./cns.sh  uninstall  

启动命令

./cns -daemon=true -json=cns.json

https://github.com/AiziChen/CNS

下载

wget https://github.com/AiziChen/CNS/releases/download/v0.2.4/cns-linux-amd64
mv cns-linux-amd64 /usr/bin/
chmod +x /usr/bin/cns-linux-amd64

创建配置文件/etc/cns-config.cfg

proxyKey = Meng
udpFlag = httpUDP
listenAddr = :443
password = yourpassword
udpTimeout = 30
tcpKeepAlive = 60
pidPath = cns.pid
enableDnsTcpOverUdp = #t
enableHttpDNS = #t
enableTFO = #t

客户端需要用到的是服务器的IP:端口号、密码

设置开机自动启动

echo "[Unit]
Description=cns
After=network.service

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/cns-linux-amd64 -config-file=/etc/cns-config.cfg -daemon
PrivateTmp=true
Restart=on-failure

[Install]
WantedBy=multi-user.target" > /etc/systemd/system/cns.service

管理cns

systemctl daemon-reload
systemctl enable cns.service
systemctl start cns.service

客户端使用

可以配合 https://github.com/mmmdbybyd/CLNC

百度直连+cns可实现电信联通免流,本站下载 clnc_1.1.1.zip 、 ZJL2.0beta30_clnc_baidu_magisk.zip