Skip to main content

Crate trojan_server

Crate trojan_server 

Source
Expand description

Trojan server library.

This module exposes the server implementation for use by integration tests and potential embedding scenarios.

Structs§

CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.
ConnectionPool
Connection pool for a single backend address.
RateLimiter
Rate limiter that tracks connections per IP address.

Enums§

ServerError
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.