From baac96fdd17448bae730442d2c7f6055a82fadbf Mon Sep 17 00:00:00 2001 From: nite07 Date: Tue, 12 Mar 2024 13:52:31 +0800 Subject: [PATCH 1/2] update: template --- template/tun-fakeip.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/tun-fakeip.json b/template/tun-fakeip.json index 8bca5f3..6747693 100644 --- a/template/tun-fakeip.json +++ b/template/tun-fakeip.json @@ -183,7 +183,7 @@ "type": "selector", "tag": "Bilibili", "outbounds": ["节点选择", "", "direct"], - "default": "节点选择", + "default": "direct", "interrupt_exist_connections": true }, { @@ -197,7 +197,7 @@ "type": "selector", "tag": "Games(中国)", "outbounds": ["节点选择", "", "direct"], - "default": "节点选择", + "default": "direct", "interrupt_exist_connections": true }, { From fe7988f8aab7fc867e89c6c57e1b00d67000f5ce Mon Sep 17 00:00:00 2001 From: nite07 Date: Tue, 12 Mar 2024 16:56:20 +0800 Subject: [PATCH 2/2] Add CLI commands and API documentation --- Readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Readme.md b/Readme.md index a6ef7fd..bbc9ff5 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,9 @@ # sub2sing-box +## Cli Command + +### convert + ``` Convert common proxy to sing-box proxy @@ -16,6 +20,8 @@ Flags: -t, --template string template file path ``` +### server + ``` Run the server @@ -27,6 +33,17 @@ Flags: -p, --port uint16 server port (default 8080) ``` +#### api + +##### GET /convert + +- `data`: Base64 编码的 JSON 字符串,包含以下字段: + - `subscription`: []string + - `proxy`: []string + - `delete`: string + - `rename`: string + - `template`: string + ## Template Template 中使用 `` 指明节点插入位置,例如