Xray-docs-next/docs/en/config/outbounds/trojan.md

1.3 KiB

Trojan

Trojan protocol

::: danger Trojan is designed to work with correctly configured encrypted TLS tunnels. :::

OutboundConfigurationObject

{
  "servers": [
    {
      "address": "127.0.0.1",
      "port": 1234,
      "password": "password",
      "email": "love@xray.com",
      "level": 0
    }
  ]
}

servers: [ ServerObject ]

An array representing a list of servers, where each item is a ServerObject.

ServerObject

{
  "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.

port: number

The server port, usually the same port that the server is listening on.

password: string

The password for authentication. Required. It can be any string.

email: string

The email address, optional, used to identify the user.

level: number

The user level. Connections will use the corresponding local policy associated with this user level.

The level value corresponds to the level value in the policy. If not specified, the default value is 0.