Sign inSign up

nemobb/singbox-config

By nemobb

Updated over 1 year ago

singbox config generate

Image
API management
0

334

nemobb/singbox-config repository overview

singbox-config

singbox config generate

Usage
本地节点配置模版custom.json
{
  "custom": {
    "name": "CustomName",
    "nodes": [
      "vless://uuid@host:port?encryption=none&flow=xtls-rprx-vision&security=tls&sni=sni&fp=chrome&type=tcp&headerType=none#Remark"
    ]
  },
  "subscriptions": [
    {
      "name": "GroupName",
      "url": "https://domain/path"
    }
  ]
}
  • custom.namesubscriptions[].name不可以重复,用于节点分组
  • custom.nodes填写节点配置信息
  • subscriptions[].url填写订阅链接
获取配置文件
  • 启动服务npm run start后通过http://localhost:5300进行访问
  • 访问/api/singbox会根据根目录下config.json中的节点配置生成
  • 访问/api/singbox?profile=hello会根据根目录下的hello.json中节点配置生成
  • 访问/api/singbox?template=template会根据根目录下的template.json中配置模版生成
  • 访问/api/singbox/sub?name=${groupName}&url=${sub}&name=${groupName2}&url=${sub2}会根据参数中的订阅链接生成groupNamesub需要用encodeURIComponent进行编码
在docker中运行
# 通过请求参数生成配置
docker run -d -p 5300:5300 nemobb/singbox-config:latest
# 通过本地文件生成配置
docker run -d -p 5300:5300 -v ~/hello.json:/app/hello.json nemobb/singbox-config:latest
# 使用自定义节点配置
curl http://localhost:5300/api/singbox?profile=hello
# 使用自定义节点配置和自定义模版
curl http://localhost:5300/api/singbox?profile=hello&template=template

Tag summary

Content type

Image

Digest

sha256:5939574d9

Size

42.8 MB

Last updated

over 1 year ago

docker pull nemobb/singbox-config