SingBox 是一个基于 Singularity 的云服务器,用于构建容器化的应用。以下是一些基本的服务器设置步骤和内容,帮助你了解和配置SingBox

SingBox 是一个基于 Singularity 的云服务器,用于构建容器化的应用。以下是一些基本的服务器设置步骤和内容,帮助你了解和配置SingBox

毁灭者联盟 2026-10-07 网络梯子 2 次浏览 0个评论

选择云服务器

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 部分

SingBox 是一个基于 Singularity 的云服务器,用于构建容器化的应用。以下是一些基本的服务器设置步骤和内容,帮助你了解和配置SingBox

转载请注明来自快连加速器下载-下载快连 - 全平台客户端 | 高速安全网络连接 | 快连官网,本文标题:《SingBox 是一个基于 Singularity 的云服务器,用于构建容器化的应用。以下是一些基本的服务器设置步骤和内容,帮助你了解和配置SingBox》

每一天,每一秒,你所做的决定都会改变你的人生!