Refactor outbound documentation

This commit is contained in:
世界 2022-08-31 13:21:29 +08:00
parent 426b677eb8
commit bda34fdb3b
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
29 changed files with 333 additions and 1567 deletions

View file

@ -8,8 +8,8 @@ sing-box uses JSON for configuration files.
{ {
"log": {}, "log": {},
"dns": {}, "dns": {},
"inbounds": {}, "inbounds": [],
"outbounds": {}, "outbounds": [],
"route": {}, "route": {},
"experimental": {} "experimental": {}
} }

View file

@ -8,8 +8,8 @@ sing-box 使用 JSON 作为配置文件格式。
{ {
"log": {}, "log": {},
"dns": {}, "dns": {},
"inbounds": {}, "inbounds": [],
"outbounds": {}, "outbounds": [],
"route": {}, "route": {},
"experimental": {} "experimental": {}
} }

View file

@ -4,12 +4,8 @@
```json ```json
{ {
"outbounds": [ "type": "block",
{ "tag": "block"
"type": "block",
"tag": "block"
}
]
} }
``` ```

View file

@ -4,12 +4,8 @@
```json ```json
{ {
"outbounds": [ "type": "block",
{ "tag": "block"
"type": "block",
"tag": "block"
}
]
} }
``` ```

View file

