62 lines
1.3 KiB
Markdown
Raw Normal View History

2021-05-26 19:05:53 +08:00
# Trojan
[Trojan](https://trojan-gfw.github.io/trojan/protocol) protocol
2021-05-26 19:05:53 +08:00
::: danger
Trojan is designed to work with correctly configured encrypted TLS tunnels.
2021-05-26 19:05:53 +08:00
:::
## OutboundConfigurationObject
```json
{
"servers": [
{
"address": "127.0.0.1",
"port": 1234,
"password": "password",
"email": "love@xray.com",
"level": 0
}
]
}
```
> `servers`: \[ [ServerObject](#serverobject) \]
An array representing a list of servers, where each item is a [ServerObject](#serverobject).
2021-05-26 19:05:53 +08:00
### ServerObject
```json
{
"address": "127.0.0.1",
"port": 1234,
"password": "password",
"email": "love@xray.com",
"level": 0
}
```
> `address`: address
The server address, which can be an IPv4, IPv6, or domain name. Required.
2021-05-26 19:05:53 +08:00
> `port`: number
The server port, usually the same port that the server is listening on.
2021-05-26 19:05:53 +08:00
> `password`: string
The password for authentication. Required. It can be any string.
2021-05-26 19:05:53 +08:00
> `email`: string
The email address, optional, used to identify the user.
2021-05-26 19:05:53 +08:00
> `level`: number
The user level. Connections will use the corresponding [local policy](../policy.md#levelpolicyobject) associated with this user level.
2021-05-26 19:05:53 +08:00
The `level` value corresponds to the `level` value in the [policy](../policy.md#policyobject). If not specified, the default value is 0.