sing-box 是现代化通用网络代理引擎,支持 Shadowsocks、VMess、VLESS、Hysteria 2、TUIC、WireGuard 等几乎所有流行代理协议。凭借极低内存占用与强悍的路由扩展性,已成为许多高级极客首选的客户端。
一、各平台客户端版本说明
- Windows / macOS:使用
sing-box-gui或图形化封装客户端(如sing-box Graphical/Nekobox)。 - Android:官方 Google Play / GitHub 发布包
sing-box for Android。 - iOS / iPadOS:App Store 安装
sing-box(需非中国区 Apple ID)。
二、从零导入机场订阅
大多数机场均直接提供 sing-box 格式订阅链接,导入步骤非常简便:
- 复制订阅:在机场控制台找到
sing-box 订阅链接并复制。 - 打开客户端:
- 进入
Profiles(配置)页面。 - 点击
Add Profile(添加配置)。 - 类型选择
Remote(远程),粘贴订阅 URL。 - 勾选
Auto Update(自动更新,建议设为 24 小时)。
- 进入
- 启用 TUN 模式:
- 进入设置 -> 开启
TUN Mode(虚拟网卡全局拦截)。 - 授权客户端获取系统网卡权限。
- 进入设置 -> 开启
三、核心配置文件结构解析
一个标准的 sing-box 配置文件包含 5 大顶级节点:
{
"log": { "level": "info", "timestamp": true },
"dns": {
"servers": [
{ "tag": "dns_proxy", "address": "https://1.1.1.1/dns-query" },
{ "tag": "dns_direct", "address": "223.5.5.5", "detour": "direct" }
]
},
"inbounds": [
{ "type": "tun", "tag": "tun-in", "inet4_address": "172.19.0.1/30", "auto_route": true }
],
"outbounds": [
{ "type": "selector", "tag": "select", "outbounds": ["node-hk", "node-jp"] },
{ "type": "direct", "tag": "direct" }
],
"route": {
"rules": [
{ "protocol": "dns", "action": "hijack-dns" },
{ "geosite": "cn", "action": "route", "outbound": "direct" }
]
}
}
四、常见问题与排错
- iOS 上提示崩溃或无法连接?
检查 TUN 模式在系统的 VPN 权限设置,确保未与其他 VPN 软件同时开启。 - 如何查看实时连接日志?
进入Dashboard->Logs,查看是否有dns resolution error或协议加密报错。
* 点击复制包含绝对主地址的分享链接