From bda34fdb3be6b5213e9d3f00ae58898762441571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 31 Aug 2022 13:21:29 +0800 Subject: [PATCH] Refactor outbound documentation --- docs/configuration/index.md | 4 +- docs/configuration/index.zh.md | 4 +- docs/configuration/outbound/block.md | 8 +- docs/configuration/outbound/block.zh.md | 8 +- docs/configuration/outbound/direct.md | 82 ++------------ docs/configuration/outbound/direct.zh.md | 79 ++----------- docs/configuration/outbound/dns.md | 8 +- docs/configuration/outbound/dns.zh.md | 8 +- docs/configuration/outbound/http.md | 86 ++------------- docs/configuration/outbound/http.zh.md | 83 ++------------ docs/configuration/outbound/hysteria.md | 104 ++++-------------- docs/configuration/outbound/hysteria.zh.md | 101 ++++------------- docs/configuration/outbound/selector.md | 20 ++-- docs/configuration/outbound/selector.zh.md | 20 ++-- docs/configuration/outbound/shadowsocks.md | 90 +++------------ docs/configuration/outbound/shadowsocks.zh.md | 89 +++------------ docs/configuration/outbound/socks.md | 88 +++------------ docs/configuration/outbound/socks.zh.md | 87 +++------------ docs/configuration/outbound/ssh.md | 94 +++------------- docs/configuration/outbound/ssh.zh.md | 93 +++------------- docs/configuration/outbound/tor.md | 90 +++------------ docs/configuration/outbound/tor.zh.md | 85 +++----------- docs/configuration/outbound/trojan.md | 88 +++------------ docs/configuration/outbound/trojan.zh.md | 85 +++----------- docs/configuration/outbound/vmess.md | 98 +++-------------- docs/configuration/outbound/vmess.zh.md | 97 ++++------------ docs/configuration/outbound/wireguard.md | 98 +++-------------- docs/configuration/outbound/wireguard.zh.md | 95 +++------------- mkdocs.yml | 8 +- 29 files changed, 333 insertions(+), 1567 deletions(-) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index 4f13ada6..99fa9ac1 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -8,8 +8,8 @@ sing-box uses JSON for configuration files. { "log": {}, "dns": {}, - "inbounds": {}, - "outbounds": {}, + "inbounds": [], + "outbounds": [], "route": {}, "experimental": {} } diff --git a/docs/configuration/index.zh.md b/docs/configuration/index.zh.md index 59981f23..faccf9fa 100644 --- a/docs/configuration/index.zh.md +++ b/docs/configuration/index.zh.md @@ -8,8 +8,8 @@ sing-box 使用 JSON 作为配置文件格式。 { "log": {}, "dns": {}, - "inbounds": {}, - "outbounds": {}, + "inbounds": [], + "outbounds": [], "route": {}, "experimental": {} } diff --git a/docs/configuration/outbound/block.md b/docs/configuration/outbound/block.md index 5e7c6fd2..b39e313f 100644 --- a/docs/configuration/outbound/block.md +++ b/docs/configuration/outbound/block.md @@ -4,12 +4,8 @@ ```json { - "outbounds": [ - { - "type": "block", - "tag": "block" - } - ] + "type": "block", + "tag": "block" } ``` diff --git a/docs/configuration/outbound/block.zh.md b/docs/configuration/outbound/block.zh.md index a3daabe4..bc0762e3 100644 --- a/docs/configuration/outbound/block.zh.md +++ b/docs/configuration/outbound/block.zh.md @@ -4,12 +4,8 @@ ```json { - "outbounds": [ - { - "type": "block", - "tag": "block" - } - ] + "type": "block", + "tag": "block" } ``` diff --git a/docs/configuration/outbound/direct.md b/docs/configuration/outbound/direct.md index 9fba8b25..68eb0daf 100644 --- a/docs/configuration/outbound/direct.md +++ b/docs/configuration/outbound/direct.md @@ -4,30 +4,18 @@ ```json { - "outbounds": [ - { - "type": "direct", - "tag": "direct-out", - - "override_address": "1.0.0.1", - "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" - } - ] + "type": "direct", + "tag": "direct-out", + + "override_address": "1.0.0.1", + "override_port": 53, + "proxy_protocol": 0, + + ... // Dial Fields } ``` -### Direct Fields +### Fields #### override_address @@ -45,54 +33,4 @@ Protocol value can be `1` or `2`. ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/direct.zh.md b/docs/configuration/outbound/direct.zh.md index 1543fba9..aee13175 100644 --- a/docs/configuration/outbound/direct.zh.md +++ b/docs/configuration/outbound/direct.zh.md @@ -4,30 +4,18 @@ ```json { - "outbounds": [ - { - "type": "direct", - "tag": "direct-out", - - "override_address": "1.0.0.1", - "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" - } - ] + "type": "direct", + "tag": "direct-out", + + "override_address": "1.0.0.1", + "override_port": 53, + "proxy_protocol": 0, + + ... // 拨号字段 } ``` -### Direct 字段 +### 字段 #### override_address @@ -45,51 +33,4 @@ ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/dns.md b/docs/configuration/outbound/dns.md index dadce8f1..1f8c5477 100644 --- a/docs/configuration/outbound/dns.md +++ b/docs/configuration/outbound/dns.md @@ -4,12 +4,8 @@ ```json { - "outbounds": [ - { - "type": "dns", - "tag": "dns-out" - } - ] + "type": "dns", + "tag": "dns-out" } ``` diff --git a/docs/configuration/outbound/dns.zh.md b/docs/configuration/outbound/dns.zh.md index 8c58d974..67538f6e 100644 --- a/docs/configuration/outbound/dns.zh.md +++ b/docs/configuration/outbound/dns.zh.md @@ -4,12 +4,8 @@ ```json { - "outbounds": [ - { - "type": "dns", - "tag": "dns-out" - } - ] + "type": "dns", + "tag": "dns-out" } ``` diff --git a/docs/configuration/outbound/http.md b/docs/configuration/outbound/http.md index 7f8a952c..40217122 100644 --- a/docs/configuration/outbound/http.md +++ b/docs/configuration/outbound/http.md @@ -4,32 +4,20 @@ ```json { - "outbounds": [ - { - "type": "http", - "tag": "http-out", - - "server": "127.0.0.1", - "server_port": 1080, - "username": "sekai", - "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" - } - ] + "type": "http", + "tag": "http-out", + + "server": "127.0.0.1", + "server_port": 1080, + "username": "sekai", + "password": "admin", + "tls": {}, + + ... // Dial Fields } ``` -### HTTP Fields +### Fields #### server @@ -57,54 +45,4 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound). ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/http.zh.md b/docs/configuration/outbound/http.zh.md index 363e1592..c633a203 100644 --- a/docs/configuration/outbound/http.zh.md +++ b/docs/configuration/outbound/http.zh.md @@ -4,32 +4,20 @@ ```json { - "outbounds": [ - { - "type": "http", - "tag": "http-out", - - "server": "127.0.0.1", - "server_port": 1080, - "username": "sekai", - "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" - } - ] + "type": "http", + "tag": "http-out", + + "server": "127.0.0.1", + "server_port": 1080, + "username": "sekai", + "password": "admin", + "tls": {}, + + ... // 拨号字段 } ``` -### HTTP 字段 +### 字段 #### server @@ -57,51 +45,4 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/hysteria.md b/docs/configuration/outbound/hysteria.md index 8e85785c..690177cf 100644 --- a/docs/configuration/outbound/hysteria.md +++ b/docs/configuration/outbound/hysteria.md @@ -2,37 +2,25 @@ ```json { - "outbounds": [ - { - "type": "hysteria", - "tag": "hysteria-out", - - "server": "127.0.0.1", - "server_port": 1080, - - "up": "100 Mbps", - "up_mbps": 100, - "down": "100 Mbps", - "down_mbps": 100, - "obfs": "fuck me till the daylight", - "auth": "", - "auth_str": "password", - "recv_window_conn": 0, - "recv_window": 0, - "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" - } - ] + "type": "hysteria", + "tag": "hysteria-out", + + "server": "127.0.0.1", + "server_port": 1080, + "up": "100 Mbps", + "up_mbps": 100, + "down": "100 Mbps", + "down_mbps": 100, + "obfs": "fuck me till the daylight", + "auth": "", + "auth_str": "password", + "recv_window_conn": 0, + "recv_window": 0, + "disable_mtu_discovery": false, + "network": "tcp", + "tls": {}, + + ... // Dial Fields } ``` @@ -40,7 +28,7 @@ QUIC, which is required by hysteria is not included by default, see [Installation](/#installation). -### Hysteria Fields +### Fields #### server @@ -125,54 +113,4 @@ Both is enabled by default. ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/hysteria.zh.md b/docs/configuration/outbound/hysteria.zh.md index 84ac66d7..85184ae9 100644 --- a/docs/configuration/outbound/hysteria.zh.md +++ b/docs/configuration/outbound/hysteria.zh.md @@ -2,37 +2,25 @@ ```json { - "outbounds": [ - { - "type": "hysteria", - "tag": "hysteria-out", - - "server": "127.0.0.1", - "server_port": 1080, - - "up": "100 Mbps", - "up_mbps": 100, - "down": "100 Mbps", - "down_mbps": 100, - "obfs": "fuck me till the daylight", - "auth": "", - "auth_str": "password", - "recv_window_conn": 0, - "recv_window": 0, - "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" - } - ] + "type": "hysteria", + "tag": "hysteria-out", + + "server": "127.0.0.1", + "server_port": 1080, + "up": "100 Mbps", + "up_mbps": 100, + "down": "100 Mbps", + "down_mbps": 100, + "obfs": "fuck me till the daylight", + "auth": "", + "auth_str": "password", + "recv_window_conn": 0, + "recv_window": 0, + "disable_mtu_discovery": false, + "network": "tcp", + "tls": {}, + + ... // 拨号字段 } ``` @@ -40,7 +28,7 @@ 默认安装不包含被 Hysteria 依赖的 QUIC,参阅 [安装](/zh/#_2)。 -### Hysteria 字段 +### 字段 #### server @@ -123,51 +111,4 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/selector.md b/docs/configuration/outbound/selector.md index 7f20d87b..35be3041 100644 --- a/docs/configuration/outbound/selector.md +++ b/docs/configuration/outbound/selector.md @@ -2,19 +2,15 @@ ```json { + "type": "selector", + "tag": "select", + "outbounds": [ - { - "type": "selector", - "tag": "select", - - "outbounds": [ - "proxy-a", - "proxy-b", - "proxy-c" - ], - "default": "proxy-c" - } - ] + "proxy-a", + "proxy-b", + "proxy-c" + ], + "default": "proxy-c" } ``` diff --git a/docs/configuration/outbound/selector.zh.md b/docs/configuration/outbound/selector.zh.md index df1cdf9b..adfbf3bf 100644 --- a/docs/configuration/outbound/selector.zh.md +++ b/docs/configuration/outbound/selector.zh.md @@ -2,19 +2,15 @@ ```json { + "type": "selector", + "tag": "select", + "outbounds": [ - { - "type": "selector", - "tag": "select", - - "outbounds": [ - "proxy-a", - "proxy-b", - "proxy-c" - ], - "default": "proxy-c" - } - ] + "proxy-a", + "proxy-b", + "proxy-c" + ], + "default": "proxy-c" } ``` diff --git a/docs/configuration/outbound/shadowsocks.md b/docs/configuration/outbound/shadowsocks.md index 3e946baf..48c0d878 100644 --- a/docs/configuration/outbound/shadowsocks.md +++ b/docs/configuration/outbound/shadowsocks.md @@ -2,34 +2,22 @@ ```json { - "outbounds": [ - { - "type": "shadowsocks", - "tag": "ss-out", - - "server": "127.0.0.1", - "server_port": 1080, - "method": "2022-blake3-aes-128-gcm", - "password": "8JCsPssfgS8tiRwiMlhARg==", - "network": "udp", - "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" - } - ] + "type": "shadowsocks", + "tag": "ss-out", + + "server": "127.0.0.1", + "server_port": 1080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==", + "network": "udp", + "udp_over_tcp": false, + "multiplex": {}, + + ... // Dial Fields } ``` -### Shadowsocks Fields +### Fields #### server @@ -97,54 +85,4 @@ Multiplex configuration, see [Multiplex](/configuration/shared/multiplex). ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/shadowsocks.zh.md b/docs/configuration/outbound/shadowsocks.zh.md index 9cc20202..5b5611f6 100644 --- a/docs/configuration/outbound/shadowsocks.zh.md +++ b/docs/configuration/outbound/shadowsocks.zh.md @@ -1,35 +1,23 @@ -### Structure +### 结构 ```json { - "outbounds": [ - { - "type": "shadowsocks", - "tag": "ss-out", - - "server": "127.0.0.1", - "server_port": 1080, - "method": "2022-blake3-aes-128-gcm", - "password": "8JCsPssfgS8tiRwiMlhARg==", - "network": "udp", - "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" - } - ] + "type": "shadowsocks", + "tag": "ss-out", + + "server": "127.0.0.1", + "server_port": 1080, + "method": "2022-blake3-aes-128-gcm", + "password": "8JCsPssfgS8tiRwiMlhARg==", + "network": "udp", + "udp_over_tcp": false, + "multiplex": {}, + + ... // 拨号字段 } ``` -### Shadowsocks 字段 +### 字段 #### server @@ -97,51 +85,4 @@ Shadowsocks 密码。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/socks.md b/docs/configuration/outbound/socks.md index 044e4c8d..a1411078 100644 --- a/docs/configuration/outbound/socks.md +++ b/docs/configuration/outbound/socks.md @@ -4,34 +4,22 @@ ```json { - "outbounds": [ - { - "type": "socks", - "tag": "socks-out", - - "server": "127.0.0.1", - "server_port": 1080, - "version": "5", - "username": "sekai", - "password": "admin", - "network": "udp", - "udp_over_tcp": false, + "type": "socks", + "tag": "socks-out", + + "server": "127.0.0.1", + "server_port": 1080, + "version": "5", + "username": "sekai", + "password": "admin", + "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" - } - ] + ... // Dial Fields } ``` -### SOCKS Fields +### Fields #### server @@ -73,54 +61,4 @@ Enable the UDP over TCP protocol. ### Dial Fields -#### detour - -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`. +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/socks.zh.md b/docs/configuration/outbound/socks.zh.md index c5d32dbd..d2808b58 100644 --- a/docs/configuration/outbound/socks.zh.md +++ b/docs/configuration/outbound/socks.zh.md @@ -1,37 +1,25 @@ `socks` 出站是 socks4/socks4a/socks5 客户端 -### Structure +### 结构 ```json { - "outbounds": [ - { - "type": "socks", - "tag": "socks-out", - - "server": "127.0.0.1", - "server_port": 1080, - "version": "5", - "username": "sekai", - "password": "admin", - "network": "udp", - "udp_over_tcp": false, + "type": "socks", + "tag": "socks-out", + + "server": "127.0.0.1", + "server_port": 1080, + "version": "5", + "username": "sekai", + "password": "admin", + "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 @@ -73,51 +61,4 @@ SOCKS5 密码。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/ssh.md b/docs/configuration/outbound/ssh.md index 728a5a46..cf948f45 100644 --- a/docs/configuration/outbound/ssh.md +++ b/docs/configuration/outbound/ssh.md @@ -2,36 +2,24 @@ ```json { - "outbounds": [ - { - "type": "ssh", - "tag": "ssh-out", - - "server": "127.0.0.1", - "server_port": 22, - "user": "root", - "password": "admin", - "private_key": "", - "private_key_path": "$HOME/.ssh/id_rsa", - "private_key_passphrase": "", - "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" - } - ] + "type": "ssh", + "tag": "ssh-out", + + "server": "127.0.0.1", + "server_port": 22, + "user": "root", + "password": "admin", + "private_key": "", + "private_key_path": "$HOME/.ssh/id_rsa", + "private_key_passphrase": "", + "host_key_algorithms": [], + "client_version": "SSH-2.0-OpenSSH_7.4p1", + + ... // Dial Fields } ``` -### SSH Fields +### Fields #### server @@ -73,54 +61,4 @@ Client version. Random version will be used if empty. ### Dial Fields -#### detour - -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`. +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/ssh.zh.md b/docs/configuration/outbound/ssh.zh.md index 7596d0a9..e14e9fd4 100644 --- a/docs/configuration/outbound/ssh.zh.md +++ b/docs/configuration/outbound/ssh.zh.md @@ -1,37 +1,25 @@ -### Structure +### 结构 ```json { - "outbounds": [ - { - "type": "ssh", - "tag": "ssh-out", - - "server": "127.0.0.1", - "server_port": 22, - "user": "root", - "password": "admin", - "private_key": "", - "private_key_path": "$HOME/.ssh/id_rsa", - "private_key_passphrase": "", - "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" - } - ] + "type": "ssh", + "tag": "ssh-out", + + "server": "127.0.0.1", + "server_port": 22, + "user": "root", + "password": "admin", + "private_key": "", + "private_key_path": "$HOME/.ssh/id_rsa", + "private_key_passphrase": "", + "host_key_algorithms": [], + "client_version": "SSH-2.0-OpenSSH_7.4p1", + + ... // 拨号字段 } ``` -### SSH 字段 +### 字段 #### server @@ -73,51 +61,4 @@ SSH 用户, 默认使用 root。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/tor.md b/docs/configuration/outbound/tor.md index ab9c2771..2b0cc9f0 100644 --- a/docs/configuration/outbound/tor.md +++ b/docs/configuration/outbound/tor.md @@ -2,29 +2,17 @@ ```json { - "outbounds": [ - { - "type": "tor", - "tag": "tor-out", - - "executable_path": "/usr/bin/tor", - "extra_args": [], - "data_directory": "$HOME/.cache/tor", - "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" - } - ] + "type": "tor", + "tag": "tor-out", + + "executable_path": "/usr/bin/tor", + "extra_args": [], + "data_directory": "$HOME/.cache/tor", + "torrc": { + "ClientOnly": 1 + }, + + ... // Dial Fields } ``` @@ -32,7 +20,7 @@ Embedded tor is not included by default, see [Installation](/#installation). -### Tor Fields +### Fields #### executable_path @@ -56,58 +44,8 @@ Each start will be very slow if not specified. 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 -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/tor.zh.md b/docs/configuration/outbound/tor.zh.md index a87f9fcb..2ddf832b 100644 --- a/docs/configuration/outbound/tor.zh.md +++ b/docs/configuration/outbound/tor.zh.md @@ -2,29 +2,17 @@ ```json { - "outbounds": [ - { - "type": "tor", - "tag": "tor-out", - - "executable_path": "/usr/bin/tor", - "extra_args": [], - "data_directory": "$HOME/.cache/tor", - "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" - } - ] + "type": "tor", + "tag": "tor-out", + + "executable_path": "/usr/bin/tor", + "extra_args": [], + "data_directory": "$HOME/.cache/tor", + "torrc": { + "ClientOnly": 1 + }, + + ... // 拨号字段 } ``` @@ -32,7 +20,7 @@ 默认安装不包含嵌入式 Tor, 参阅 [安装](/zh/#_2)。 -### Tor 字段 +### 字段 #### executable_path @@ -60,51 +48,4 @@ torrc 参数表。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/trojan.md b/docs/configuration/outbound/trojan.md index 37a96a33..cee13401 100644 --- a/docs/configuration/outbound/trojan.md +++ b/docs/configuration/outbound/trojan.md @@ -2,34 +2,22 @@ ```json { - "outbounds": [ - { - "type": "trojan", - "tag": "trojan-out", - - "server": "127.0.0.1", - "server_port": 1080, - "password": "8JCsPssfgS8tiRwiMlhARg==", - "network": "tcp", - "tls": {}, - "multiplex": {}, - "transport": {}, + "type": "trojan", + "tag": "trojan-out", - "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" - } - ] + "server": "127.0.0.1", + "server_port": 1080, + "password": "8JCsPssfgS8tiRwiMlhARg==", + "network": "tcp", + "tls": {}, + "multiplex": {}, + "transport": {}, + + ... // Dial Fields } ``` -### Trojan Fields +### Fields #### server @@ -71,54 +59,4 @@ V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/trojan.zh.md b/docs/configuration/outbound/trojan.zh.md index 8e06e528..ac919187 100644 --- a/docs/configuration/outbound/trojan.zh.md +++ b/docs/configuration/outbound/trojan.zh.md @@ -2,34 +2,22 @@ ```json { - "outbounds": [ - { - "type": "trojan", - "tag": "trojan-out", - - "server": "127.0.0.1", - "server_port": 1080, - "password": "8JCsPssfgS8tiRwiMlhARg==", - "network": "tcp", - "tls": {}, - "multiplex": {}, - "transport": {}, + "type": "trojan", + "tag": "trojan-out", + + "server": "127.0.0.1", + "server_port": 1080, + "password": "8JCsPssfgS8tiRwiMlhARg==", + "network": "tcp", + "tls": {}, + "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 @@ -71,51 +59,4 @@ V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-tra ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/vmess.md b/docs/configuration/outbound/vmess.md index 89d01ee5..41fa5376 100644 --- a/docs/configuration/outbound/vmess.md +++ b/docs/configuration/outbound/vmess.md @@ -2,39 +2,27 @@ ```json { - "outbounds": [ - { - "type": "vmess", - "tag": "vmess-out", - - "server": "127.0.0.1", - "server_port": 1080, - "uuid": "bf000d23-0752-40b4-affe-68f7707a9661", - "security": "auto", - "alter_id": 0, - "global_padding": false, - "authenticated_length": true, - "network": "tcp", - "tls": {}, - "packet_addr": false, - "multiplex": {}, - "transport": {}, + "type": "vmess", + "tag": "vmess-out", + + "server": "127.0.0.1", + "server_port": 1080, + "uuid": "bf000d23-0752-40b4-affe-68f7707a9661", + "security": "auto", + "alter_id": 0, + "global_padding": false, + "authenticated_length": true, + "network": "tcp", + "tls": {}, + "packet_addr": false, + "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" - } - ] + ... // Dial Fields } ``` -### VMess Fields +### Fields #### server @@ -110,54 +98,4 @@ V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/vmess.zh.md b/docs/configuration/outbound/vmess.zh.md index d6e8de80..9cbc9bf5 100644 --- a/docs/configuration/outbound/vmess.zh.md +++ b/docs/configuration/outbound/vmess.zh.md @@ -2,39 +2,27 @@ ```json { - "outbounds": [ - { - "type": "vmess", - "tag": "vmess-out", - - "server": "127.0.0.1", - "server_port": 1080, - "uuid": "bf000d23-0752-40b4-affe-68f7707a9661", - "security": "auto", - "alter_id": 0, - "global_padding": false, - "authenticated_length": true, - "network": "tcp", - "tls": {}, - "packet_addr": false, - "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" - } - ] + "type": "vmess", + "tag": "vmess-out", + + "server": "127.0.0.1", + "server_port": 1080, + "uuid": "bf000d23-0752-40b4-affe-68f7707a9661", + "security": "auto", + "alter_id": 0, + "global_padding": false, + "authenticated_length": true, + "network": "tcp", + "tls": {}, + "packet_addr": false, + "multiplex": {}, + "transport": {}, + + ... // 拨号字段 } ``` -### VMess 字段 +### 字段 #### server @@ -110,51 +98,4 @@ V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-tra ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 \ No newline at end of file +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/docs/configuration/outbound/wireguard.md b/docs/configuration/outbound/wireguard.md index b71bba43..9289802f 100644 --- a/docs/configuration/outbound/wireguard.md +++ b/docs/configuration/outbound/wireguard.md @@ -2,34 +2,22 @@ ```json { - "outbounds": [ - { - "type": "wireguard", - "tag": "wireguard-out", - - "server": "127.0.0.1", - "server_port": 1080, - "local_address": [ - "10.0.0.1", - "10.0.0.2/32" - ], - "private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=", - "peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=", - "pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=", - "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" - } - ] + "type": "wireguard", + "tag": "wireguard-out", + + "server": "127.0.0.1", + "server_port": 1080, + "local_address": [ + "10.0.0.1", + "10.0.0.2/32" + ], + "private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=", + "peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=", + "pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=", + "mtu": 1408, + "network": "tcp", + + ... // Dial Fields } ``` @@ -37,7 +25,7 @@ WireGuard is not included by default, see [Installation](/#installation). -### WireGuard Fields +### Fields #### server @@ -92,54 +80,4 @@ Both is enabled by default. ### Dial Fields -#### detour - -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`. \ No newline at end of file +See [Dial Fields](/configuration/shared/dial) for details. diff --git a/docs/configuration/outbound/wireguard.zh.md b/docs/configuration/outbound/wireguard.zh.md index 14a6e9bf..f8fb5f1d 100644 --- a/docs/configuration/outbound/wireguard.zh.md +++ b/docs/configuration/outbound/wireguard.zh.md @@ -2,34 +2,22 @@ ```json { - "outbounds": [ - { - "type": "wireguard", - "tag": "wireguard-out", - - "server": "127.0.0.1", - "server_port": 1080, - "local_address": [ - "10.0.0.1", - "10.0.0.2/32" - ], - "private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=", - "peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=", - "pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=", - "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" - } - ] + "type": "wireguard", + "tag": "wireguard-out", + + "server": "127.0.0.1", + "server_port": 1080, + "local_address": [ + "10.0.0.1", + "10.0.0.2/32" + ], + "private_key": "YNXtAzepDqRv9H52osJVDQnznT5AM11eCK3ESpwSt04=", + "peer_public_key": "Z1XXLsKYkYxuiYjJIkRvtIKFepCYHTgON+GwPq7SOV4=", + "pre_shared_key": "31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=", + "mtu": 1408, + "network": "tcp", + + ... // 拨号字段 } ``` @@ -37,7 +25,7 @@ 默认安装不包含 WireGuard, 参阅 [安装](/zh/#_2)。 -### WireGuard 字段 +### 字段 #### server @@ -94,51 +82,4 @@ WireGuard MTU。 默认1408。 ### 拨号字段 -#### detour - -上游出站的标签。 - -启用时,其他拨号字段将被忽略。 - -#### 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` 时生效。 +参阅 [拨号字段](/zh/configuration/shared/dial/)。 diff --git a/mkdocs.yml b/mkdocs.yml index 2195dd6f..eab3f3f6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -52,8 +52,8 @@ nav: - Experimental: - configuration/experimental/index.md - Shared: - - Inbound Listen Fields: configuration/shared/listen.md - - Outbound Dial Fields: configuration/shared/dial.md + - Listen Fields: configuration/shared/listen.md + - Dial Fields: configuration/shared/dial.md - TLS: configuration/shared/tls.md - Multiplex: configuration/shared/multiplex.md - V2Ray Transport: configuration/shared/v2ray-transport.md @@ -152,8 +152,8 @@ plugins: Protocol Sniff: 协议探测 Experimental: 实验性 Shared: 通用 - Inbound Listen Fields: 入站监听字段 - Outbound Dial Fields: 出站拨号字段 + Listen Fields: 监听字段 + Dial Fields: 拨号字段 Multiplex: 多路复用 V2Ray Transport: V2Ray 传输层 Inbound: 入站