Expand description
Trojan server library.
This module exposes the server implementation for use by integration tests and potential embedding scenarios.
Re-exports§
pub use cli::ServerArgs;
Modules§
Structs§
- Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.
- Connection
Pool - Connection pool for a single backend address.
- Rate
Limiter - Rate limiter that tracks connections per IP address.
Enums§
- Server
Error - Server error type.
Constants§
- DEFAULT_
SHUTDOWN_ TIMEOUT - Default graceful shutdown timeout.
Functions§
- run
- Run the server (blocking until error, no graceful shutdown). For backward compatibility with existing code.
- run_
with_ shutdown - Run the server with a cancellation token for graceful shutdown.