From 97e284e65e4af429ad17fb9222a6c6da1873e045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 24 Aug 2022 21:02:28 +0800 Subject: [PATCH] Initial zh-CN document translation: outbound --- docs/changelog.md | 2 +- docs/configuration/inbound/direct.zh.md | 2 +- docs/configuration/inbound/hysteria.zh.md | 2 +- docs/configuration/inbound/index.md | 2 +- docs/configuration/inbound/index.zh.md | 2 +- docs/configuration/inbound/shadowsocks.zh.md | 2 + docs/configuration/inbound/tun.zh.md | 8 +- docs/configuration/outbound/block.md | 4 +- docs/configuration/outbound/block.zh.md | 18 ++ docs/configuration/outbound/direct.md | 6 +- docs/configuration/outbound/direct.zh.md | 95 ++++++++++ docs/configuration/outbound/dns.md | 2 +- docs/configuration/outbound/dns.zh.md | 22 +++ docs/configuration/outbound/http.md | 8 +- docs/configuration/outbound/http.zh.md | 107 +++++++++++ docs/configuration/outbound/hysteria.md | 6 +- docs/configuration/outbound/hysteria.zh.md | 173 ++++++++++++++++++ docs/configuration/outbound/index.md | 2 +- docs/configuration/outbound/index.zh.md | 36 ++++ docs/configuration/outbound/selector.zh.md | 35 ++++ docs/configuration/outbound/shadowsocks.md | 6 +- docs/configuration/outbound/shadowsocks.zh.md | 147 +++++++++++++++ docs/configuration/outbound/socks.md | 14 +- docs/configuration/outbound/socks.zh.md | 123 +++++++++++++ docs/configuration/outbound/ssh.md | 6 +- docs/configuration/outbound/ssh.zh.md | 123 +++++++++++++ docs/configuration/outbound/tor.md | 4 +- docs/configuration/outbound/tor.zh.md | 110 +++++++++++ docs/configuration/outbound/trojan.md | 8 +- docs/configuration/outbound/trojan.zh.md | 121 ++++++++++++ docs/configuration/outbound/vmess.md | 8 +- docs/configuration/outbound/vmess.zh.md | 153 ++++++++++++++++ docs/configuration/outbound/wireguard.md | 4 +- docs/configuration/outbound/wireguard.zh.md | 144 +++++++++++++++ 34 files changed, 1457 insertions(+), 48 deletions(-) create mode 100644 docs/configuration/outbound/block.zh.md create mode 100644 docs/configuration/outbound/direct.zh.md create mode 100644 docs/configuration/outbound/dns.zh.md create mode 100644 docs/configuration/outbound/http.zh.md create mode 100644 docs/configuration/outbound/hysteria.zh.md create mode 100644 docs/configuration/outbound/index.zh.md create mode 100644 docs/configuration/outbound/selector.zh.md create mode 100644 docs/configuration/outbound/shadowsocks.zh.md create mode 100644 docs/configuration/outbound/socks.zh.md create mode 100644 docs/configuration/outbound/ssh.zh.md create mode 100644 docs/configuration/outbound/tor.zh.md create mode 100644 docs/configuration/outbound/trojan.zh.md create mode 100644 docs/configuration/outbound/vmess.zh.md create mode 100644 docs/configuration/outbound/wireguard.zh.md diff --git a/docs/changelog.md b/docs/changelog.md index 6f08deec..181b3282 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -61,7 +61,7 @@ #### 2022/08/12 * Performance improvements -* Add UoT option for [Socks](/configuration/outbound/socks) outbound +* Add UoT option for [SOCKS](/configuration/outbound/socks) outbound #### 2022/08/11 diff --git a/docs/configuration/inbound/direct.zh.md b/docs/configuration/inbound/direct.zh.md index 2d6d0a3d..edfee6dc 100644 --- a/docs/configuration/inbound/direct.zh.md +++ b/docs/configuration/inbound/direct.zh.md @@ -40,7 +40,7 @@ #### override_port -覆盖连接目标端口。 +覆盖连接目标端口 ### 监听字段 diff --git a/docs/configuration/inbound/hysteria.zh.md b/docs/configuration/inbound/hysteria.zh.md index ede5b4c4..8effc886 100644 --- a/docs/configuration/inbound/hysteria.zh.md +++ b/docs/configuration/inbound/hysteria.zh.md @@ -32,7 +32,7 @@ !!! warning "" - 默认安装不包含被 Hysteria 需要的 QUIC, 参阅 [安装](/zh/#installation). + 默认安装不包含被 Hysteria 依赖的 QUIC, 参阅 [安装](/zh/#installation). ### Hysteria 字段 diff --git a/docs/configuration/inbound/index.md b/docs/configuration/inbound/index.md index 0648b2cc..7b1909ae 100644 --- a/docs/configuration/inbound/index.md +++ b/docs/configuration/inbound/index.md @@ -17,7 +17,7 @@ |---------------|------------------------------| | `direct` | [Direct](./direct) | | `mixed` | [Mixed](./mixed) | -| `socks` | [Socks](./socks) | +| `socks` | [SOCKS](./socks) | | `http` | [HTTP](./http) | | `shadowsocks` | [Shadowsocks](./shadowsocks) | | `vmess` | [VMess](./vmess) | diff --git a/docs/configuration/inbound/index.zh.md b/docs/configuration/inbound/index.zh.md index 3e00fac0..d19d033f 100644 --- a/docs/configuration/inbound/index.zh.md +++ b/docs/configuration/inbound/index.zh.md @@ -19,7 +19,7 @@ |---------------|------------------------------| | `direct` | [Direct](./direct) | | `mixed` | [Mixed](./mixed) | -| `socks` | [Socks](./socks) | +| `socks` | [SOCKS](./socks) | | `http` | [HTTP](./http) | | `shadowsocks` | [Shadowsocks](./shadowsocks) | | `vmess` | [VMess](./vmess) | diff --git a/docs/configuration/inbound/shadowsocks.zh.md b/docs/configuration/inbound/shadowsocks.zh.md index 98b66026..a100aed5 100644 --- a/docs/configuration/inbound/shadowsocks.zh.md +++ b/docs/configuration/inbound/shadowsocks.zh.md @@ -6,6 +6,7 @@ { "type": "shadowsocks", "tag": "ss-in", + "listen": "::", "listen_port": 5353, "tcp_fast_open": false, @@ -15,6 +16,7 @@ "udp_timeout": 300, "network": "udp", "proxy_protocol": false, + "method": "2022-blake3-aes-128-gcm", "password": "8JCsPssfgS8tiRwiMlhARg==" } diff --git a/docs/configuration/inbound/tun.zh.md b/docs/configuration/inbound/tun.zh.md index 6695115b..a8cb4c09 100644 --- a/docs/configuration/inbound/tun.zh.md +++ b/docs/configuration/inbound/tun.zh.md @@ -137,10 +137,10 @@ TCP/IP 栈. 限制被路由的 Android 用户。 -| Common user | ID | -|--------------|-----| -| Main | 0 | -| Work Profile | 10 | +| 常用用户 | ID | +|--|-----| +| 您 | 0 | +| 工作资料 | 10 | #### include_package diff --git a/docs/configuration/outbound/block.md b/docs/configuration/outbound/block.md index 77ae5351..7be5fec5 100644 --- a/docs/configuration/outbound/block.md +++ b/docs/configuration/outbound/block.md @@ -13,6 +13,6 @@ } ``` -### Fields +### 字段 -No fields. \ No newline at end of file +无 \ No newline at end of file diff --git a/docs/configuration/outbound/block.zh.md b/docs/configuration/outbound/block.zh.md new file mode 100644 index 00000000..2ffef095 --- /dev/null +++ b/docs/configuration/outbound/block.zh.md @@ -0,0 +1,18 @@ +`block` 出站关闭所有传入请求 + +### 结构 + +```json +{ + "outbounds": [ + { + "type": "block", + "tag": "block" + } + ] +} +``` + +### 字段 + +无 \ No newline at end of file diff --git a/docs/configuration/outbound/direct.md b/docs/configuration/outbound/direct.md index 5c33c2c3..9fba8b25 100644 --- a/docs/configuration/outbound/direct.md +++ b/docs/configuration/outbound/direct.md @@ -63,9 +63,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr @@ -84,7 +84,7 @@ Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`. -If set, the requested domain name will be resolved to IP before routing. +If set, the requested domain name will be resolved to IP before connect. `dns.strategy` will be used if empty. diff --git a/docs/configuration/outbound/direct.zh.md b/docs/configuration/outbound/direct.zh.md new file mode 100644 index 00000000..65806f2a --- /dev/null +++ b/docs/configuration/outbound/direct.zh.md @@ -0,0 +1,95 @@ +`direct` 出站直接发送请求 + +### 结构 + +```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" + } + ] +} +``` + +### Direct 字段 + +#### override_address + +覆盖连接目标地址 + +#### override_port + +覆盖连接目标端口 + +#### proxy_protocol + +写出 [代理协议](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) 到连接头。 + +可用协议版本值: `1` 或 `2`. + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/dns.md b/docs/configuration/outbound/dns.md index cadc8776..dadce8f1 100644 --- a/docs/configuration/outbound/dns.md +++ b/docs/configuration/outbound/dns.md @@ -1,4 +1,4 @@ -`dns` outbound is a DNS server. +`dns` outbound is a internal DNS server. ### Structure diff --git a/docs/configuration/outbound/dns.zh.md b/docs/configuration/outbound/dns.zh.md new file mode 100644 index 00000000..f7a911ac --- /dev/null +++ b/docs/configuration/outbound/dns.zh.md @@ -0,0 +1,22 @@ +`dns` 出站是一个内部 DNS 服务器。 + +### 结构 + +```json +{ + "outbounds": [ + { + "type": "dns", + "tag": "dns-out" + } + ] +} +``` + +!!! note "" + + There are no outbound connections by the DNS outbound, all requests are handled internally. + +### Fields + +No fields. \ No newline at end of file diff --git a/docs/configuration/outbound/http.md b/docs/configuration/outbound/http.md index 6dfa7485..7f8a952c 100644 --- a/docs/configuration/outbound/http.md +++ b/docs/configuration/outbound/http.md @@ -1,4 +1,4 @@ -`http` outbound is a HTTP Connect client. +`http` outbound is a HTTP CONNECT proxy client. ### Structure @@ -53,7 +53,7 @@ Basic authorization password. #### tls -TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound). +TLS configuration, see [TLS](/configuration/shared/tls/#outbound). ### Dial Fields @@ -75,9 +75,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/http.zh.md b/docs/configuration/outbound/http.zh.md new file mode 100644 index 00000000..dc65db14 --- /dev/null +++ b/docs/configuration/outbound/http.zh.md @@ -0,0 +1,107 @@ +`http` 出站是一个 HTTP CONNECT 代理客户端 + +### 结构 + +```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" + } + ] +} +``` + +### HTTP 字段 + +#### server + +==必填== + +服务器地址 + +#### server_port + +==必填== + +服务器端口 + +#### username + +Basic 认证用户名 + +#### password + +Basic 认证密码 + +#### tls + +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` 时生效。 diff --git a/docs/configuration/outbound/hysteria.md b/docs/configuration/outbound/hysteria.md index efa6155a..8e85785c 100644 --- a/docs/configuration/outbound/hysteria.md +++ b/docs/configuration/outbound/hysteria.md @@ -113,7 +113,7 @@ Force enabled on for systems other than Linux and Windows (according to upstream ==Required== -TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound). +TLS configuration, see [TLS](/configuration/shared/tls/#outbound). #### network @@ -143,9 +143,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/hysteria.zh.md b/docs/configuration/outbound/hysteria.zh.md new file mode 100644 index 00000000..6e513cb4 --- /dev/null +++ b/docs/configuration/outbound/hysteria.zh.md @@ -0,0 +1,173 @@ +### 结构 + +```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" + } + ] +} +``` + +!!! warning "" + + 默认安装不包含被 Hysteria 依赖的 QUIC, 参阅 [安装](/zh/#installation). + +### Hysteria 字段 + +#### server + +==必填== + +服务器地址 + +#### server_port + +==必填== + +服务器端口 + +#### up, down + +==必填== + +格式: `[Integer] [Unit]` e.g. `100 Mbps, 640 KBps, 2 Gbps` + +支持的单位 (大小写敏感, b = bits, B = bytes, 8b=1B): + + bps (bits per second) + Bps (bytes per second) + Kbps (kilobits per second) + KBps (kilobytes per second) + Mbps (megabits per second) + MBps (megabytes per second) + Gbps (gigabits per second) + GBps (gigabytes per second) + Tbps (terabits per second) + TBps (terabytes per second) + +#### up_mbps, down_mbps + +==必填== + +以 Mbps 为单位的 `up, down`. + +#### obfs + +混淆密码 + +#### auth + +base64 编码的认证密码 + +#### auth_str + +认证密码 + +#### recv_window_conn + +用于接收数据的 QUIC 流级流控制窗口。 + +如果为空,将使用 `15728640 (15 MB/s)`。 + +#### recv_window + +用于接收数据的 QUIC 连接级流控制窗口。 + +如果为空,将使用 `67108864 (64 MB/s)`。 + +#### disable_mtu_discovery + +禁用路径 MTU 发现 (RFC 8899)。 数据包的大小最多为 1252 (IPv4) / 1232 (IPv6) 字节。 + +强制为 Linux 和 Windows 以外的系统启用(根据上游)。 + +==必填== + +TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound). + +#### network + +启用的网络协议 + +`tcp` 或 `udp`。 + +默认所有。 + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/index.md b/docs/configuration/outbound/index.md index 043ff103..1db484ad 100644 --- a/docs/configuration/outbound/index.md +++ b/docs/configuration/outbound/index.md @@ -17,7 +17,7 @@ |---------------|------------------------------| | `direct` | [Direct](./direct) | | `block` | [Block](./block) | -| `socks` | [Socks](./socks) | +| `socks` | [SOCKS](./socks) | | `http` | [HTTP](./http) | | `shadowsocks` | [Shadowsocks](./shadowsocks) | | `vmess` | [VMess](./vmess) | diff --git a/docs/configuration/outbound/index.zh.md b/docs/configuration/outbound/index.zh.md new file mode 100644 index 00000000..3803f06b --- /dev/null +++ b/docs/configuration/outbound/index.zh.md @@ -0,0 +1,36 @@ +# 出站 + +### 结构 + +```json +{ + "outbounds": [ + { + "type": "", + "tag": "" + } + ] +} +``` + +### 字段 + +| 类型 | 格式 | +|---------------|------------------------------| +| `direct` | [Direct](./direct) | +| `block` | [Block](./block) | +| `socks` | [SOCKS](./socks) | +| `http` | [HTTP](./http) | +| `shadowsocks` | [Shadowsocks](./shadowsocks) | +| `vmess` | [VMess](./vmess) | +| `trojan` | [Trojan](./trojan) | +| `wireguard` | [Wireguard](./wireguard) | +| `hysteria` | [Hysteria](./hysteria) | +| `tor` | [Tor](./tor) | +| `ssh` | [SSH](./ssh) | +| `dns` | [DNS](./dns) | +| `selector` | [Selector](./selector) | + +#### tag + +出站的标签。 \ No newline at end of file diff --git a/docs/configuration/outbound/selector.zh.md b/docs/configuration/outbound/selector.zh.md new file mode 100644 index 00000000..f45dfd0d --- /dev/null +++ b/docs/configuration/outbound/selector.zh.md @@ -0,0 +1,35 @@ +### 结构 + +```json +{ + "outbounds": [ + { + "type": "selector", + "tag": "select", + + "outbounds": [ + "proxy-a", + "proxy-b", + "proxy-c" + ], + "default": "proxy-c" + } + ] +} +``` + +!!! error "" + + 选择器目前只能通过 [Clash API](/zh/configuration/experimental#clash-api) 来控制。 + +### 字段 + +#### outbounds + +==必填== + +用于选择的出站标签列表。 + +#### default + +默认的出站标签。如果为空,则使用第一个出站。 diff --git a/docs/configuration/outbound/shadowsocks.md b/docs/configuration/outbound/shadowsocks.md index 6a0ff3f3..3e946baf 100644 --- a/docs/configuration/outbound/shadowsocks.md +++ b/docs/configuration/outbound/shadowsocks.md @@ -93,7 +93,7 @@ Conflict with `multiplex`. #### multiplex -Multiplex configuration, see [Multiplex structure](/configuration/shared/multiplex). +Multiplex configuration, see [Multiplex](/configuration/shared/multiplex). ### Dial Fields @@ -115,9 +115,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/shadowsocks.zh.md b/docs/configuration/outbound/shadowsocks.zh.md new file mode 100644 index 00000000..4710460d --- /dev/null +++ b/docs/configuration/outbound/shadowsocks.zh.md @@ -0,0 +1,147 @@ +### 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" + } + ] +} +``` + +### Shadowsocks 字段 + +#### server + +==必填== + +服务器地址 + +#### server_port + +==必填== + +服务器端口 + +#### method + +==必填== + +加密方法 + +* `2022-blake3-aes-128-gcm` +* `2022-blake3-aes-256-gcm` +* `2022-blake3-chacha20-poly1305` +* `none` +* `aes-128-gcm` +* `aes-192-gcm` +* `aes-256-gcm` +* `chacha20-ietf-poly1305` +* `xchacha20-ietf-poly1305` + +旧加密方法: + +* `aes-128-ctr` +* `aes-192-ctr` +* `aes-256-ctr` +* `aes-128-cfb` +* `aes-192-cfb` +* `aes-256-cfb` +* `rc4-md5` +* `chacha20-ietf` +* `xchacha20` + +#### password + +==必填== + +Shadowsocks 密码 + +#### network + +启用的网络协议 + +`tcp` 或 `udp`。 + +默认所有。 + +#### udp_over_tcp + +启用 UDP over TCP 协议。 + +与 `multiplex` 冲突。 + +#### multiplex + +多路复用配置, 参阅 [多路复用](/zh/configuration/shared/multiplex). + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/socks.md b/docs/configuration/outbound/socks.md index 5416ab89..044e4c8d 100644 --- a/docs/configuration/outbound/socks.md +++ b/docs/configuration/outbound/socks.md @@ -31,7 +31,7 @@ } ``` -### Socks Fields +### SOCKS Fields #### server @@ -47,17 +47,17 @@ The server port. #### version -The Socks version, one of `4` `4a` `5`. +The SOCKS version, one of `4` `4a` `5`. -Socks5 used by default. +SOCKS5 used by default. #### username -Socks username. +SOCKS username. #### password -Socks5 password. +SOCKS5 password. #### network @@ -91,9 +91,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/socks.zh.md b/docs/configuration/outbound/socks.zh.md new file mode 100644 index 00000000..d82b8d1a --- /dev/null +++ b/docs/configuration/outbound/socks.zh.md @@ -0,0 +1,123 @@ +`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, + + "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 Fields + +#### server + +==必填== + +服务器地址 + +#### server_port + +==必填== + +服务器端口 + +#### version + +SOCKS 版本, 可为 `4` `4a` `5`. + +默认使用 SOCKS5. + +#### username + +SOCKS 用户名 + +#### password + +SOCKS5 密码 + +#### network + +启用的网络协议 + +`tcp` 或 `udp`。 + +默认所有。 + +#### udp_over_tcp + +启用 UDP over TCP 协议。 + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/ssh.md b/docs/configuration/outbound/ssh.md index 8adcdb50..728a5a46 100644 --- a/docs/configuration/outbound/ssh.md +++ b/docs/configuration/outbound/ssh.md @@ -53,7 +53,7 @@ Password. #### private_key -Private key content. +Private key. #### private_key_path @@ -91,9 +91,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/ssh.zh.md b/docs/configuration/outbound/ssh.zh.md new file mode 100644 index 00000000..b560dd8e --- /dev/null +++ b/docs/configuration/outbound/ssh.zh.md @@ -0,0 +1,123 @@ +### 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" + } + ] +} +``` + +### SSH 字段 + +#### server + +==必填== + +服务器地址 + +#### server_port + +服务器端口,默认使用 22。 + +#### user + +SSH 用户, 默认使用 root。 + +#### password + +密码 + +#### private_key + +密钥 + +#### private_key_path + +密钥路径 + +#### private_key_passphrase + +密钥密码 + +#### host_key_algorithms + +主机密钥算法 + +#### client_version + +客户端版本,默认使用随机值。 + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/tor.md b/docs/configuration/outbound/tor.md index d4f4b6e0..ab9c2771 100644 --- a/docs/configuration/outbound/tor.md +++ b/docs/configuration/outbound/tor.md @@ -78,9 +78,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/tor.zh.md b/docs/configuration/outbound/tor.zh.md new file mode 100644 index 00000000..56fa684f --- /dev/null +++ b/docs/configuration/outbound/tor.zh.md @@ -0,0 +1,110 @@ +### 结构 + +```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" + } + ] +} +``` + +!!! info "" + + 默认安装不包含嵌入式 Tor, 参阅 [安装](/zh/#installation). + +### Tor 字段 + +#### executable_path + +Tor 可执行文件路径 + +如果设置,将覆盖嵌入式 Tor。 + +#### extra_args + +启动 Tor 时传递的附加参数列表。 + +#### data_directory + +==推荐== + +Tor 的数据目录。 + +如未设置,每次启动都需要长时间。 + +#### torrc + +torrc 参数表 + +参阅 [tor(1)](https://linux.die.net/man/1/tor) + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/trojan.md b/docs/configuration/outbound/trojan.md index 51d37470..37a96a33 100644 --- a/docs/configuration/outbound/trojan.md +++ b/docs/configuration/outbound/trojan.md @@ -59,11 +59,11 @@ Both is enabled by default. #### tls -TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound). +TLS configuration, see [TLS](/configuration/shared/tls/#outbound). #### multiplex -Multiplex configuration, see [Multiplex structure](/configuration/shared/multiplex). +Multiplex configuration, see [Multiplex](/configuration/shared/multiplex). #### transport @@ -89,9 +89,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/trojan.zh.md b/docs/configuration/outbound/trojan.zh.md new file mode 100644 index 00000000..50fe7089 --- /dev/null +++ b/docs/configuration/outbound/trojan.zh.md @@ -0,0 +1,121 @@ +### 结构 + +```json +{ + "outbounds": [ + { + "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 + +==必填== + +服务器地址 + +#### server_port + +==必填== + +服务器端口 + +#### password + +==必填== + +Trojan 密码 + +#### network + +启用的网络协议 + +`tcp` 或 `udp`。 + +默认所有。 + +#### tls + +TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound). + +#### multiplex + +多路复用配置, 参阅 [多路复用](/zh/configuration/shared/multiplex). + +#### transport + +V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。 + +### 拨号字段 + +#### 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` 时生效。 diff --git a/docs/configuration/outbound/vmess.md b/docs/configuration/outbound/vmess.md index 07ada644..a4a0821b 100644 --- a/docs/configuration/outbound/vmess.md +++ b/docs/configuration/outbound/vmess.md @@ -93,11 +93,11 @@ Both is enabled by default. #### tls -TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound). +TLS configuration, see [TLS](/configuration/shared/tls/#outbound). #### multiplex -Multiplex configuration, see [Multiplex structure](/configuration/shared/multiplex). +Multiplex configuration, see [Multiplex](/configuration/shared/multiplex). #### transport @@ -123,9 +123,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/vmess.zh.md b/docs/configuration/outbound/vmess.zh.md new file mode 100644 index 00000000..6c13c0bc --- /dev/null +++ b/docs/configuration/outbound/vmess.zh.md @@ -0,0 +1,153 @@ +### 结构 + +```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": {}, + "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_port + +==必填== + +服务器端口 + +#### uuid + +==必填== + +VMess 用户 ID + +#### security + +加密方法: + +* `auto` +* `none` +* `zero` +* `aes-128-gcm` +* `chancha20-poly1305` + +旧加密方法: + +* `aes-128-ctr` + +#### alter_id + +| Alter ID | 描述 | +|----------|------------| +| 0 | 禁用旧协议 | +| 1 | 启用旧协议 | +| > 1 | 未使用, 行为同 1 | + +#### global_padding + +协议参数。 如果启用会随机浪费流量(在 v2ray 中默认启用并且无法禁用)。 + +#### authenticated_length + +协议参数。 启用长度块加密。 + +#### network + +启用的网络协议 + +`tcp` 或 `udp`。 + +默认所有。 + +#### tls + +TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound). + +#### multiplex + +多路复用配置, 参阅 [多路复用](/zh/configuration/shared/multiplex). + +#### transport + +V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。 + +### 拨号字段 + +#### 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 diff --git a/docs/configuration/outbound/wireguard.md b/docs/configuration/outbound/wireguard.md index b5ac0c05..b71bba43 100644 --- a/docs/configuration/outbound/wireguard.md +++ b/docs/configuration/outbound/wireguard.md @@ -110,9 +110,9 @@ The address to bind to. !!! error "" - Linux only + Only supported on Linux. -The iptables routing mark. +Set netfilter routing mark. #### reuse_addr diff --git a/docs/configuration/outbound/wireguard.zh.md b/docs/configuration/outbound/wireguard.zh.md new file mode 100644 index 00000000..11abcb68 --- /dev/null +++ b/docs/configuration/outbound/wireguard.zh.md @@ -0,0 +1,144 @@ +### 结构 + +```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" + } + ] +} +``` + +!!! warning "" + + 默认安装不包含 WireGuard, 参阅 [安装](/zh/#installation). + +### WireGuard 字段 + +#### server + +==必填== + +服务器地址 + +#### server_port + +==必填== + +服务器端口 + +#### local_address + +==必填== + +接口的 IPv4/IPv6 地址或地址段的列表您 + +要分配给接口的 IP(v4 或 v6)地址列表(可以选择带有 CIDR 掩码)。 + +#### private_key + +==必填== + +WireGuard 需要 base64 编码的公钥和私钥。 这些可以使用 wg(8) 实用程序生成: + +```shell +wg genkey +echo "private key" || wg pubkey +``` + +#### peer_public_key + +==必填== + +WireGuard 对等公钥。 + +#### pre_shared_key + +WireGuard 预共享密钥。 + +#### mtu + +WireGuard MTU。 如果为空,将使用 1408。 + +#### network + +启用的网络协议 + +`tcp` 或 `udp`。 + +默认所有。 + +### 拨号字段 + +#### 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` 时生效。