选择云服务器
SingBox 通常使用 Singularity 或 Singulog 作为云服务器,但 Singulog 已经废弃,以下是常见的 SingBox 服务器配置:
-
Singularity :
- 云服务器地址:
http://localhost:31438(默认) - 地址:
http://localhost:31438(如果使用 Singulog,地址会略有不同)
- 云服务器地址:
-
Node.js 服务器 :
- 服务器地址:
http://localhost:31281(默认) - 地址:
http://localhost:31281
- 服务器地址:
配置 SingBox 作为云服务器
在 Singulog 中:
- 打开
singbox.conf文件:cd /path/to/singbox cp singbox.conf singbox.conf.conf
- 打开
singbox.json文件:cd /path/to/singbox cp singbox.json singbox.json.conf
- 确保配置文件中包含以下内容:
singbox.name: 服务器名称singbox.vpc: 端点信息singbox.host: 云服务器的 IP 地址singbox.ip: 本地的 IP 地址singbox.ip-remote: 远端的 IP 地址singbox.port: 云服务器的端口(默认:31438)
配置服务配置
在 Singulog 中:
- 打开
singbox.service文件:cd /path/to/singbox cp singbox.service singbox.service.conf
- 在
singbox.service.conf文件中:singbox.name: 服务器名称singbox.on:server:started: 服务启动时的设置(如启动时间)singbox.on:server:stopped: 服务停止时的设置singbox.on:container:started: 容器启动时的设置singbox.on:container:stopped: 容器停止时的设置singbox.on:request:started: 请求启动时的设置singbox.on:request:stopped: 请求停止时的设置singbox.on:log:started: 日志启动时的设置singbox.on:log:stopped: 日志停止时的设置
应用配置
在 Singulog 中:
- 打开
singbox.app文件:cd /path/to/singbox/app cp singbox.app singbox.app.conf
- 在
singbox.app.conf文件中:singbox.name: 项目名称singbox.description: 项目描述singbox标签: 标签singbox.state: 项目状态(active, started, stopped)
应用配置文件
Singbox 提供两个主要的应用配置文件:
- singbox.app.conf:用于项目管理。
- singbox.app.json:用于数据存储。
数据配置
在 Singulog 中:
- 打开
singbox.data文件:cd /path/to/singbox/data cp singbox.data singbox.data.conf
- 在
singbox.data.conf文件中:singbox.name: 项目名称singbox.db.path: 数据库路径singbox.db.type: 数据类型(PostgreSQL、MongoDB 等)singbox.db.host: 数据库的 IP 地址singbox.db.port: 数据库的端口singbox.db.dbtype: 数据库的类型(如 'post' 表示 PostgreSQL)
API 配置
在 Singulog 中:
- 打开
singbox.api文件:cd /path/to/singbox.api cp singbox.api singbox.api.conf
- 在
singbox.api.conf文件中:singbox.name: 服务名称singbox.on:request:started: API 服务启动时的设置singbox.on:request:stopped: API 服务停止时的设置singbox.on:log:started: API 日志启动时的设置singbox.on:log:stopped: API 日志停止时的设置singbox.on:request:started:controller: 服务启动时的 controller 部分singbox.on:request:stopped:controller: 服务停止时的 controller 部分
容器配置
在 Singulog 中:
- 打开
singbox.container文件:cd /path/to/singbox/container cp singbox.container singbox.container.conf
- 在
singbox.container.conf文件中:singbox.name: 服务名称singbox.on:container:started: 容器启动时的设置singbox.on:container:stopped: 容器停止时的设置singbox.on:log:started: 容器日志启动时的设置singbox.on:log:stopped: 容器日志停止时的设置
安全配置
在 Singulog 中:
- 打开
singbox.security文件:cd /path/to/singbox.security cp singbox.security singbox.security.conf
- 在
singbox.security.conf文件中:singbox.name: 服务名称singbox.on:request:started:security: 服务启动时的 security 部分singbox.on:request:stopped:security: 服务停止时的 security 部分singbox.on:log:started:security: 日志启动时的 security 部分singbox.on:log:stopped:security: 日志停止时的 security 部分







京公网安备11000000000001号
京ICP备11000001号