diff --git a/docs/configuration/outbound/index.md b/docs/configuration/outbound/index.md index 0b915450..059bb985 100644 --- a/docs/configuration/outbound/index.md +++ b/docs/configuration/outbound/index.md @@ -20,6 +20,8 @@ | `socks` | [Socks](./socks) | | `http` | [HTTP](./http) | | `shadowsocks` | [Shadowsocks](./shadowsocks) | +| `selector` | [Selector](./selector) | +| `urltest` | [URLTest](./urltest) | #### tag diff --git a/docs/configuration/outbound/selector.md b/docs/configuration/outbound/selector.md new file mode 100644 index 00000000..7f20d87b --- /dev/null +++ b/docs/configuration/outbound/selector.md @@ -0,0 +1,35 @@ +### Structure + +```json +{ + "outbounds": [ + { + "type": "selector", + "tag": "select", + + "outbounds": [ + "proxy-a", + "proxy-b", + "proxy-c" + ], + "default": "proxy-c" + } + ] +} +``` + +!!! error "" + + The selector can only be controlled through the [Clash API](/configuration/experimental#clash-api-fields) currently. + +### Fields + +#### outbounds + +==Required== + +List of outbound tags to select. + +#### default + +The default outbound tag. The first outbound will be used if empty. \ No newline at end of file diff --git a/docs/configuration/outbound/urltest.md b/docs/configuration/outbound/urltest.md new file mode 100644 index 00000000..b960f757 --- /dev/null +++ b/docs/configuration/outbound/urltest.md @@ -0,0 +1,41 @@ +### Structure + +```json +{ + "outbounds": [ + { + "type": "urltest", + "tag": "auto", + + "outbounds": [ + "proxy-a", + "proxy-b", + "proxy-c" + ], + "url": "http://www.gstatic.com/generate_204", + "interval": "1m", + "tolerance": 50 + } + ] +} +``` + +### Fields + +#### outbounds + +==Required== + +List of outbound tags to test. + +#### url + +The URL to test. `http://www.gstatic.com/generate_204` will be used if empty. + +#### interval + +The test interval. `1m` will be used if empty. + +#### tolerance + +The test tolerance in milliseconds. `50` will be used if empty. diff --git a/docs/index.md b/docs/index.md index 1d18fa86..17879dd6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,10 +18,10 @@ Install with options: go install -v -tags "with_clash_api,no_gvisor" github.com/sagernet/sing-box/cmd/sing-box@latest ``` -| Build Tag | Description | -|------------------|-----------------------------------------------------------------------------------------| -| `with_clash_api` | Build with clash api support, see [Experimental](./configuration/experimental). | -| `no_gvisor` | Build without gVisor, which required by the [Tun](./configuration/inbound/tun) inbound. | +| Build Tag | Description | +|------------------|--------------------------------------------------------------------------------------------------| +| `with_clash_api` | Build with clash api support, see [Experimental](./configuration/experimental#clash-api-fields). | +| `no_gvisor` | Build without gVisor, which required by the [Tun](./configuration/inbound/tun) inbound. | The binary is built under $GOPATH/bin diff --git a/mkdocs.yml b/mkdocs.yml index 2deef2e3..afc38471 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -56,6 +56,8 @@ nav: - Socks: configuration/outbound/socks.md - HTTP: configuration/outbound/http.md - Shadowsocks: configuration/outbound/shadowsocks.md + - Selector: configuration/outbound/selector.md + - URLTest: configuration/outbound/urltest.md - Route: - configuration/route/index.md - GeoIP: configuration/route/geoip.md