Files
XTLS_Xray-docs-next/docs/en/config/inbounds/hysteria.md
T
2026-05-25 18:39:42 +08:00

64 lines
1.3 KiB
Markdown

# Hysteria
::: tip
The `hysteria protocol` itself has no authentication; `users` only take effect when used with the `hysteria` transport layer.
:::
## InboundConfigurationObject
`InboundConfigurationObject` corresponds to the `settings` item in [`InboundObject`](../inbound.md).
```json
{
"inbounds": [
{
// ...
"protocol": "hysteria",
// [!code focus:10]
"settings": {
"version": 2,
"users": [
{
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
"level": 0,
"email": "love@xray.com"
}
]
}
}
]
}
```
> `version`: number
Hysteria version, must be 2.
> `users`: \[ [UserObject](#userobject) \]
An array representing a group of users approved by the server.
### UserObject
```json
{
"auth": "5783a3e7-e373-51cd-8642-c83782b807c5",
"level": 0,
"email": "love@xray.com"
}
```
> `auth`: string
A string of any length.
> `level`: number
User level. The connection will use the [local policy](../policy.md#levelpolicyobject) corresponding to this user level.
The value of `level` corresponds to the `level` value in [policy](../policy.md#policyobject). If not specified, the default is 0.
> `email`: string
User email, used to distinguish traffic from different users (reflected in logs and statistics).