1
0
mirror of https://github.com/nitezs/sub2sing-box.git synced 2024-12-23 21:44:41 -05:00
sub2sing-box/README.md

64 lines
1.3 KiB
Markdown
Raw Normal View History

2024-03-19 01:55:31 -04:00
# sub2sing-box
2024-05-04 10:49:46 -04:00
## 控制台命令
2024-03-19 01:55:31 -04:00
2024-03-19 05:20:58 -04:00
- convert: 转换
- server: 启动 Web UI
- version: 版本信息
2024-03-19 01:55:31 -04:00
2024-03-19 05:20:58 -04:00
`sub2sing-box <command> -h` 查看帮助
2024-03-19 01:55:31 -04:00
2024-05-04 10:49:46 -04:00
## Api
2024-03-19 01:55:31 -04:00
2024-03-19 09:02:53 -04:00
### GET /convert?data=xxx
2024-03-19 01:55:31 -04:00
2024-05-04 10:49:46 -04:00
data 为 base64 URL 编码(将编码字符串中`/`替换为`_``+`替换为`-`)的 JSON 结构体,示例
2024-03-19 05:20:58 -04:00
2024-03-19 01:55:31 -04:00
```
{
2024-03-19 09:02:53 -04:00
"subscriptions": ["订阅地址1", "订阅地址2"],
"proxies": ["代理1", "代理2"],
2024-05-04 10:49:46 -04:00
"template": "模板路径/网络地址",
2024-03-19 09:02:53 -04:00
"delete": "",
"rename": {"原文本": "新文本"},
"group": false,
"group-type": "selector",
"sort": "name",
"sort-type": "asc"
2024-03-19 01:55:31 -04:00
}
```
2024-03-19 09:02:53 -04:00
## Template 占位符
2024-03-19 01:55:31 -04:00
2024-03-19 09:02:53 -04:00
- `<all-proxy-tags>`: 插入所有节点标签
```
{
"type": "selector",
"tag": "节点选择",
"outbounds": ["<all-proxy-tags>", "direct"],
"interrupt_exist_connections": true
}
```
- `<all-country-tags>`: 插入所有国家标签
```
{
"type": "selector",
"tag": "节点选择",
"outbounds": ["<all-country-tags>", "direct"],
"interrupt_exist_connections": true
}
```
- `<国家(地区)二字码>`: 插入国家(地区)所有节点标签,例如 `<tw>`
```
{
"type": "selector",
"tag": "巴哈姆特",
"outbounds": ["<tw>", "direct"],
"interrupt_exist_connections": true
}
```
2024-03-19 01:55:31 -04:00
## Docker
2024-03-19 05:20:58 -04:00
`docker run -p 8080:8080 nite07/sub2sing-box`