TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/MercuryWorkshop/epoxy-tls/llms.txt
Use this file to discover all available pages before exploring further.
[server] section of the epoxy-server configuration file controls how the server binds to the network, which transport protocol it speaks, TLS termination, log verbosity, and the Tokio runtime that drives the process. Every option has a sensible default so you only need to specify the values that differ from the defaults.
Config file basics
epoxy-server reads a configuration file in TOML (default), JSON, or YAML. Pass the path to the file as the first CLI argument:--format:
[server] fields
A two-element array that specifies the socket type and the address to listen on.Socket type variants:
| Value | Description |
|---|---|
"tcp" | Plain TCP socket (default) |
"tlstcp" | TCP socket with TLS — requires tls_keypair |
"unix" | Unix domain socket — address is a filesystem path |
"tlsunix" | Unix domain socket with TLS — requires tls_keypair |
"file" | File “socket” — accepts a single connection immediately via stdin/stdout; useful for testing |
The framing protocol used on top of the socket.
Most deployments should use
| Value | Description |
|---|---|
"websocket" | Standard WebSocket upgrade — compatible with all epoxy-client builds (default) |
"lengthdelimitedle" | Little-endian u32 length-delimited codec (see tokio-util) — lower overhead, not WebSocket |
"websocket". The length-delimited transport is intended for non-browser environments where WebSocket framing overhead matters.Paths to the TLS certificate and private key in PEM format, as a two-element array Leave unset (or
[cert.pem, key.pem]. Required when bind uses "tlstcp" or "tlsunix".null) for plain (non-TLS) sockets. If you terminate TLS at a reverse proxy (nginx, Caddy, etc.) you do not need this field.When
true, the server will resolve hostnames to IPv6 addresses and open upstream connections over IPv6. When false (the default), only IPv4 addresses are used for upstream connections.Enables
TCP_NODELAY on client TCP connections, disabling Nagle’s algorithm. This reduces latency for small, interactive packets at the cost of slightly higher packet count. Recommended to leave true for typical proxy workloads.When using the
"file" socket type, setting this to true puts the terminal into raw mode before reading. Has no effect for TCP or Unix socket listeners.Enables an HTTP endpoint that exposes server statistics. Accepts two forms:
- Same server — a URL path string served on the same listener as the Wisp server:
- Separate server — a
[socket_type, address]tuple that binds a dedicated HTTP listener:
null) to disable the stats endpoint entirely.When
true, the server inspects the X-Real-IP and X-Forwarded-For HTTP headers to determine the real client IP address. Enable this when epoxy-server is deployed behind a reverse proxy that sets these headers.Only enable
use_real_ip_headers when epoxy-server is not directly internet-facing. If the server accepts connections from untrusted clients, those clients could spoof their source IP by injecting these headers themselves.The plain-text body sent in response to any HTTP request that is not a WebSocket upgrade. Useful for adding a basic health-check string or a short message for visitors who reach the server with a browser.
Maximum WebSocket message size in bytes that the server will accept from a client. Messages larger than this limit cause the connection to be closed. The default is 65536 (64 KiB).Increase this value only if you have clients that send unusually large individual WebSocket frames.
Minimum severity of log messages written to stderr.
| Value | Description |
|---|---|
"error" | Fatal and non-fatal errors only |
"warn" | Errors and warnings |
"info" | Normal operational messages (default) |
"debug" | Detailed diagnostic output |
"trace" | Very verbose per-packet tracing |
"off" | Disable all logging |
The Tokio async runtime flavor used by the server.
| Value | Description |
|---|---|
"singlethread" | Single-threaded runtime — lowest overhead, no parallelism |
"multithread" | Work-stealing multi-threaded runtime (default) — best general-purpose choice |
"multithreadalt" | Alternate multi-threaded runtime — only available when the server is compiled with RUSTFLAGS="--cfg tokio_unstable" |
"threadpercore" | Spawns one single-threaded runtime per logical CPU core — highest throughput on CPU-bound workloads |
"multithread" is the right choice for the vast majority of deployments. Switch to "threadpercore" only after profiling shows CPU saturation with "multithread". The "multithreadalt" variant requires an unstable Tokio build flag and is not available in standard release binaries.Complete example
When running epoxy-server behind a reverse proxy such as nginx or Caddy, set
use_real_ip_headers = true so that access logs and IP-based filtering use the real client address rather than the proxy’s address. Make sure your reverse proxy is configured to forward X-Real-IP or X-Forwarded-For and that epoxy-server is not directly reachable from the internet, or clients will be able to forge these headers.