mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Add documentation
This commit is contained in:
parent
5d6ecab128
commit
807601d816
@ -27,6 +27,7 @@
|
|||||||
| `naive` | [Naive](./naive) | X |
|
| `naive` | [Naive](./naive) | X |
|
||||||
| `hysteria` | [Hysteria](./hysteria) | X |
|
| `hysteria` | [Hysteria](./hysteria) | X |
|
||||||
| `shadowtls` | [ShadowTLS](./shadowtls) | TCP |
|
| `shadowtls` | [ShadowTLS](./shadowtls) | TCP |
|
||||||
|
| `vless` | [VLESS](./vless) | TCP |
|
||||||
| `tun` | [Tun](./tun) | X |
|
| `tun` | [Tun](./tun) | X |
|
||||||
| `redirect` | [Redirect](./redirect) | X |
|
| `redirect` | [Redirect](./redirect) | X |
|
||||||
| `tproxy` | [TProxy](./tproxy) | X |
|
| `tproxy` | [TProxy](./tproxy) | X |
|
||||||
|
39
docs/configuration/inbound/vless.md
Normal file
39
docs/configuration/inbound/vless.md
Normal file
@ -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).
|
39
docs/configuration/inbound/vless.zh.md
Normal file
39
docs/configuration/inbound/vless.zh.md
Normal file
@ -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)。
|
@ -8,6 +8,7 @@
|
|||||||
"server": "127.0.0.1",
|
"server": "127.0.0.1",
|
||||||
"server_port": 1080,
|
"server_port": 1080,
|
||||||
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
|
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
|
||||||
|
"flow": "xtls-rprx-vision",
|
||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"tls": {},
|
"tls": {},
|
||||||
"packet_encoding": "",
|
"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
|
### Fields
|
||||||
|
|
||||||
#### server
|
#### server
|
||||||
@ -41,6 +38,14 @@ The server port.
|
|||||||
|
|
||||||
The VLESS user id.
|
The VLESS user id.
|
||||||
|
|
||||||
|
#### flow
|
||||||
|
|
||||||
|
VLESS Sub-protocol.
|
||||||
|
|
||||||
|
Available values:
|
||||||
|
|
||||||
|
* `xtls-rprx-vision`
|
||||||
|
|
||||||
#### network
|
#### network
|
||||||
|
|
||||||
Enabled network
|
Enabled network
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"server": "127.0.0.1",
|
"server": "127.0.0.1",
|
||||||
"server_port": 1080,
|
"server_port": 1080,
|
||||||
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
|
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
|
||||||
|
"flow": "xtls-rprx-vision",
|
||||||
"network": "tcp",
|
"network": "tcp",
|
||||||
"tls": {},
|
"tls": {},
|
||||||
"packet_encoding": "",
|
"packet_encoding": "",
|
||||||
@ -17,10 +18,6 @@
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! warning ""
|
|
||||||
|
|
||||||
VLESS 协议与 v2ray 架构耦合且无人维护。 提供此出站仅出于兼容性目的。
|
|
||||||
|
|
||||||
### 字段
|
### 字段
|
||||||
|
|
||||||
#### server
|
#### server
|
||||||
@ -41,6 +38,14 @@
|
|||||||
|
|
||||||
VLESS 用户 ID。
|
VLESS 用户 ID。
|
||||||
|
|
||||||
|
#### flow
|
||||||
|
|
||||||
|
VLESS 子协议。
|
||||||
|
|
||||||
|
可用值:
|
||||||
|
|
||||||
|
* `xtls-rprx-vision`
|
||||||
|
|
||||||
#### network
|
#### network
|
||||||
|
|
||||||
启用的网络协议。
|
启用的网络协议。
|
||||||
|
@ -26,6 +26,20 @@
|
|||||||
"key_id": "",
|
"key_id": "",
|
||||||
"mac_key": ""
|
"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": {
|
"utls": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"fingerprint": ""
|
"fingerprint": ""
|
||||||
|
},
|
||||||
|
"reality": {
|
||||||
|
"enabled": false,
|
||||||
|
"public_key": "jNXHt1yRo0vDuchQlIP6Z0ZvjT3KtzVI-T4E7RoLJS0",
|
||||||
|
"short_id": "0123456789abcdef"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -275,6 +294,54 @@ The key identifier.
|
|||||||
|
|
||||||
The MAC key.
|
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
|
### Reload
|
||||||
|
|
||||||
For server configuration, certificate and key will be automatically reloaded if modified.
|
For server configuration, certificate and key will be automatically reloaded if modified.
|
@ -26,6 +26,20 @@
|
|||||||
"key_id": "",
|
"key_id": "",
|
||||||
"mac_key": ""
|
"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": {
|
"utls": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"fingerprint": ""
|
"fingerprint": ""
|
||||||
|
},
|
||||||
|
"reality": {
|
||||||
|
"enabled": false,
|
||||||
|
"public_key": "jNXHt1yRo0vDuchQlIP6Z0ZvjT3KtzVI-T4E7RoLJS0",
|
||||||
|
"short_id": "0123456789abcdef"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -271,6 +290,52 @@ EAB(外部帐户绑定)包含将 ACME 帐户绑定或映射到其他已知
|
|||||||
|
|
||||||
MAC 密钥。
|
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
|
||||||
|
|
||||||
|
服务器与和客户端之间允许的最大时间差。
|
||||||
|
|
||||||
|
默认禁用检查。
|
||||||
|
|
||||||
### 重载
|
### 重载
|
||||||
|
|
||||||
对于服务器配置,如果修改,证书和密钥将自动重新加载。
|
对于服务器配置,如果修改,证书和密钥将自动重新加载。
|
@ -71,6 +71,7 @@ nav:
|
|||||||
- Naive: configuration/inbound/naive.md
|
- Naive: configuration/inbound/naive.md
|
||||||
- Hysteria: configuration/inbound/hysteria.md
|
- Hysteria: configuration/inbound/hysteria.md
|
||||||
- ShadowTLS: configuration/inbound/shadowtls.md
|
- ShadowTLS: configuration/inbound/shadowtls.md
|
||||||
|
- VLESS: configuration/inbound/vless.md
|
||||||
- Tun: configuration/inbound/tun.md
|
- Tun: configuration/inbound/tun.md
|
||||||
- Redirect: configuration/inbound/redirect.md
|
- Redirect: configuration/inbound/redirect.md
|
||||||
- TProxy: configuration/inbound/tproxy.md
|
- TProxy: configuration/inbound/tproxy.md
|
||||||
|
Loading…
x
Reference in New Issue
Block a user