@@ -6,7 +6,7 @@ A modern, extensible proxy configuration conversion tool supporting conversion a
66
77- ** Multi-protocol support** : Supports Clash, Sing-box, V2Ray and other proxy configuration formats
88- ** Multi-source integration** : Supports integration of multiple input sources with unified interpolation rules ✨
9- - ** Unified input rules ** : Single source and multiple sources use the same ` --source ` parameter format ✨
9+ - ** URL-style source ** : Source uses standard URL form ` <path|url>?type=...&name=...&flag=... ` for easy extension ✨
1010- ** Powerful interpolation system** : Advanced template interpolation rules for complex node selection and filtering ✨
1111- ** Plugin architecture** : Easy to extend new protocol support
1212- ** Modern CLI** : User-friendly command line interface based on clap 4.x
@@ -37,16 +37,12 @@ cargo install --git https://github.com/your-username/proxy-convert.git
3737### Basic Usage
3838
3939``` bash
40- # Single source
41- proxy-convert convert \
42- --source " clash1@clash@./ clash.yaml "
40+ # Recommended: URL-style (path/url + query params)
41+ proxy-convert convert --source " ./clash.yaml?type=clash "
42+ proxy-convert convert --source " https://example.com/sub?type= clash&name=my&flag=clash " -o config.json
4343
44- # Multiple sources
45- proxy-convert convert \
46- --source " clash1@clash@./clash.yaml" \
47- --source " singbox1@sing-box@./singbox.json" \
48- --template template.json \
49- --output config.json
44+ # Legacy: name@type@source or type@source
45+ proxy-convert convert --source " clash1@clash@./clash.yaml" --source " singbox1@sing-box@./singbox.json" -o config.json
5046
5147# Validate config file
5248proxy-convert validate config.json
@@ -66,26 +62,23 @@ proxy-convert version
6662
6763This ensures consistent user experience regardless of whether you use a single input source or multiple input sources.
6864
69- ### Source Format
65+ ### Source Format (standard URL-style)
7066
71- ``` conf
72- name@ type@source
67+ ``` text
68+ <path|url>? type=clash&name=...&flag=...
7369```
7470
75- - ` name ` : Source name, used for template reference
76- - ` type ` : Subscription type ( clash/sing-box/v2ray/auto)
77- - ` source ` : File path or URL
71+ - Path or URL + ` ? ` and query params (standard URL): ` type ` (required), ` name ` (optional), ` flag ` (optional).
72+ - Examples: ` ./config.yaml? type= clash` , ` https://example.com/sub?type=clash&name=my&flag=clash `
73+ - Config file ` sources ` use the same format (list of such strings).
7874
7975### Examples
8076
8177``` bash
82- # File sources
83- --source " clash1@clash@./clash.yaml"
84- --source " singbox1@sing-box@./singbox.json"
85-
86- # URL sources
87- --source " sub1@clash@https://example.com/sub"
88- --source " v2ray1@v2ray@https://example.com/v2ray.txt"
78+ --source " ./clash.yaml?type=clash"
79+ --source " https://example.com/sub?type=clash&name=my&flag=clash"
80+ --source " examples/sources/Eternal Network?type=singbox"
81+ # With config: --config examples/config.yaml -o config.json
8982```
9083
9184## 📋 Interpolation Rules System
@@ -224,10 +217,7 @@ proxy-convert convert [OPTIONS] --source <SOURCE> [--source <SOURCE>...]
224217
225218** Arguments:**
226219
227- - ` --source <SOURCE> ` : Input source in format ` name@type@source `
228- - ` name ` : Source name, used for template reference
229- - ` type ` : Subscription type (clash/sing-box/v2ray/auto)
230- - ` source ` : File path or URL
220+ - ` --source <SOURCE> ` : Input source: ` <path|url>?type=...&name=...&flag=... ` (type required in query)
231221
232222** Options:**
233223
@@ -291,6 +281,10 @@ output_format: json
291281default_input_format : clash
292282default_output_format : singbox
293283template_dir : ~/.config/proxy-convert/templates
284+ # sources: same format as --source, e.g. ["path?type=clash&name=my"]
285+ # sources:
286+ # - "./clash.yaml?type=clash&name=clash1"
287+ # - "https://example.com/sub?type=singbox&name=sub1"
294288```
295289
296290### Environment Variables
@@ -341,7 +335,7 @@ The project supports multi-source integration with unified interpolation rules:
341335
342336#### 1. Input Source Management
343337
344- - **Unified format**: All sources use `name@ type@source` format
338+ - ** Source format** : ` <path|url>? type=...&name=...&flag=... ` (same for CLI and config)
345339- ** Type detection** : Automatic detection of clash, sing-box, v2ray formats
346340- ** Source naming** : Each source has a unique name for template reference
347341
0 commit comments