Add documentation for vmess

This commit is contained in:
世界
2022-08-01 17:02:13 +08:00
parent 7966b80476
commit 14b6200fd8
14 changed files with 243 additions and 11 deletions

View File

@@ -20,6 +20,7 @@
| `socks` | [Socks](./socks) |
| `http` | [HTTP](./http) |
| `shadowsocks` | [Shadowsocks](./shadowsocks) |
| `vmess` | [VMess](./vmess) |
| `tun` | [Tun](./tun) |
| `redirect` | [Redirect](./redirect) |
| `tproxy` | [TProxy](./tproxy) |

View File

@@ -1,4 +1,4 @@
`redirect` inbound is a linux Redirect server.
`redirect` inbound is a linux redirect server.
### Structure

View File

@@ -1,5 +1,3 @@
`shadowsocks` inbound is a shadowsocks server.
### Structure
```json

View File

@@ -1,5 +1,3 @@
`tproxy` inbound is a linux TProxy server.
### Structure
```json

View File

@@ -10,12 +10,14 @@
{
"type": "tun",
"tag": "tun-in",
"inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/128",
"mtu": 1500,
"auto_route": true,
"endpoint_independent_nat": false,
"udp_timeout": 300,
"sniff": true,
"sniff_override_destination": false,
"domain_strategy": "prefer_ipv4"

View File

@@ -0,0 +1,85 @@
### Structure
```json
{
"inbounds": [
{
"type": "vmess",
"tag": "vmess-in",
"listen": "::",
"listen_port": 2080,
"tcp_fast_open": false,
"sniff": false,
"sniff_override_destination": false,
"domain_strategy": "prefer_ipv6",
"users": [
{
"name": "sekai",
"uuid": "bf000d23-0752-40b4-affe-68f7707a9661",
"alterId": 0
}
],
"tls": {}
}
]
}
```
### Listen Fields
#### listen
==Required==
Listen address.
#### listen_port
==Required==
Listen port.
#### tcp_fast_open
Enable tcp fast open for listener.
#### sniff
Enable sniffing.
See [Sniff](/configuration/route/sniff/) for details.
#### sniff_override_destination
Override the connection destination address with the sniffed domain.
If the domain name is invalid (like tor), this will not work.
#### domain_strategy
One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
If set, the requested domain name will be resolved to IP before routing.
If `sniff_override_destination` is in effect, its value will be taken as a fallback.
### VMess Fields
#### users
VMess users.
| Alter ID | Description |
|----------|-------------------------|
| 0 | Disable legacy protocol |
| > 0 | Enable legacy protocol |
!!! warning ""
Legacy protocol support (VMess MD5 Authentication) is provided for compatibility purposes only, use of alterId > 1 is not recommended.
#### tls
TLS configuration, see [TLS inbound structure](/configuration/shared/tls/#inbound-structure).

View File

@@ -20,6 +20,7 @@
| `socks` | [Socks](./socks) |
| `http` | [HTTP](./http) |
| `shadowsocks` | [Shadowsocks](./shadowsocks) |
| `vmess` | [VMess](./vmess) |
| `dns` | [DNS](./dns) |
| `selector` | [Selector](./selector) |

View File

@@ -8,12 +8,14 @@
{
"type": "socks",
"tag": "socks-out",
"server": "127.0.0.1",
"server_port": 1080,
"version": "5",
"username": "sekai",
"password": "admin",
"network": "udp",
"detour": "upstream-out",
"bind_interface": "en0",
"routing_mark": 1234,

View File

@@ -0,0 +1,143 @@
### Structure
```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": {},
"detour": "upstream-out",
"bind_interface": "en0",
"routing_mark": 1234,
"reuse_addr": false,
"connect_timeout": "5s",
"tcp_fast_open": false,
"domain_strategy": "prefer_ipv6",
"fallback_delay": "300ms"
}
]
}
```
### VMess Fields
#### server
==Required==
The server address.
#### server_port
==Required==
The server port.
#### uuid
==Required==
The VMess user id.
#### security
Encryption methods:
* `auto`
* `none`
* `zero`
* `aes-128-gcm`
* `chancha20-poly1305`
Legacy encryption methods:
* `aes-128-ctr`
#### alter_id
| Alter ID | Description |
|----------|---------------------|
| 0 | Use AEAD protocol |
| 1 | Use legacy protocol |
| > 1 | Unused, same as 1 |
#### global_padding
Protocol parameter. Will waste traffic randomly if enabled (enabled by default in v2ray and cannot be disabled).
#### authenticated_length
Protocol parameter. Enable length block encryption.
#### network
Enabled network
One of `tcp` `udp`.
Both is enabled by default.
#### tls
TLS configuration, see [TLS outbound structure](/configuration/shared/tls/#outbound-structure).
### 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.
#### routing_mark
!!! error ""
Linux only
The iptables 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`.