设置SingBox节点的步骤如下
-
安装SingBox
- 下载并安装DEB包:
curl -L https://github.com/singbox/singbox/releases/download/v1.2./singbox_1.2.-1_amd64.deb sudo apt install -y singbox_1.2.-1_amd64.deb
- 启动服务并设置开机启动:
sudo systemctl start singbox sudo systemctl enable singbox
- 下载并安装DEB包:
-
配置SingBox
- 生成私钥并设置管理访问:
singbox generate -f
输入密码设置并确认。
- 设置管理访问权限:
singbox config --set management.default_access "read-write"
- 生成私钥并设置管理访问:
-
网络配置
- 指定网络接口:
singbox config --set network.interface "eth"
- 设置IP地址和网关:
singbox config --set network.ip "192.168.1.100/24" singbox config --set network.gateway "192.168.1.1"
- 启用IPv4和IPv6:
singbox config --set network.use_ipv4 true singbox config --set network.use_ipv6 true
- 指定网络接口:
-
存储配置
- 指定存储路径:
singbox config --set storage.path "/data/singbox"
- 分配存储空间:
singbox config --set storage.size "100G"
- 指定存储路径:
-
容器运行配置
- 设置运行目录:
singbox config --set runtime.working_dir "/data/singbox/run"
- 配置网络:
singbox config --set network.bridge "br" singbox config --set network.interface "eth"
- 设置端口转发(如需):
singbox config --set runtime.port_forward "true" singbox config --set runtime.port "808"
- 设置运行目录:
-
安全设置
- 设置防火墙规则:
singbox config --set security.firewall "allow_management:all" singbox config --set security.default_allow "false"
- 管理访问控制:
singbox config --set management.access "local:read-write"
- 设置防火墙规则:
-
启动容器
- 启动并设置为后台运行:
sudo singbox run -s
- 查看容器状态:
docker ps
- 进入容器查看日志:
docker exec -it singbox sh
- 启动并设置为后台运行:
-
验证网络
- 检查管理IP和其他节点:
ping 192.168.1.100
- 查看管理节点列表:
singbox manage list
- 检查管理IP和其他节点:
-
管理节点
- 使用管理界面或命令管理节点:
singbox manage
- 使用管理界面或命令管理节点:
通过以上步骤,你可以成功设置并配置SingBox节点,确保其安全、高效运行,遇到问题时,参考文档或社区求助。

@版权声明
转载原创文章请注明转载自原子VPN|多平台网络连接与线路优化工具,支持节点切换、网络测速及电脑手机端使用,满足不同网络环境下的连接需求,网站地址:https://yuanziapp.com.cn/