Skip to main content

Crate trojan_protocol

Crate trojan_protocol 

Source
Expand description

WebSocket protocol message types shared between agent and panel.

Messages are serialized with bincode for compact binary framing. The config fields carry opaque JSON bytes — they are not interpreted at the protocol layer and are parsed into typed configs by the runner.

Structs§

TrafficRecord
Per-user traffic delta record.

Enums§

AgentMessage
Agent -> Panel messages.
ErrorCode
Error codes from the panel.
NodeType
Node type — determines which service the agent boots.
PanelMessage
Panel -> Agent messages.
ServiceState
Service runtime state.

Constants§

PROTOCOL_VERSION
Protocol version — incremented on breaking changes.