Trojan
Trojan protocol.
DANGER
Trojan is designed to work over correctly configured encrypted TLS tunnels.
InboundConfigurationObject
{
"clients": [
{
"password": "password",
"email": "love@xray.com",
"level": 0
}
],
"fallbacks": [
{
"dest": 80
}
]
}2
3
4
5
6
7
8
9
10
11
12
13
14
clients: [ ClientObject ]
An array representing a group of users accepted by the server.
Each item is a ClientObject.
fallbacks: [ FallbackObject ]
An array containing a series of powerful fallback configurations (optional). For specific configuration of fallbacks, please click FallbackObject.
TIP
Xray's Trojan has complete support for fallbacks, and the configuration method is exactly the same as VLESS. The conditions for triggering fallback are also similar to VLESS: the length of the first packet < 58, OR the 57th byte is not \r (because Trojan has no protocol version), OR authentication fails.
ClientObject
{
"password": "password",
"email": "love@xray.com",
"level": 0
}2
3
4
5
password: string
Required, any string.
Email address, optional, used to identify the user.
DANGER
If there are multiple ClientObjects, please note that emails must not be duplicated.
level: number
User level. Connections will use the Local Policy corresponding to this user level.
The value of userLevel corresponds to the value of level in policy. If not specified, it defaults to 0.