Skip to content
Edit this page

Trojan Outbound (type: trojan)

  • Feature: Built-in (all platforms).
  • connect-via / dialer-proxy: TCP + UDP supported.
  • mTLS: Supported via paired tls-cert and tls-key.

For transport block details (ws-opts, grpc-opts), see Common Types & Transports.

Fields

Key Type Required Default Description
name, server, port, connect-via Common Yes (except connect-via) — Standard outbound options.
password string Yes — Trojan password.
sni string No server TLS SNI.
alpn list[string] No ["http/1.1"] for ws; ["h2", "http/1.1"] otherwise TLS ALPN protocols.
skip-cert-verify bool No false Skip TLS certificate verification.
udp bool No false Enable UDP relay.
network "ws" | "grpc" No Native TLS/TCP Optional underlying transport.
ws-opts WsOpt When network: ws None WebSocket transport options.
grpc-opts GrpcOpt When network: grpc None gRPC transport options.
tls-cert, tls-key string No None Paired mTLS client certificate and private key.

Example

proxies:
  - name: trojan-grpc
    type: trojan
    server: trojan.example.com
    port: 443
    password: "your-password"
    sni: trojan.example.com
    udp: true
    network: grpc
    grpc-opts:
      grpc-service-name: "trojan-service"