Skip to content
rustle

Configuration

Every rustle setting: its type, default value and whether a reload applies it. Generated from the proxy’s published reference.

rustle reads one TOML file. An unknown or misplaced key stops the startup, so a typo never goes unnoticed. The last column says what it takes to apply a change: rustle reload or a SIGHUP applies the reload settings to the running proxy, the restart ones need the proxy to be restarted.

[server]

Listeners, shards, health endpoint and control socket.

Settings of the [server] table
KeyTypeDefaultApplied byDescription
listenstring"0.0.0.0:8080"restartPlain port (HTTP + CONNECT), literal IP address.
workersinteger1restartNumber of shards (one thread each); 0 = one per CPU.
pin_coresbooleanfalserestartPin shard i to CPU i and steer each connection to the shard of the CPU that received it (Linux).
admin_listenstring"127.0.0.1:8181"restartGET /health, no auth; "" disables it.
control_socketstring"auto"restartUnix socket (mode 0600) for rustle reload: /run/rustle/rustle.sock as root, else $XDG_RUNTIME_DIR/rustle.sock, else next to the user config; "" disables it.
socket_buffer_bytesinteger0restartSO_SNDBUF/SO_RCVBUF of relayed sockets; 0 = kernel autotuning. A fixed size (e.g. 1048576) caps a 100 ms RTT link at ~80 Mbit/s and, on the loopback, can stall bulk flows for seconds.

[auth]

API keys, client allowlist and bans after wrong keys.

Settings of the [auth] table
KeyTypeDefaultApplied byDescription
api_keysstring list[]reloadAccepted keys; empty = no authentication (open relay).
allow_clientsstring list[]reloadIPs/CIDRs allowed to connect; empty = everyone. Others are closed at accept.
max_failuresinteger5reloadWrong keys tolerated per IP within the window; 0 = no ban. A request without credentials does not count.
failure_windowduration"1m"reloadCounting window.
ban_durationduration"15m"reloadBan duration.

[limits]

Connection and request-head limits.

Settings of the [limits] table
KeyTypeDefaultApplied byDescription
max_connectionsinteger10000reloadConcurrent client connections (all shards); beyond: 503.
max_header_bytesinteger65536reloadMax request head size (431).

[timeouts]

Connect, idle and request-head timeouts.

Settings of the [timeouts] table
KeyTypeDefaultApplied byDescription
connectduration"5s"reloadConnection to the origin (504).
idleduration"1m"reloadInactivity on a connection or tunnel.
request_headduration"10s"reloadTotal time to receive a request head or SOCKS5 handshake.

[http]

Upstream connection pool, body limits and WebSocket upgrades.

Settings of the [http] table
KeyTypeDefaultApplied byDescription
upstream_keepalivebooleantruerestartReuse connections to origins.
max_idle_per_origininteger1024restartIdle connections kept per origin and per shard (16× that across all origins); a connection idle for over 15 s is closed instead of reused.
max_request_body_bytesinteger0reloadMax request body (413); 0 = unlimited.
max_response_body_bytesinteger0reloadMax response body (502 when declared, cut otherwise); 0 = unlimited.
allow_websocketbooleantruereloadLet Upgrade: websocket requests on the plain-HTTP path through (the connection becomes a tunnel once the origin answers 101); false refuses them with 403. CONNECT tunnels (wss://) are opaque and not affected: limit them with [filter] allowed_ports.

[dns]

Cache of resolved addresses.

Settings of the [dns] table
KeyTypeDefaultApplied byDescription
ttlduration"1m"reloadLifetime of cached resolutions; "0s" disables the cache.
max_entriesinteger4096reloadCache size.

[tls]

HTTPS proxy and HTTP/2.

Settings of the [tls] table
KeyTypeDefaultApplied byDescription
listenstring""restart"IP:port" of the HTTPS port, e.g. "0.0.0.0:8443"; empty = disabled. Needs cert and key.
certstring""reloadPEM certificate chain.
keystring""reloadPEM private key.
handshake_timeoutduration"10s"reloadMax duration of a TLS handshake.
http2booleantruereloadOffer HTTP/2 through ALPN.
ktlsbooleanfalserestartKernel TLS (Linux, tls module), opt-in. Software kernel TLS saves memory but is slower than rustls on throughput, tunnels included; see benchmarks/documentation/RESULTS.md.

[filter]

Destination policy.

Settings of the [filter] table
KeyTypeDefaultApplied byDescription
block_privatebooleantruereloadRefuse loopback, private, link-local, CGNAT, multicast and ULA destinations (403). Set false to reach your LAN.
denystring list[]reloadExtra refused networks (CIDR).
allowed_portsinteger list[]reloadAllowed destination ports, e.g. [80, 443]; empty = all.

[socks5]

SOCKS5 listener (TCP CONNECT and UDP ASSOCIATE).

Settings of the [socks5] table
KeyTypeDefaultApplied byDescription
listenstring""restart"IP:port" of the SOCKS5 port, e.g. "127.0.0.1:1080"; empty = disabled. The password is one of the api_keys.

[log]

Access log.

Settings of the [log] table
KeyTypeDefaultApplied byDescription
accessoff | errors | all"errors"restartoff, errors (refusals and failures) or all (one line per request and tunnel).
outputfile | stdout"file"restartfile or stdout.
filestring""restartPath when output = "file"; empty = no access log.
targethost | url"host"restartLog host:port or the full URL (url) of http:// requests.