@ -4,30 +4,18 @@
```json ```json
{ {
"outbounds": [ "type": "direct",
{ "tag": "direct-out",
"type": "direct",
"tag": "direct-out", "override_address": "1.0.0.1",
"override_port": 53,
"override_address": "1.0.0.1", "proxy_protocol": 0,
"override_port": 53,
"proxy_protocol": 0, ... // Dial Fields
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### Direct Fields ### Fields
#### override_address #### override_address
@ -45,54 +33,4 @@ Protocol value can be `1` or `2`.
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the requested domain name will be resolved to IP before connect.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -4,30 +4,18 @@
```json ```json
{ {
"outbounds": [ "type": "direct",
{ "tag": "direct-out",
"type": "direct",
"tag": "direct-out", "override_address": "1.0.0.1",
"override_port": 53,
"override_address": "1.0.0.1", "proxy_protocol": 0,
"override_port": 53,
"proxy_protocol": 0, ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### Direct 字段 ### 字段
#### override_address #### override_address
@ -45,51 +33,4 @@
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,域名将在请求发出之前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -4,12 +4,8 @@
```json ```json
{ {
"outbounds": [ "type": "dns",
{ "tag": "dns-out"
"type": "dns",
"tag": "dns-out"
}
]
} }
``` ```

View file

@ -4,12 +4,8 @@
```json ```json
{ {
"outbounds": [ "type": "dns",
{ "tag": "dns-out"
"type": "dns",
"tag": "dns-out"
}
]
} }
``` ```

View file

@ -4,32 +4,20 @@
```json ```json
{ {
"outbounds": [ "type": "http",
{ "tag": "http-out",
"type": "http",
"tag": "http-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "username": "sekai",
"server_port": 1080, "password": "admin",
"username": "sekai", "tls": {},
"password": "admin",
"tls": {}, ... // Dial Fields
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### HTTP Fields ### Fields
#### server #### server
@ -57,54 +45,4 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -4,32 +4,20 @@
```json ```json
{ {
"outbounds": [ "type": "http",
{ "tag": "http-out",
"type": "http",
"tag": "http-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "username": "sekai",
"server_port": 1080, "password": "admin",
"username": "sekai", "tls": {},
"password": "admin",
"tls": {}, ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### HTTP 字段 ### 字段
#### server #### server
@ -57,51 +45,4 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,37 +2,25 @@
```json ```json
{ {
"outbounds": [ "type": "hysteria",
{ "tag": "hysteria-out",
"type": "hysteria",
"tag": "hysteria-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "up": "100 Mbps",
"server_port": 1080, "up_mbps": 100,
"down": "100 Mbps",
"up": "100 Mbps", "down_mbps": 100,
"up_mbps": 100, "obfs": "fuck me till the daylight",
"down": "100 Mbps", "auth": "",
"down_mbps": 100, "auth_str": "password",
"obfs": "fuck me till the daylight", "recv_window_conn": 0,
"auth": "", "recv_window": 0,
"auth_str": "password", "disable_mtu_discovery": false,
"recv_window_conn": 0, "network": "tcp",
"recv_window": 0, "tls": {},
"disable_mtu_discovery": false,
"network": "tcp", ... // Dial Fields
"tls": {},
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
@ -40,7 +28,7 @@
QUIC, which is required by hysteria is not included by default, see [Installation](/#installation). QUIC, which is required by hysteria is not included by default, see [Installation](/#installation).
### Hysteria Fields ### Fields
#### server #### server
@ -125,54 +113,4 @@ Both is enabled by default.
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -2,37 +2,25 @@
```json ```json
{ {
"outbounds": [ "type": "hysteria",
{ "tag": "hysteria-out",
"type": "hysteria",
"tag": "hysteria-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "up": "100 Mbps",
"server_port": 1080, "up_mbps": 100,
"down": "100 Mbps",
"up": "100 Mbps", "down_mbps": 100,
"up_mbps": 100, "obfs": "fuck me till the daylight",
"down": "100 Mbps", "auth": "",
"down_mbps": 100, "auth_str": "password",
"obfs": "fuck me till the daylight", "recv_window_conn": 0,
"auth": "", "recv_window": 0,
"auth_str": "password", "disable_mtu_discovery": false,
"recv_window_conn": 0, "network": "tcp",
"recv_window": 0, "tls": {},
"disable_mtu_discovery": false,
"network": "tcp", ... // 拨号字段
"tls": {},
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
@ -40,7 +28,7 @@
默认安装不包含被 Hysteria 依赖的 QUIC参阅 [安装](/zh/#_2)。 默认安装不包含被 Hysteria 依赖的 QUIC参阅 [安装](/zh/#_2)。
### Hysteria 字段 ### 字段
#### server #### server
@ -123,51 +111,4 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,19 +2,15 @@
```json ```json
{ {
"type": "selector",
"tag": "select",
"outbounds": [ "outbounds": [
{ "proxy-a",
"type": "selector", "proxy-b",
"tag": "select", "proxy-c"
],
"outbounds": [ "default": "proxy-c"
"proxy-a",
"proxy-b",
"proxy-c"
],
"default": "proxy-c"
}
]
} }
``` ```

View file

@ -2,19 +2,15 @@
```json ```json
{ {
"type": "selector",
"tag": "select",
"outbounds": [ "outbounds": [
{ "proxy-a",
"type": "selector", "proxy-b",
"tag": "select", "proxy-c"
],
"outbounds": [ "default": "proxy-c"
"proxy-a",
"proxy-b",
"proxy-c"
],
"default": "proxy-c"
}
]
} }
``` ```

View file

@ -2,34 +2,22 @@
```json ```json
{ {
"outbounds": [ "type": "shadowsocks",
{ "tag": "ss-out",
"type": "shadowsocks",
"tag": "ss-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "method": "2022-blake3-aes-128-gcm",
"server_port": 1080, "password": "8JCsPssfgS8tiRwiMlhARg==",
"method": "2022-blake3-aes-128-gcm", "network": "udp",
"password": "8JCsPssfgS8tiRwiMlhARg==", "udp_over_tcp": false,
"network": "udp", "multiplex": {},
"udp_over_tcp": false,
"multiplex": {}, ... // Dial Fields
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### Shadowsocks Fields ### Fields
#### server #### server
@ -97,54 +85,4 @@ Multiplex configuration, see [Multiplex](/configuration/shared/multiplex).
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -1,35 +1,23 @@
### Structure ### 结构
```json ```json
{ {
"outbounds": [ "type": "shadowsocks",
{ "tag": "ss-out",
"type": "shadowsocks",
"tag": "ss-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "method": "2022-blake3-aes-128-gcm",
"server_port": 1080, "password": "8JCsPssfgS8tiRwiMlhARg==",
"method": "2022-blake3-aes-128-gcm", "network": "udp",
"password": "8JCsPssfgS8tiRwiMlhARg==", "udp_over_tcp": false,
"network": "udp", "multiplex": {},
"udp_over_tcp": false,
"multiplex": {}, ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### Shadowsocks 字段 ### 字段
#### server #### server
@ -97,51 +85,4 @@ Shadowsocks 密码。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -4,34 +4,22 @@
```json ```json
{ {
"outbounds": [ "type": "socks",
{ "tag": "socks-out",
"type": "socks",
"tag": "socks-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "version": "5",
"server_port": 1080, "username": "sekai",
"version": "5", "password": "admin",
"username": "sekai", "network": "udp",
"password": "admin", "udp_over_tcp": false,
"network": "udp",
"udp_over_tcp": false,
"detour": "upstream-out", ... // Dial Fields
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### SOCKS Fields ### Fields
#### server #### server
@ -73,54 +61,4 @@ Enable the UDP over TCP protocol.
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -1,37 +1,25 @@
`socks` 出站是 socks4/socks4a/socks5 客户端 `socks` 出站是 socks4/socks4a/socks5 客户端
### Structure ### 结构
```json ```json
{ {
"outbounds": [ "type": "socks",
{ "tag": "socks-out",
"type": "socks",
"tag": "socks-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "version": "5",
"server_port": 1080, "username": "sekai",
"version": "5", "password": "admin",
"username": "sekai", "network": "udp",
"password": "admin", "udp_over_tcp": false,
"network": "udp",
"udp_over_tcp": false,
"detour": "upstream-out", ... // 拨号字段
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### SOCKS 字段 ### 字段
#### server #### server
@ -73,51 +61,4 @@ SOCKS5 密码。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,36 +2,24 @@
```json ```json
{ {
"outbounds": [ "type": "ssh",
{ "tag": "ssh-out",
"type": "ssh",
"tag": "ssh-out", "server": "127.0.0.1",
"server_port": 22,
"server": "127.0.0.1", "user": "root",
"server_port": 22, "password": "admin",
"user": "root", "private_key": "",
"password": "admin", "private_key_path": "$HOME/.ssh/id_rsa",
"private_key": "", "private_key_passphrase": "",
"private_key_path": "$HOME/.ssh/id_rsa", "host_key_algorithms": [],
"private_key_passphrase": "", "client_version": "SSH-2.0-OpenSSH_7.4p1",
"host_key_algorithms": [],
"client_version": "SSH-2.0-OpenSSH_7.4p1", ... // Dial Fields
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### SSH Fields ### Fields
#### server #### server
@ -73,54 +61,4 @@ Client version. Random version will be used if empty.
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -1,37 +1,25 @@
### Structure ### 结构
```json ```json
{ {
"outbounds": [ "type": "ssh",
{ "tag": "ssh-out",
"type": "ssh",
"tag": "ssh-out", "server": "127.0.0.1",
"server_port": 22,
"server": "127.0.0.1", "user": "root",
"server_port": 22, "password": "admin",
"user": "root", "private_key": "",
"password": "admin", "private_key_path": "$HOME/.ssh/id_rsa",
"private_key": "", "private_key_passphrase": "",
"private_key_path": "$HOME/.ssh/id_rsa", "host_key_algorithms": [],
"private_key_passphrase": "", "client_version": "SSH-2.0-OpenSSH_7.4p1",
"host_key_algorithms": [],
"client_version": "SSH-2.0-OpenSSH_7.4p1", ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### SSH 字段 ### 字段
#### server #### server
@ -73,51 +61,4 @@ SSH 用户, 默认使用 root。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,29 +2,17 @@
```json ```json
{ {
"outbounds": [ "type": "tor",
{ "tag": "tor-out",
"type": "tor",
"tag": "tor-out", "executable_path": "/usr/bin/tor",
"extra_args": [],
"executable_path": "/usr/bin/tor", "data_directory": "$HOME/.cache/tor",
"extra_args": [], "torrc": {
"data_directory": "$HOME/.cache/tor", "ClientOnly": 1
"torrc": { },
"ClientOnly": 1
}, ... // Dial Fields
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
@ -32,7 +20,7 @@
Embedded tor is not included by default, see [Installation](/#installation). Embedded tor is not included by default, see [Installation](/#installation).
### Tor Fields ### Fields
#### executable_path #### executable_path
@ -56,58 +44,8 @@ Each start will be very slow if not specified.
Map of torrc options. Map of torrc options.
See [tor(1)](https://linux.die.net/man/1/tor) See [tor(1)](https://linux.die.net/man/1/tor) for details.
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -2,29 +2,17 @@
```json ```json
{ {
"outbounds": [ "type": "tor",
{ "tag": "tor-out",
"type": "tor",
"tag": "tor-out", "executable_path": "/usr/bin/tor",
"extra_args": [],
"executable_path": "/usr/bin/tor", "data_directory": "$HOME/.cache/tor",
"extra_args": [], "torrc": {
"data_directory": "$HOME/.cache/tor", "ClientOnly": 1
"torrc": { },
"ClientOnly": 1
}, ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
@ -32,7 +20,7 @@
默认安装不包含嵌入式 Tor, 参阅 [安装](/zh/#_2)。 默认安装不包含嵌入式 Tor, 参阅 [安装](/zh/#_2)。
### Tor 字段 ### 字段
#### executable_path #### executable_path
@ -60,51 +48,4 @@ torrc 参数表。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,34 +2,22 @@
```json ```json
{ {
"outbounds": [ "type": "trojan",
{ "tag": "trojan-out",
"type": "trojan",
"tag": "trojan-out",
"server": "127.0.0.1",
"server_port": 1080,
"password": "8JCsPssfgS8tiRwiMlhARg==",
"network": "tcp",
"tls": {},
"multiplex": {},
"transport": {},
"detour": "upstream-out", "server": "127.0.0.1",
"bind_interface": "en0", "server_port": 1080,
"bind_address": "0.0.0.0", "password": "8JCsPssfgS8tiRwiMlhARg==",
"routing_mark": 1234, "network": "tcp",
"reuse_addr": false, "tls": {},
"connect_timeout": "5s", "multiplex": {},
"tcp_fast_open": false, "transport": {},
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms" ... // Dial Fields
}
]
} }
``` ```
### Trojan Fields ### Fields
#### server #### server
@ -71,54 +59,4 @@ V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -2,34 +2,22 @@
```json ```json
{ {
"outbounds": [ "type": "trojan",
{ "tag": "trojan-out",
"type": "trojan",
"tag": "trojan-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "password": "8JCsPssfgS8tiRwiMlhARg==",
"server_port": 1080, "network": "tcp",
"password": "8JCsPssfgS8tiRwiMlhARg==", "tls": {},
"network": "tcp", "multiplex": {},
"tls": {}, "transport": {},
"multiplex": {},
"transport": {},
"detour": "upstream-out", ... // 拨号字段
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### Trojan 字段 ### 字段
#### server #### server
@ -71,51 +59,4 @@ V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-tra
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,39 +2,27 @@
```json ```json
{ {
"outbounds": [ "type": "vmess",
{ "tag": "vmess-out",
"type": "vmess",
"tag": "vmess-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
"server_port": 1080, "security": "auto",
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661", "alter_id": 0,
"security": "auto", "global_padding": false,
"alter_id": 0, "authenticated_length": true,
"global_padding": false, "network": "tcp",
"authenticated_length": true, "tls": {},
"network": "tcp", "packet_addr": false,
"tls": {}, "multiplex": {},
"packet_addr": false, "transport": {},
"multiplex": {},
"transport": {},
"detour": "upstream-out", ... // Dial Fields
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### VMess Fields ### Fields
#### server #### server
@ -110,54 +98,4 @@ V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -2,39 +2,27 @@
```json ```json
{ {
"outbounds": [ "type": "vmess",
{ "tag": "vmess-out",
"type": "vmess",
"tag": "vmess-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
"server_port": 1080, "security": "auto",
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661", "alter_id": 0,
"security": "auto", "global_padding": false,
"alter_id": 0, "authenticated_length": true,
"global_padding": false, "network": "tcp",
"authenticated_length": true, "tls": {},
"network": "tcp", "packet_addr": false,
"tls": {}, "multiplex": {},
"packet_addr": false, "transport": {},
"multiplex": {},
"transport": {}, ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
### VMess 字段 ### 字段
#### server #### server
@ -110,51 +98,4 @@ V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-tra
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -2,34 +2,22 @@
```json ```json
{ {
"outbounds": [ "type": "wireguard",
{ "tag": "wireguard-out",
"type": "wireguard",
"tag": "wireguard-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "local_address": [
"server_port": 1080, "10.0.0.1",
"local_address": [ "10.0.0.2/32"
"10.0.0.1", ],
"10.0.0.2/32" "private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=",
], "peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=",
"private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=", "pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=",
"peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=", "mtu": 1408,
"pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=", "network": "tcp",
"mtu": 1408,
"network": "tcp", ... // Dial Fields
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
@ -37,7 +25,7 @@
WireGuard is not included by default, see [Installation](/#installation). WireGuard is not included by default, see [Installation](/#installation).
### WireGuard Fields ### Fields
#### server #### server
@ -92,54 +80,4 @@ Both is enabled by default.
### Dial Fields ### Dial Fields
#### detour See [Dial Fields](/configuration/shared/dial) for details.
The tag of the upstream outbound.
Other dial fields will be ignored when enabled.
#### bind_interface
The network interface to bind to.
#### bind_address
The address to bind to.
#### routing_mark
!!! error ""
Only supported on Linux.
Set netfilter routing mark.
#### reuse_addr
Reuse listener address.
#### connect_timeout
Connect timeout, in golang's Duration format.
A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", "-1.5h" or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the server domain name will be resolved to IP before connecting.
`dns.strategy` will be used if empty.
#### fallback_delay
The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
That is, is the amount of time to wait for IPv6 to succeed before assuming
that IPv6 is misconfigured and falling back to IPv4 if `prefer_ipv4` is set.
If zero, a default delay of 300ms is used.
Only take effect when `domain_strategy` is `prefer_ipv4` or `prefer_ipv6`.

View file

@ -2,34 +2,22 @@
```json ```json
{ {
"outbounds": [ "type": "wireguard",
{ "tag": "wireguard-out",
"type": "wireguard",
"tag": "wireguard-out", "server": "127.0.0.1",
"server_port": 1080,
"server": "127.0.0.1", "local_address": [
"server_port": 1080, "10.0.0.1",
"local_address": [ "10.0.0.2/32"
"10.0.0.1", ],
"10.0.0.2/32" "private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=",
], "peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=",
"private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=", "pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=",
"peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=", "mtu": 1408,
"pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=", "network": "tcp",
"mtu": 1408,
"network": "tcp", ... // 拨号字段
"detour": "upstream-out",
"bind_interface": "en0",
"bind_address": "0.0.0.0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
} }
``` ```
@ -37,7 +25,7 @@
默认安装不包含 WireGuard, 参阅 [安装](/zh/#_2)。 默认安装不包含 WireGuard, 参阅 [安装](/zh/#_2)。
### WireGuard 字段 ### 字段
#### server #### server
@ -94,51 +82,4 @@ WireGuard MTU。 默认1408。
### 拨号字段 ### 拨号字段
#### detour 参阅 [拨号字段](/zh/configuration/shared/dial/)。
上游出站的标签。
启用时,其他拨号字段将被忽略。
#### bind_interface
要绑定到的网络接口。
#### bind_address
要绑定的地址。
#### routing_mark
!!! error ""
仅支持 Linux。
设置 netfilter 路由标记。
#### reuse_addr
重用监听地址。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
持续时间字符串是一个可能有符号的序列十进制数,每个都有可选的分数和单位后缀, 例如 "300ms"、"-1.5h" 或 "2h45m"。
有效时间单位为 "ns"、"us"(或 "µs")、"ms"、"s"、"m"、"h"。
#### domain_strategy
可选值:`prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`
如果设置,服务器域名将在连接前解析为 IP。
默认使用 `dns.strategy`
#### fallback_delay
在生成 RFC 6555 快速回退连接之前等待的时间长度。
也就是说,是在假设之前等待 IPv6 成功的时间量如果设置了 "prefer_ipv4",则 IPv6 配置错误并回退到 IPv4。
如果为零,则使用 300 毫秒的默认延迟。
仅当 `domain_strategy``prefer_ipv4``prefer_ipv6` 时生效。

View file

@ -52,8 +52,8 @@ nav:
- Experimental: - Experimental:
- configuration/experimental/index.md - configuration/experimental/index.md
- Shared: - Shared:
- Inbound Listen Fields: configuration/shared/listen.md - Listen Fields: configuration/shared/listen.md
- Outbound Dial Fields: configuration/shared/dial.md - Dial Fields: configuration/shared/dial.md
- TLS: configuration/shared/tls.md - TLS: configuration/shared/tls.md
- Multiplex: configuration/shared/multiplex.md - Multiplex: configuration/shared/multiplex.md
- V2Ray Transport: configuration/shared/v2ray-transport.md - V2Ray Transport: configuration/shared/v2ray-transport.md
@ -152,8 +152,8 @@ plugins:
Protocol Sniff: 协议探测 Protocol Sniff: 协议探测
Experimental: 实验性 Experimental: 实验性
Shared: 通用 Shared: 通用
Inbound Listen Fields: 入站监听字段 Listen Fields: 监听字段
Outbound Dial Fields: 出站拨号字段 Dial Fields: 拨号字段
Multiplex: 多路复用 Multiplex: 多路复用
V2Ray Transport: V2Ray 传输层 V2Ray Transport: V2Ray 传输层
Inbound: 入站 Inbound: 入站