Skip to content

Trojan

proxies:
- name: "trojan"
type: trojan
server: server
port: 443
password: yourpsk
udp: true
sni: example.com
alpn:
- h2
- http/1.1
client-fingerprint: random
fingerprint: xxxx
skip-cert-verify: true
name-cert-verify: example.com
shadow-tls-opts:
version: 3
password: shadow-tls-password
restls-opts:
password: restls-password
version-hint: tls13
jls-opts:
username: jls-user
password: jls-password
ss-opts:
enabled: false
method: aes-128-gcm
password: "example"
reality-opts:
public-key: xxxx
short-id: xxxx
network: tcp
smux:
enabled: false

Common fields

TLS fields

Required, trojan server password.

Enables trojan-go Shadowsocks AEAD encryption.

Encryption method. Supports aes-128-gcm/aes-256-gcm/chacha20-ietf-poly1305.

trojan-go Shadowsocks AEAD encryption password.

Transport layer. Supports ws/grpc. If unset or set to another value, TCP is used.

See Transport configuration.

tcp masks from Xray-core’s finalmask (fragment, header-custom, sudoku, xmc, noise…) under TLS; they must match the server inbound. See finalmask. mux.cool and udp-443 work here too.