Add documentation for selector/urltest outbound

This commit is contained in:
世界 2022-07-22 14:07:27 +08:00
parent c4e46c35b5
commit e5e24ef51d
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
5 changed files with 84 additions and 4 deletions

View File

@ -20,6 +20,8 @@
| `socks` | [Socks](./socks) |
| `http` | [HTTP](./http) |
| `shadowsocks` | [Shadowsocks](./shadowsocks) |
| `selector` | [Selector](./selector) |
| `urltest` | [URLTest](./urltest) |
#### tag

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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