2021-05-26 11:05:53 +00:00
# VMess
2023-06-14 14:17:07 +00:00
[VMess ](../../development/protocols/vmess.md ) is an encrypted transport protocol that is commonly used as a bridge between Xray clients and servers.
2021-05-26 11:05:53 +00:00
::: danger
2023-07-03 09:33:21 +00:00
VMess relies on system time. Please ensure that the system UTC time used by Xray is within 120 seconds of the actual time, regardless of time zone. On Linux systems, you can install the `ntp` service to automatically synchronize the system time.
2021-05-26 11:05:53 +00:00
:::
## InboundConfigurationObject
```json
{
"clients": [
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
"level": 0,
"email": "love@xray.com"
}
],
"default": {
2023-07-03 09:33:21 +00:00
"level": 0
2021-05-26 11:05:53 +00:00
},
"detour": {
"to": "tag_to_detour"
2023-07-03 09:33:21 +00:00
}
2021-05-26 11:05:53 +00:00
}
```
> `clients`: \[ [ClientObject](#clientobject) \]
2023-06-14 14:17:07 +00:00
An array representing a group of users approved by the server.
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
Each item in the array is a user [ClientObject ](#clientobject ).
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
When this configuration is used for dynamic ports, Xray will automatically create users.
2021-05-26 11:05:53 +00:00
> `detour`: [DetourObject](#detourobject)
2023-06-14 14:17:07 +00:00
Indicates that another server should be used for the corresponding outbound protocol.
2021-05-26 11:05:53 +00:00
> `default`: [DefaultObject](#defaultobject)
2023-06-14 14:17:07 +00:00
Optional. The default configuration for clients. Only effective when used with `detour` .
2021-05-26 11:05:53 +00:00
### ClientObject
```json
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
"level": 0,
"email": "love@xray.com"
}
```
> `id`: string
2023-06-14 14:17:07 +00:00
The user ID for VMess. It can be any string less than 30 bytes or a valid UUID.
2021-05-26 11:05:53 +00:00
::: tip
2023-06-14 14:17:07 +00:00
Custom strings and their corresponding UUIDs are equivalent, which means you can use either of the following in the configuration file to identify the same user:
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
- `"id": "我爱🍉老师1314"`
- `"id": "5783a3e7-e373-51cd-8642-c83782b807c5"` (This UUID is the mapping of the string "我爱 🍉 老师 1314")
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
The mapping standard is described in the [VLESS UUID Mapping Standard: Mapping a Custom String to a UUIDv5 ](https://github.com/XTLS/Xray-core/issues/158 ).
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
You can use the command `xray uuid -i "custom string"` to generate the UUID corresponding to a custom string.
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
You can also use the command `xray uuid` to generate a random UUID. :::
2021-05-26 11:05:53 +00:00
> `level`: number
2023-06-14 14:17:07 +00:00
The user level that the connection will use to determine the corresponding [Local Policy ](../policy.md#levelpolicyobject ).
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
The value of `level` corresponds to the value of `level` in the [policy ](../policy.md#policyobject ). If not specified, the default value is 0.
2021-05-26 11:05:53 +00:00
> `email`: string
2023-06-14 14:17:07 +00:00
The user's email address, used to differentiate traffic from different users.
2021-05-26 11:05:53 +00:00
### DetourObject
```json
{
"to": "tag_to_detour"
}
```
> `to`: string
2023-06-14 14:17:07 +00:00
The `tag` of an inbound that specifies the inbound using the VMess protocol.
2021-05-26 11:05:53 +00:00
### DefaultObject
```json
{
2023-07-03 09:33:21 +00:00
"level": 0
2021-05-26 11:05:53 +00:00
}
```
> `level`: number
2023-06-14 14:17:07 +00:00
The user level that the connection will use to determine the corresponding [Local Policy ](../policy.md#levelpolicyobject ).
2021-05-26 11:05:53 +00:00
2023-06-14 14:17:07 +00:00
The value of `level` corresponds to the value of `level` in the [policy ](../policy.md#policyobject ). If not specified, the default value is 0.