From 807601d816ef266df28e66e037583ae78bafea8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 25 Feb 2023 15:54:50 +0800 Subject: [PATCH] Add documentation --- docs/configuration/inbound/index.md | 1 + docs/configuration/inbound/vless.md | 39 ++++++++++++++ docs/configuration/inbound/vless.zh.md | 39 ++++++++++++++ docs/configuration/outbound/vless.md | 13 +++-- docs/configuration/outbound/vless.zh.md | 13 +++-- docs/configuration/shared/tls.md | 67 +++++++++++++++++++++++++ docs/configuration/shared/tls.zh.md | 65 ++++++++++++++++++++++++ mkdocs.yml | 1 + 8 files changed, 230 insertions(+), 8 deletions(-) create mode 100644 docs/configuration/inbound/vless.md create mode 100644 docs/configuration/inbound/vless.zh.md diff --git a/docs/configuration/inbound/index.md b/docs/configuration/inbound/index.md index 27b2d22d..88cdb1aa 100644 --- a/docs/configuration/inbound/index.md +++ b/docs/configuration/inbound/index.md @@ -27,6 +27,7 @@ | `naive` | [Naive](./naive) | X | | `hysteria` | [Hysteria](./hysteria) | X | | `shadowtls` | [ShadowTLS](./shadowtls) | TCP | +| `vless` | [VLESS](./vless) | TCP | | `tun` | [Tun](./tun) | X | | `redirect` | [Redirect](./redirect) | X | | `tproxy` | [TProxy](./tproxy) | X | diff --git a/docs/configuration/inbound/vless.md b/docs/configuration/inbound/vless.md new file mode 100644 index 00000000..d6b310ca --- /dev/null +++ b/docs/configuration/inbound/vless.md @@ -0,0 +1,39 @@ +### Structure + +```json +{ + "type": "vless", + "tag": "vless-in", + + ... // Listen Fields + + "users": [ + { + "name": "sekai", + "uuid": "bf000d23-0752-40b4-affe-68f7707a9661" + } + ], + "tls": {}, + "transport": {} +} +``` + +### Listen Fields + +See [Listen Fields](/configuration/shared/listen) for details. + +### Fields + +#### users + +==Required== + +VLESS users. + +#### tls + +TLS configuration, see [TLS](/configuration/shared/tls/#inbound). + +#### transport + +V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport). diff --git a/docs/configuration/inbound/vless.zh.md b/docs/configuration/inbound/vless.zh.md new file mode 100644 index 00000000..88d455e2 --- /dev/null +++ b/docs/configuration/inbound/vless.zh.md @@ -0,0 +1,39 @@ +### 结构 + +```json +{ + "type": "vless", + "tag": "vless-in", + + ... // 监听字段 + + "users": [ + { + "name": "sekai", + "uuid": "bf000d23-0752-40b4-affe-68f7707a9661" + } + ], + "tls": {}, + "transport": {} +} +``` + +### 监听字段 + +参阅 [监听字段](/zh/configuration/shared/listen/)。 + +### 字段 + +#### users + +==必填== + +VLESS 用户。 + +#### tls + +TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。 + +#### transport + +V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。 diff --git a/docs/configuration/outbound/vless.md b/docs/configuration/outbound/vless.md index 0fd45474..25ed1d0f 100644 --- a/docs/configuration/outbound/vless.md +++ b/docs/configuration/outbound/vless.md @@ -8,6 +8,7 @@ "server": "127.0.0.1", "server_port": 1080, "uuid": "bf000d23-0752-40b4-affe-68f7707a9661", + "flow": "xtls-rprx-vision", "network": "tcp", "tls": {}, "packet_encoding": "", @@ -17,10 +18,6 @@ } ``` -!!! warning "" - - The VLESS protocol is architecturally coupled to v2ray and is unmaintained. This outbound is provided for compatibility purposes only. - ### Fields #### server @@ -41,6 +38,14 @@ The server port. The VLESS user id. +#### flow + +VLESS Sub-protocol. + +Available values: + +* `xtls-rprx-vision` + #### network Enabled network diff --git a/docs/configuration/outbound/vless.zh.md b/docs/configuration/outbound/vless.zh.md index 39949b4d..5892f76d 100644 --- a/docs/configuration/outbound/vless.zh.md +++ b/docs/configuration/outbound/vless.zh.md @@ -8,6 +8,7 @@ "server": "127.0.0.1", "server_port": 1080, "uuid": "bf000d23-0752-40b4-affe-68f7707a9661", + "flow": "xtls-rprx-vision", "network": "tcp", "tls": {}, "packet_encoding": "", @@ -17,10 +18,6 @@ } ``` -!!! warning "" - - VLESS 协议与 v2ray 架构耦合且无人维护。 提供此出站仅出于兼容性目的。 - ### 字段 #### server @@ -41,6 +38,14 @@ VLESS 用户 ID。 +#### flow + +VLESS 子协议。 + +可用值: + +* `xtls-rprx-vision` + #### network 启用的网络协议。 diff --git a/docs/configuration/shared/tls.md b/docs/configuration/shared/tls.md index 694ce14d..d8ad42be 100644 --- a/docs/configuration/shared/tls.md +++ b/docs/configuration/shared/tls.md @@ -26,6 +26,20 @@ "key_id": "", "mac_key": "" } + }, + "reality": { + "enabled": false, + "handshake": { + "server": "google.com", + "server_port": 443, + + ... // Dial Fields + }, + "private_key": "UuMBgl7MXTPx9inmQp2UC7Jcnwc6XYbwDNebonM-FCc", + "short_id": [ + "0123456789abcdef" + ], + "max_time_difference": "1m" } } ``` @@ -53,6 +67,11 @@ "utls": { "enabled": false, "fingerprint": "" + }, + "reality": { + "enabled": false, + "public_key": "jNXHt1yRo0vDuchQlIP6Z0ZvjT3KtzVI-T4E7RoLJS0", + "short_id": "0123456789abcdef" } } ``` @@ -275,6 +294,54 @@ The key identifier. The MAC key. +### Reality Fields + +!!! warning "" + + reality server is not included by default, see [Installation](/#installation). + +!!! warning "" + + uTLS, which is required by reality client is not included by default, see [Installation](/#installation). + +#### handshake + +==Server only== + +==Required== + +Handshake server address and [Dial options](/configuration/shared/dial). + +#### private_key + +==Server only== + +==Required== + +Private key, generated by `./xray x25519`. + +#### public_key + +==Client only== + +==Required== + +Public key, generated by `./xray x25519`. + +#### short_id + +==Required== + +A 8-bit hex string. + +#### max_time_difference + +==Server only== + +The maximum time difference between the server and the client. + +Check disabled if empty. + ### Reload For server configuration, certificate and key will be automatically reloaded if modified. \ No newline at end of file diff --git a/docs/configuration/shared/tls.zh.md b/docs/configuration/shared/tls.zh.md index 0f85bc90..42cff9e2 100644 --- a/docs/configuration/shared/tls.zh.md +++ b/docs/configuration/shared/tls.zh.md @@ -26,6 +26,20 @@ "key_id": "", "mac_key": "" } + }, + "reality": { + "enabled": false, + "handshake": { + "server": "google.com", + "server_port": 443, + + ... // 拨号字段 + }, + "private_key": "UuMBgl7MXTPx9inmQp2UC7Jcnwc6XYbwDNebonM-FCc", + "short_id": [ + "0123456789abcdef" + ], + "max_time_difference": "1m" } } ``` @@ -53,6 +67,11 @@ "utls": { "enabled": false, "fingerprint": "" + }, + "reality": { + "enabled": false, + "public_key": "jNXHt1yRo0vDuchQlIP6Z0ZvjT3KtzVI-T4E7RoLJS0", + "short_id": "0123456789abcdef" } } ``` @@ -271,6 +290,52 @@ EAB(外部帐户绑定)包含将 ACME 帐户绑定或映射到其他已知 MAC 密钥。 +### Reality 字段 + +!!! warning "" + + 默认安装不包含 reality 服务器,参阅 [安装](/zh/#_2)。 + +!!! warning "" + + 默认安装不包含被 reality 客户端需要的 uTLS, 参阅 [安装](/zh/#_2)。 + +#### handshake + +==仅服务器== + +==必填== + +握手服务器地址和 [拨号参数](/zh/configuration/shared/dial/)。 + +#### private_key + +==仅服务器== + +==必填== + +私钥,由 `./xray x25519` 生成。 + +#### public_key + +==仅客户端== + +==必填== + +公钥,由 `./xray x25519` 生成。 + +#### short_id + +==必填== + +一个八位十六进制的字符串。 + +#### max_time_difference + +服务器与和客户端之间允许的最大时间差。 + +默认禁用检查。 + ### 重载 对于服务器配置,如果修改,证书和密钥将自动重新加载。 \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index f0358522..773534ba 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,6 +71,7 @@ nav: - Naive: configuration/inbound/naive.md - Hysteria: configuration/inbound/hysteria.md - ShadowTLS: configuration/inbound/shadowtls.md + - VLESS: configuration/inbound/vless.md - Tun: configuration/inbound/tun.md - Redirect: configuration/inbound/redirect.md - TProxy: configuration/inbound/tproxy.md