mirror of
https://github.com/bestnite/sub2sing-box.git
synced 2025-10-24 16:21:01 +00:00
7f4ee70cb7dc46ccd0904c4c604a7162add20f21
sub2sing-box
Cli Command
convert
Convert common proxy to sing-box proxy
Usage:
convert [flags]
Flags:
-d, --delete string delete proxy with regex
-h, --help help for convert
-o, --output string output file path
-p, --proxy strings common proxies
-r, --rename stringToString rename proxy with regex (default [])
-s, --subscription strings subscription urls
-t, --template string template file path
server
Run the server
Usage:
server [flags]
Flags:
-h, --help help for server
-p, --port uint16 server port (default 8080)
api
GET /convert
data: Base64 编码的 JSON 字符串,包含以下字段:subscription: []stringproxy: []stringdelete: string 可选rename: string 可选template: map[string]string 可选
示例
{
"subscription": ["url1", "url2"],
"proxy": ["p1", "p2"],
"delete": "reg",
"template": "t",
"rename": {
"text": "replaceTo"
}
}
Template
Template 中使用 <all-proxy-tags> 指明节点插入位置,例如
{
"type": "selector",
"tag": "节点选择",
"outbounds": ["<all-proxy-tags>", "direct"],
"interrupt_exist_connections": true
},
Docker
docker run -p 8080:8080 nite07/sub2sing-box
Languages
Go
83.6%
HTML
15.8%
Dockerfile
0.4%
Shell
0.2%