Trojan Relay
Multi-hop relay chain for routing traffic through intermediate nodes
trojan-relay enables multi-hop relay chains for routing traffic through intermediate nodes before reaching the exit server. Each hop can independently use TLS or plain TCP transport.
Overview
Single hop: Client ──▶ A(entry) ──▶ C(trojan-server) ──▶ Target
Multi-hop: Client ──▶ A(entry) ──▶ B1(relay) ──▶ B2(relay) ──▶ C(trojan-server) ──▶ TargetNode Roles
| Role | Name | Responsibility |
|---|---|---|
| A | Entry Node | Accepts client connections, builds tunnels through relay chain |
| B | Relay Node | Verifies relay password, connects to next hop, forwards traffic |
| C | Exit Node | Standard trojan-server, unchanged |
Design Principles
- A does not parse Trojan protocol — Pure transparent forwarding
- B does not know the final target — Only knows the next hop
- C requires no changes — Standard trojan-server
- Client is unaware of the chain — Configures A's address and C's password only
- Pluggable transports — Each hop can independently use TLS or plain TCP
Quick Start
Entry Node
trojan entry -c entry.tomlRelay Node
trojan relay -c relay.tomlThe exit node is a standard trojan server — no changes required.