sing-box越过长城走向世界

不忘初心

​ 1987年,那封email告诉我们,Across the Great Wall we can reach every corner in the world”(“越过长城,走向世界”)。

​ 入手爪云后,勾起越过长城,走向世界的心。在此之前的越法参考iPhone配置socks代理,在本地服务器如192.168.1.25通过SSH代理,然后内网客户端浏览器设置特定代理访问,手机WiFi设置http代理访问。这一次,想找一款工具替代SSH、gost或Potatso的方式穿越。

选定工具

​ sing-box

​ 优点:简洁易用(入手后才易),全平台,免费,还可以隐藏VPN图标~~~;

​ 缺点:不易入手,并非不宜入手;LOGO略丑。

​ 官网地址:https://sing-box.sagernet.org/

​ 项目地址:https://github.com/SagerNet/sing-box

​ 第三方GUI:https://github.com/GUI-for-Cores/GUI.for.SingBox

​ sing-box 程序本身不区分客户端与服务端,区别在于JSON配置文件。

安装管理

1
bash <(curl -fsSL https://sing-box.app/rpm-install.sh)
Operation Command
Enable sudo systemctl enable sing-box
Disable sudo systemctl disable sing-box
Start sudo systemctl start sing-box
Stop sudo systemctl stop sing-box
Kill sudo systemctl kill sing-box
Restart sudo systemctl restart sing-box
Logs sudo journalctl -u sing-box --output cat -e
New Logs sudo journalctl -u sing-box --output cat -f

订阅转换

  1. 下载安装配置好python环境;
  2. 下载sing-box-subscribe-no-flask-2.8.0解压;
  3. 拷贝要转换的如http、ss链接替换文件providers.json里的url;
  4. CMD或powershell下执行python main.py,选择相应配置文件,最终生成config.json;
  5. 苹果手机安装sing-box后导入config.json。

一个小坑

WIN平台用的是第三方GUI,导入订阅链接或设置单个链接后,一直无法启动。提示:

1
fork/exec data/sing-box/sing-box.exe: The system cannot find the file specified.

解决方法是使用前需要先更新一下内核。打开GUI.for.SingBox,设置,点击最右侧更新。

1
2
本地:无核心 远程:1.11.3 更新:1.11.3
local: Core Not Found Remote:1.11.3 Update:1.11.3