diff --git a/apps/sub2sing-box/0.0.3/.env.sample b/apps/sub2sing-box/0.0.3/.env.sample new file mode 100644 index 00000000..ad4cdb4a --- /dev/null +++ b/apps/sub2sing-box/0.0.3/.env.sample @@ -0,0 +1,3 @@ +CONTAINER_NAME="sub2sing-box" +PANEL_APP_PORT_HTTP="40220" + diff --git a/apps/sub2sing-box/0.0.3/data.yml b/apps/sub2sing-box/0.0.3/data.yml new file mode 100644 index 00000000..2e31485b --- /dev/null +++ b/apps/sub2sing-box/0.0.3/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 40220 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/sub2sing-box/0.0.3/docker-compose.yml b/apps/sub2sing-box/0.0.3/docker-compose.yml new file mode 100644 index 00000000..00e23064 --- /dev/null +++ b/apps/sub2sing-box/0.0.3/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + sub2sing-box: + image: nite07/sub2sing-box:0.0.3 + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8080" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/sub2sing-box/README.md b/apps/sub2sing-box/README.md new file mode 100644 index 00000000..c50aa06d --- /dev/null +++ b/apps/sub2sing-box/README.md @@ -0,0 +1,63 @@ +# sub2sing-box + +## cli + +- convert: 转换 +- server: 启动 Web UI +- version: 版本信息 + +`sub2sing-box -h` 查看帮助 + +## api + +### GET /convert?data=xxx + +data 为 base64 URL 编码的请求体,示例 + +``` +{ + "subscriptions": ["订阅地址1", "订阅地址2"], + "proxies": ["代理1", "代理2"], + "template": "模板路径", + "delete": "", + "rename": {"原文本": "新文本"}, + "group": false, + "group-type": "selector", + "sort": "name", + "sort-type": "asc" +} +``` + +## Template 占位符 + +- ``: 插入所有节点标签 + ``` + { + "type": "selector", + "tag": "节点选择", + "outbounds": ["", "direct"], + "interrupt_exist_connections": true + } + ``` +- ``: 插入所有国家标签 + ``` + { + "type": "selector", + "tag": "节点选择", + "outbounds": ["", "direct"], + "interrupt_exist_connections": true + } + ``` +- `<国家(地区)二字码>`: 插入国家(地区)所有节点标签,例如 `` + ``` + { + "type": "selector", + "tag": "巴哈姆特", + "outbounds": ["", "direct"], + "interrupt_exist_connections": true + } + ``` + +## Docker + +`docker run -p 8080:8080 nite07/sub2sing-box` \ No newline at end of file diff --git a/apps/sub2sing-box/data.yml b/apps/sub2sing-box/data.yml new file mode 100644 index 00000000..284bdebe --- /dev/null +++ b/apps/sub2sing-box/data.yml @@ -0,0 +1,19 @@ +name: sub2sing-box +tags: + - 工具 +title: 将节点和订阅转换为 sing-box 配置 +description: 将节点和订阅转换为 sing-box 配置 +additionalProperties: + key: sub2sing-box + name: sub2sing-box + tags: + - Tool + shortDescZh: 将节点和订阅转换为 sing-box 配置 + shortDescEn: Converting nodes and subscriptions to sing-box configuration + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://singbox.nite07.com/ + github: https://github.com/nitezs/sub2sing-box + document: https://github.com/nitezs/sub2sing-box diff --git a/apps/sub2sing-box/latest/.env.sample b/apps/sub2sing-box/latest/.env.sample new file mode 100644 index 00000000..ad4cdb4a --- /dev/null +++ b/apps/sub2sing-box/latest/.env.sample @@ -0,0 +1,3 @@ +CONTAINER_NAME="sub2sing-box" +PANEL_APP_PORT_HTTP="40220" + diff --git a/apps/sub2sing-box/latest/data.yml b/apps/sub2sing-box/latest/data.yml new file mode 100644 index 00000000..2e31485b --- /dev/null +++ b/apps/sub2sing-box/latest/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 40220 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/sub2sing-box/latest/docker-compose.yml b/apps/sub2sing-box/latest/docker-compose.yml new file mode 100644 index 00000000..fe3dd89c --- /dev/null +++ b/apps/sub2sing-box/latest/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + sub2sing-box: + image: nite07/sub2sing-box:latest + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8080" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/sub2sing-box/logo.png b/apps/sub2sing-box/logo.png new file mode 100644 index 00000000..9cec3e62 Binary files /dev/null and b/apps/sub2sing-box/logo.png differ