Skip to content

etemenanki-app configuration

Every table of the etemenanki-app configuration file on one page. The same tables appear on the guide pages, which explain how the keys interact; follow the link under each heading.

config.toml · Explained in The configuration file

KeyTypeRequiredDefaultDescription
logtableno{}Logging, written as [log]. Holds only level. See the [log] section of the configuration file page.
dnstableno{}Name resolution for proxy servers, WireGuard endpoints, balancer probes and freedom destinations, written as [dns]. Without it, etemenanki-app uses the host resolver behind an always-on cache. When [subscribe] names a subscribe file that has its own [dns], that one is used instead.
inboundarray of tablesno[]The listeners, one [[inbound]] block each. Written in the singular: [[inbounds]] is an unknown field. Zero inbounds is valid, although such a process accepts nothing. Tags must be unique among inbounds.
outboundarray of tablesdepends—Where flows leave, one [[outbound]] block each. Written in the singular. Tags must be unique among outbounds. The first [[outbound]] in the file is the default route unless [route] sets default. A config needs at least one outbound (config defines no outbounds), but direct and blackhole need no block: when a route names one of them and no outbound or balancer carries that tag, etemenanki-app adds it as a freedom or blackhole outbound. With [subscribe], the subscribe file's nodes are added after the config's own outbounds.
balancerarray of tablesno[]Groups of interchangeable outbounds, one [[balancer]] block each. Written in the singular. A balancer tag can be used wherever an outbound tag is accepted, so it must not repeat an outbound tag or another balancer tag.
routetableno{}Routing, written as [route], with its rules as [[route.rule]] blocks (singular; [[route.rules]] is an unknown field). The first matching rule wins. Without [route], every flow goes to the first [[outbound]]. With [subscribe], the rules come from the subscribe file's route groups instead.
subscribetableno—A subscribe file that supplies the client side, written as [subscribe]: its nodes become outbounds, its route groups become the route rules, and its [dns], if it has one, replaces this files. [subscribe.routes] picks the node for each route group. Every [[inbound]] stays this files.
apitableno—The REST API that switches a route group's node by editing this file, written as [api]. Without it, the API does not listen.

[log] · Explained in The configuration file

KeyTypeRequiredDefaultDescription
levelstringno"info"A tracing EnvFilter directive, the same syntax as RUST_LOG: a level (off, error, warn, info, debug, trace, or a number from 0 to 5, case-insensitive), optionally followed by per-target overrides such as "warn,etemenanki_protocols=debug". A RUST_LOG variable that parses as a filter replaces this value, even an empty one, which enables nothing. The value is not validated: a word that is not a level, such as "warning", is read as a target name and silences every log line, errors included. An empty value, or one in which no directive parses, logs errors only. Read once at startup and not applied on reload.

[subscribe] · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
pathpathyes—The subscribe file. A relative path resolves against the working directory of the process, like every other path in the config. Without it the config is refused with [subscribe] needs a path naming the subscribe file. The file is read at every load, and a change to it reloads.
routestableno—Your picks, written as [subscribe.routes]: each key is a route group's name, or default for traffic no group matches, and each value is the tag that carries that traffic. A value may name a node, one of the config's own outbounds or balancers, direct or blackhole. A key that is not a group ([subscribe.routes] names "…", which is not a route group in <file>) or a value that names nothing ([subscribe.routes] "…" = "…": no node, outbound or balancer has that name) fails the config. A group without a pick uses what it inherits. default overrides [route] default.

[api] · Explained in REST API

KeyTypeRequiredDefaultDescription
listenstringno"127.0.0.1:9090"Where the API listens: ip:port (127.0.0.1:9090, [::1]:9090), or a path for a Unix socket. Any value that contains a / is a path, so write ./api.sock rather than api.sock; the directory must exist. Windows refuses a Unix socket when the API starts (unix socket <path>: not served on this platform). A host name is refused ([api] listen "…": expected ip:port, or a path (containing a /) for a unix socket).
secretstringdepends—The bearer token every request must carry, as Authorization: Bearer <secret>. Required unless listen is a loopback address or a Unix socket ([api] listen …: an API reachable from other hosts needs a secret; listen on a loopback address or a unix socket, or set one). An empty value is refused ([api] secret is empty). Use a long random value.

[[inbound]] · Explained in Inbounds

KeyTypeRequiredDefaultDescription
tagstringyes—Name of the inbound. It must be unique among inbounds (duplicate inbound tag …) and not empty. Routing rules match it with inbound_tag, and log lines use it. Inbound and outbound tags are separate namespaces.
protocolstring (enum)yes—The protocol clients speak: socks, http, trojan, vless, vmess, shadowsocks, anytls, sss, hysteria2 (aliases hysteria and hy2) or tun. Values are case-sensitive. wireguard is refused with wireguard cannot be used as an inbound (no server implementation); anything else fails with unknown protocol.
listenstringno"127.0.0.1"Address to bind. Defaults to loopback on purpose; write 0.0.0.0 or :: to accept connections from the network. Write IPv6 addresses bare (::, not [::]). A value starting with / is a Unix socket path, refused on Windows (unix sockets are not served on windows); a value starting with @ (abstract socket) is refused. hysteria2 and anytls cannot listen on a Unix socket. Must be absent for tun. Two inbounds cannot bind the same address and port (… is bound by another inbound).
portu16depends—Port to bind, from 0 to 65535. Required when listen is absent or an address (port is required). Must be absent for a Unix socket (a unix socket listen has no port; remove port) and for tun. For hysteria2 this is a UDP port.
streamtableno—Transport under the protocol: network (tcp, tls, ws, grpc), security and the tls, ws, grpc and reality subtables. socks, http, trojan, vless, vmess, shadowsocks, anytls and sss on an IP listener use it; anytls needs network = "tls", only vless takes security = "reality", and a socks inbound over anything but plain TCP needs udp = false. For hysteria2 and tun, and on a Unix socket, a network other than tcp or a security other than none is refused.
sniffingboolnotrueRead a TLS SNI or HTTP Host from the first bytes of a flow whose destination is a bare IP, so that domain rules can match it. Flows addressed by domain are never inspected.
settingstabledepends{}Protocol-specific settings, described on each protocol page. Required for shadowsocks and hysteria2, which have mandatory keys. Unknown keys are refused with inbound <tag>: invalid settings: …. These errors carry no line number.

[inbound.settings] · protocol = "socks" · Explained in SOCKS

KeyTypeRequiredDefaultDescription
authstring (enum)no"none"How clients authenticate. "none" accepts anyone and allows SOCKS4, SOCKS4a and SOCKS5. "password" requires SOCKS5 username/password authentication (RFC 1929) and refuses SOCKS4. The match is exact and case-sensitive; any other value, including Xray's "noauth", fails with unknown socks auth.
accountsarray of tablesdepends[]The accounts accepted when auth = "password", each written as { user = "…", pass = "…" }. Both keys are required in every entry. Each account is named by its user, which must not be empty (accounts[N] has no user) and must not repeat (accounts[0] and accounts[1] are both named "…").
udpboolnotrueAccept the SOCKS5 UDP ASSOCIATE command. When false, the server answers UDP ASSOCIATE with reply code 0x07 (command not supported) and closes the connection. An inbound with a TLS, WebSocket or gRPC transport must set it to false (socks serves udp associate over plain tcp only; turn udp off to wrap it in a transport).
udp_bindstringdepends—The IP address (IPv4 or IPv6, not a hostname) on which each association binds its UDP relay socket, and which the server reports to the client as the relay address. Without it, the relay uses the local address of the TCP connection the client opened. The relay hears only the address the client's control connection came from, so udp_bind must be in the address family clients connect over: an IPv4 address, or an IPv4-mapped IPv6 one such as ::ffff:192.0.2.10, hears only IPv4 clients, :: hears both, and any other IPv6 address hears only IPv6 clients. A UDP ASSOCIATE from a client the relay could not hear is refused with reply code 0x02 (connection not allowed by ruleset). Required when listen is a Unix socket path and udp is true, because a Unix socket has no local IP. On a Unix socket, each client's UDP ASSOCIATE must also name the exact IP address and port its datagrams will come from, in a family udp_bind hears; a request that leaves either at zero or names a domain is refused with 0x02.

[inbound.settings] · protocol = "http" · Explained in HTTP proxy

KeyTypeRequiredDefaultDescription
accountsarray of tablesno[]Accounts checked against the client's Proxy-Authorization: Basic header. Empty means an open proxy: every client is accepted without credentials. When set, a request without a matching account is answered 407.
accounts[].userstringyes—Username, case-sensitive. Each account is named by it, so it must not be empty (accounts[N] has no user) and two entries cannot share it (accounts[0] and accounts[1] are both named "…").
accounts[].passstringyes—Password. It must match exactly, including case, and it may contain :. Both user and pass are required in every entry; a missing one fails the config with missing field.
allow_transparentboolnofalseAccept plain requests in origin-form (GET /path) and take the target from the Host header, port 80 if it has none. When false, such a request is answered 400. CONNECT requests and absolute-form http:// or https:// requests are served either way.

[inbound.settings] · protocol = "shadowsocks" · Explained in Shadowsocks

KeyTypeRequiredDefaultDescription
methodstring (enum)yes—The cipher. A value that starts with 2022- selects Shadowsocks 2022 and must be exactly 2022-blake3-aes-128-gcm, 2022-blake3-aes-256-gcm or 2022-blake3-chacha20-poly1305. Anything else is a legacy AEAD method, matched case-insensitively: aes-128-gcm, aes-256-gcm, chacha20-poly1305, xchacha20-poly1305, or one of their aliases. The value is not trimmed. An unknown value fails with unknown shadowsocks method or unknown shadowsocks-2022 method.
passwordstringyes—Legacy methods: the shared password, from which the key is derived. It is ignored when users is not empty, but the key must still be present. Shadowsocks 2022: a base64 pre-shared key (standard alphabet with padding) of 16 bytes for 2022-blake3-aes-128-gcm and 32 bytes for the other two methods, such as openssl rand -base64 16 prints. When users is not empty, this is the identity PSK (iPSK) that every client puts first in its password.
usersarray of tablesno[]Users on one port, each written as { password = "…", email = "…" }. clients is accepted as an alias, but not together with users. Without users, the inbound has a single shared password or PSK. For Shadowsocks 2022, multi-user needs an AES-GCM method: 2022-blake3-chacha20-poly1305 has no multi-user mode.
users[].passwordstringyes—Legacy methods: this user's password. Shadowsocks 2022: this user's base64 PSK (uPSK), with the same length as password. Two users cannot present the same value (users … and … present the same credential).
users[].emailstringyes—The name this user is known by. Required in every entry (inbound <tag>: users[N] has no email; a user of this inbound is named by its email), and two users cannot share it (users[0] and users[1] are both named "…"). It never goes on the wire and need not be an e-mail address.

[inbound.settings] · protocol = "trojan" · Explained in Trojan

KeyTypeRequiredDefaultDescription
usersarray of tablesno[]The accounts this inbound accepts, one table per user. There is no top-level password key, and Xray's clients and fallbacks keys fail the config as unknown fields.
users[].passwordstringyes—The user's secret. The client sends the lowercase hex of SHA224(password), and the server looks that hash up among its users, so use a long random value. Two users cannot share a password (users … and … present the same credential). flow and level are rejected as unknown fields.
users[].emailstringyes—The name this user is known by. Required in every entry (inbound <tag>: users[N] has no email; a user of this inbound is named by its email), and two users cannot share it (users[0] and users[1] are both named "…"). It never goes on the wire and need not be an e-mail address. katana builds its users from the panel instead of from this table and names them itself.

[inbound.settings] · protocol = "vless" · Explained in VLESS

KeyTypeRequiredDefaultDescription
usersarray of tablesno[]The users allowed to connect, one table per user, each identified by a UUID. Xray's clients, decryption and fallbacks keys do not exist here and fail the config as unknown fields.
users[].idstringyes—The user's UUID. Accepted forms: hyphenated (11111111-2222-3333-4444-555555555555), 32 hex digits without hyphens, or the hyphenated form wrapped in braces or prefixed with a lowercase urn:uuid:; hex digits in either case. Anything else fails with invalid uuid. Two users cannot share a UUID (users … and … present the same credential). The keys of an entry are id and email: level is rejected, and so is flow, which is set for the whole inbound.
users[].emailstringyes—The name this user is known by. Required in every entry (inbound <tag>: users[N] has no email; a user of this inbound is named by its email), and two users cannot share it (users[0] and users[1] are both named "…"). It never goes on the wire and need not be an e-mail address.
flowstring (enum)no—The XTLS flow served to every user of the inbound: "xtls-rprx-vision" for Vision, or unset (or "") for plain VLESS. Vision runs only over REALITY (security = "reality"); on any other transport the config fails with vless vision (xtls-rprx-vision) rides only over reality. Any other value fails with unknown vless flow "…". A Vision inbound refuses a client that does not send the flow, and an inbound without it refuses a client that does.

[inbound.settings] · protocol = "vmess" · Explained in VMess

KeyTypeRequiredDefaultDescription
usersarray of tablesno[]The users allowed to connect, one table per user, each identified by a UUID. Every user has the same access. The Xray key clients is rejected as an unknown field.
users[].idstringyes—The user's UUID. Accepted forms: hyphenated (11111111-2222-3333-4444-555555555555), 32 hex digits without hyphens, or the hyphenated form wrapped in braces or prefixed with a lowercase urn:uuid:; hex digits in either case. Anything else fails with invalid uuid. Two users cannot share a UUID (users … and … present the same credential). The keys of an entry are id and email: alterId and level are rejected.
users[].emailstringyes—The name this user is known by. Required in every entry (inbound <tag>: users[N] has no email; a user of this inbound is named by its email), and two users cannot share it (users[0] and users[1] are both named "…"). It never goes on the wire and need not be an e-mail address.
clock_checkboolnotrueAccept a VMess handshake only while its timestamp is within 120 seconds of the server clock, either way. false accepts any plausible timestamp, so a client whose clock is wrong still connects; the cost is that a handshake replayed more than 240 seconds after it first arrived is served again. A VLESS inbound has no such key.

[inbound.settings] · protocol = "anytls" · Explained in AnyTLS

KeyTypeRequiredDefaultDescription
usersarray of tablesno[]The accounts this inbound accepts, one table per user, written as for Trojan. sing-box's name key is not accepted; write email.
users[].passwordstringyes—The user's secret. A client sends SHA-256(password) right after the TLS handshake, and the server looks the digest up among its users, so use a long random value. Two users cannot share a password (users … and … present the same credential).
users[].emailstringyes—The name this user is known by. Required in every entry (inbound <tag>: users[N] has no email; a user of this inbound is named by its email), and two users cannot share it (users[0] and users[1] are both named "…"). It never goes on the wire and need not be an e-mail address.
padding_schemearray of stringsno—The padding scheme the server pushes to every client whose own scheme differs, one line per entry, as sing-box writes it (["stop=8", "0=30-30", …]). The lines are joined with \n; the result must parse and be at most 2048 bytes. Leave the key out for the reference default; an empty list fails with padding scheme is empty.

[inbound.settings] · protocol = "sss" · Explained in sss

KeyTypeRequiredDefaultDescription
usersarray of tablesno[]The users allowed to connect, one table per user, each identified by a UUID. The keys of an entry are id and email, as on a VLESS inbound.
users[].idstringyes—The user's UUID, in the forms a VLESS inbound accepts. All 16 bytes are compared: unlike VLESS, no group of the UUID is ignored. Two users cannot share a UUID (users … and … present the same credential).
users[].emailstringyes—The name this user is known by, unique within the inbound. It never goes on the wire.
transformtableno{ up = [], down = [] }The two transform chains, written from the client's view: up is what clients send (this inbound decodes it), down what this inbound sends back (it encodes it). Each is one expression in the transform notation, composed right to left ("baseN()|zstd()" runs zstd first), or an array of expressions run in the order written (["zstd()", "baseN()"]). Each direction compiles to at most 32 transforms. An empty or absent list is the identity. Every client must write the same two chains.
udp_max_datagramu16no65535The largest datagram one UDP record carries, from 1 to 65535. Both ends must set the same value. A reply larger than this is dropped; a record from the client that announces more fails its stream.
flush_delaystringno"0ms"How long this end may hold a flush back to gather more input into the same call, written with its unit ("5ms"). At most 10ms. The first flush of a stream is never held. Each end sets its own.
header_timeoutstringno"10s"How long a stream has, from the moment the transport hands it over, to deliver a complete request header: "10s" or "500ms". Must be above zero. A stream refused before authentication is also drained for at most this long.
rejectstring or tableno"drain"What a stream refused before authentication gets: "drain" reads and discards until the client closes or header_timeout passes, then closes; { fallback = "127.0.0.1:8080" } replays the bytes received so far to that ip:port over TCP and relays the two connections from then on. The table holds fallback and nothing else: any other key is refused by name. A host name is refused.

[inbound.settings] · protocol = "hysteria2" · Explained in Hysteria 2

KeyTypeRequiredDefaultDescription
cert_filepathyes—PEM certificate chain the QUIC listener presents, leaf first. It is read and parsed with rustls when the config is built, so --test catches a missing or unreadable file. The listener itself accepts a certificate without a subjectAltName, but rustls-based clients (including the hysteria2 outbound) and current upstream clients refuse one, so give it a DNS or IP SAN.
key_filepathyes—PEM private key for cert_file (PKCS#8, PKCS#1 or SEC1). It may be the same file as cert_file. Missing either key gives hysteria2 needs both cert_file and key_file.
passwordstringdepends—One credential shared by every client. Set exactly one of password and users. It must not be empty, and should be printable ASCII, because a credential with other characters never matches. The client sends it unchanged as its auth string.
usersarray of tablesdepends—Per-user credentials, { user, pass, email }. Set exactly one of password and users; an empty list counts as unset. The client sends user:pass as its auth string.
users[].userstringyes—User name. Must be non-empty, should be printable ASCII, and must not contain :, which separates name and password on the wire (a hysteria2 account needs a name without : and a password). It is compared case-insensitively (ASCII), so two names that differ only in case are refused (users … and … present the same username).
users[].passstringyes—The user's password. Must be non-empty and should be printable ASCII. Compared exactly, and it may contain :, because the server splits the credential at the first colon.
users[].emailstringno""The name this user is known by, when set; otherwise the user is known by user. Two users cannot end up with the same name (users[0] and users[1] are both named "…"). It is never sent on the wire.
udpboolnofalseRelay UDP over QUIC datagrams as well as TCP. Off by default, unlike the socks inbound. The server tells each client whether UDP is available when it authenticates.
udp_idle_timeoutu64no60Seconds a UDP association may stay silent in both directions before it is closed. Accepted range is 2 to 600. Setting it while udp is false is an error, not a no-op.
max_connectionsintegerno262144Concurrent QUIC connections this listener serves. A client beyond the limit has its handshake refused at once. Must be at least 1 (max_connections and max_circuits must be at least 1).
max_circuitsintegerno4194304Live circuits across the whole listener, where each TCP stream and each UDP association counts as one. A stream beyond the limit is reset and a new association is dropped. Must be at least 1.
obfsstring (enum)no—Packet obfuscation beneath QUIC. The only accepted value is salamander, exact and lowercase; anything else fails with unknown obfs. Clients must use the same obfs and obfs_password.
obfs_passwordstringdepends—Pre-shared key for salamander, at least 4 bytes (salamander obfs key must be at least 4 bytes). Required when obfs is set; setting it without obfs is an error, so a typo in obfs cannot silently turn obfuscation off. Changing obfs or this key disconnects every connected client, so etemenanki-app refuses a reload that changes them and asks for a restart.
masqueradetableno—The HTTP/3 response given to any request that is not a valid authentication, including a wrong credential. See the masquerade table below.
bandwidthtableno—This server's rates, written as [inbound.settings.bandwidth]: down is the receive rate told to every client, up caps what the server sends to one client. See the bandwidth table below.
ignore_client_bandwidthboolno—Answer every client auto, so neither end sends at a fixed rate and both use congestion. Unset, it is true while bandwidth has neither up nor down, and false, as upstream's default, once a rate is given.
congestionstring (enum)no"cubic"Congestion control when no fixed rate is agreed: cubic, bbr or reno (also newreno, new_reno), in lower case. Anything else fails with unknown congestion "…" (expected "cubic", "bbr" or "reno").
quictableno—QUIC settings of each client's connection, written as [inbound.settings.quic]. See the quic table below.

[inbound.settings.masquerade] · Explained in Hysteria 2

KeyTypeRequiredDefaultDescription
statusu16no404HTTP status code of the response. Any code from 100 to 999 is accepted except 233, which is the Hysteria authentication success status and would tell the prober it had authenticated. Anything below 100 or above 999 fails with is not an HTTP status code.
bodystringno"404 page not found\n"Response body, sent as is with a matching Content-Length. The default is byte for byte what Go's http.NotFound returns.
content_typestringno"text/plain; charset=utf-8"Value of the Content-Type response header.

[inbound.settings.bandwidth], [outbound.settings.bandwidth] · Explained in Hysteria 2

KeyTypeRequiredDefaultDescription
upstringno—The most this end sends at. A rate is a number and a unit, as upstream writes it: "100 mbps", "1 gbps", "512 kbps", "1g". Units are b, k, m, g and t, with or without bps, in any case; a bare number is refused (bandwidth.up: a bandwidth is a number and a unit, such as "100 mbps"). An unknown unit fails with unknown bandwidth unit "…"; use bps, kbps, mbps, gbps or tbps, and zero with a bandwidth must be above zero and below 2^64 bytes per second.
downstringno—The most this end receives at, which the other end is told in the handshake. Same form as up.
disable_loss_compensationboolnofalseSend exactly the agreed rate. By default Brutal sends more than the rate to make up for the packets it sees lost, up to 1.25 times the rate.

[inbound.settings.quic], [outbound.settings.quic] · Explained in Hysteria 2

KeyTypeRequiredDefaultDescription
init_stream_receive_windowu64no—Upstream's initial receive window of one stream, in bytes. etemenanki grants the whole window at once, so it uses max_stream_receive_window; this key alone stands in for it. Above max_stream_receive_window it fails with quic.init_stream_receive_window is above quic.max_stream_receive_window.
max_stream_receive_windowu64no8388608Receive window of one stream, in bytes. At least 16384 (stream_receive_window must be at least 16384 bytes).
init_conn_receive_windowu64no—Upstream's initial receive window of the connection, in bytes; used as init_stream_receive_window is.
max_conn_receive_windowu64no20971520Receive window of the whole connection, in bytes. At least 16384 (conn_receive_window must be at least 16384 bytes).
max_idle_timeoutu64no30Seconds a connection may carry no packets before it is closed. From 4 to 120 (max_idle_timeout must be a whole number of seconds between 4 and 120).
keep_alive_periodu64no10Outbound only: how often an idle connection is pinged, in seconds. From 2 to 60 (keep_alive_period must be a whole number of seconds between 2 and 60). On an inbound it fails with quic.keep_alive_period is a client setting; a server does not ping.
max_incoming_streamsu32no65536Inbound only: streams one client may have open at once. A client beyond it waits for a free stream. At least 1 (max_incoming_streams must be at least 1). On an outbound it fails with quic.max_incoming_streams is a server setting.
disable_path_mtu_discoveryboolnofalseKeep packets at QUIC's minimum size instead of probing the path for larger ones.

[inbound.settings] · protocol = "tun" · Explained in TUN

KeyTypeRequiredDefaultDescription
namestringno—Name of the interface to create, for example "etm0". When absent, the system picks one and the start-up log names it. Linux limits interface names to 15 bytes. On macOS the name must be utun<N>, such as "utun7", or absent (tun name "…": macOS names a tun device utun<N>, or leave it unset). On Windows it names the Wintun adapter. Set a fixed name if firewall rules or scripts refer to the interface.
mtuu16no1500MTU of the interface and of the userspace IP stack behind it, in bytes. The minimum is 1280, the smallest MTU IPv6 allows; a lower value fails with tun mtu must be at least 1280. Values above 65535 fail to parse.
addressarray of stringsno[]Addresses assigned to the interface, each written as "address/prefix", IPv4 or IPv6, for example "10.77.0.1/32" or "2001:db8:77::1/64". Without a prefix, the address is a host address (/32 or /128). The prefix also makes the kernel route that whole subnet into the device. Host bits are allowed here. A malformed entry fails with bad tun address.
routesarray of stringsno[]Networks routed into the interface, in strict CIDR form such as "203.0.113.0/24": every host bit must be zero, so "203.0.113.5/24" fails with bad tun route "203.0.113.5/24": host part of address was not zero. Without a prefix, an entry is a host route. The routes are installed when the device is created and disappear with it: in the main table on Linux, through the routing socket on macOS and through the IP helper API on Windows.
udpboolnotrueRelay UDP as well as TCP. When false, every UDP packet that reaches the device is dropped without a reply.
udp_idle_timeoutu64no60Seconds without traffic after which the userspace stack retires a UDP flow (one client address and port talking to one peer). An association polls all its flows together, so traffic on any of them keeps every flow alive. An association ends when its last flow is retired, and in any case after 300 seconds without a datagram in either direction.
max_flowsintegerno65536Upper bound on live flows across the device: each TCP connection counts as one, and so does each UDP association (all the UDP traffic of one client address and port). At the limit, a new TCP connection or association is dropped and logged at debug level.
ipv6boolnotrueRelay IPv6. With false, every IPv6 TCP connection is refused at its handshake with a reset, and every other IPv6 packet is dropped, so clients fall back to IPv4 at once. With true, an IPv6 connection is still refused the same way when no outbound it may be routed to can reach IPv6. A change is refused on reload like any other tun change; restart to apply it.

[[outbound]] · Explained in Outbounds

KeyTypeRequiredDefaultDescription
tagstringyes—Name of the outbound. Route rules, [route].default and [[balancer]].outbounds refer to it. Must be unique among outbounds (duplicate outbound tag …) and not empty, and no [[balancer]] may reuse it. Without [route].default, the first [[outbound]] in the file is the default route.
protocolstring (enum)yes—What the outbound speaks: freedom (alias direct), blackhole (alias block), socks, http, trojan, vless, vmess, shadowsocks, anytls, sss, hysteria2 (aliases hysteria, hy2) or wireguard. Matched exactly and case-sensitively; anything else fails with unknown protocol.
serverstringdepends—Host name or IP address of the upstream server, without a port. Required by socks, http, trojan, vless, vmess, shadowsocks, anytls, sss and hysteria2 (missing server). An IPv6 address may be written bare (2001:db8::1) or in brackets ([2001:db8::1]); brackets around anything else fail with outbound <tag>: invalid host "…": brackets hold only an IPv6 literal. It is also the fallback for the TLS server name (including hysteria2 server_name), the REALITY server name, the WebSocket Host and the gRPC authority. A wireguard outbound names its peer in endpoint instead.
portu16depends—Port of the upstream server. Required by the same protocols as server (missing port). For hysteria2 it is a UDP port; for every other protocol, a TCP port.
streamtableno—Transport to the upstream: network (tcp, tls, ws, grpc), security and the tls, ws, grpc and reality sub-tables. Used by socks, http, trojan, vless, vmess, shadowsocks, anytls and sss; anytls needs network = "tls", and only vless takes security = "reality". freedom, blackhole, wireguard and hysteria2 refuse any network other than tcp and any security other than none (protocol <protocol> does not support stream network "…"). Absent means plain TCP.
address_familystring (enum)no"auto"Which IP family to use when a name is resolved: auto, ipv4_only, ipv6_only, prefer_ipv4 or prefer_ipv6, plus aliases such as ipv4, v6 or prefer_v4. Trimmed, case-insensitive, and - counts as _. For a proxy outbound it applies to the server name; for freedom, to the destination; for wireguard, to destinations inside the tunnel (its endpoint has endpoint_address_family). An unknown value fails with invalid address_family "…".
settingstabledepends{}Protocol-specific settings, described on each protocol page. Required for trojan, vless, vmess, shadowsocks, anytls, sss, hysteria2 and wireguard, which have mandatory keys; optional for socks and http. Unknown keys are refused, and errors here read outbound <tag>: invalid settings: ….

[outbound.settings] · protocol = "socks" · Explained in SOCKS

KeyTypeRequiredDefaultDescription
userstringno—Username for SOCKS5 username/password authentication (RFC 1929). When set, the client offers only the password method; when absent, it offers only "no authentication". Longer than 255 bytes is truncated to 255.
passstringno""Password that goes with user, sent with it during authentication. Longer than 255 bytes is truncated to 255.

[outbound.settings] · protocol = "http" · Explained in HTTP proxy

KeyTypeRequiredDefaultDescription
userstringno—Username for the upstream proxy. When set, every CONNECT carries Proxy-Authorization: Basic with user:pass. When absent, no credential is sent.
passstringno""Password for the upstream proxy, sent together with user. user without pass sends an empty password.

[outbound.settings] · protocol = "shadowsocks" · Explained in Shadowsocks

KeyTypeRequiredDefaultDescription
methodstring (enum)yes—The cipher, with the same accepted values as the inbound: a 2022- value must be exactly 2022-blake3-aes-128-gcm, 2022-blake3-aes-256-gcm or 2022-blake3-chacha20-poly1305; any other value is a legacy AEAD method or alias, matched case-insensitively. It must match the server. An unknown value fails with unknown shadowsocks method or unknown shadowsocks-2022 method.
passwordstringyes—Legacy methods: the password, used as written (a : has no special meaning). Shadowsocks 2022: either one base64 PSK for a single-PSK server, or a chain iPSK:uPSK for a multi-user server, where the last key is your own user key and every key before it is an identity key. Each key is the length the method needs: 16 bytes for 2022-blake3-aes-128-gcm, 32 bytes for the other two.

[outbound.settings] · protocol = "trojan" · Explained in Trojan

KeyTypeRequiredDefaultDescription
passwordstringyes—The password the server knows you by. The outbound sends the lowercase hex of SHA224(password) at the start of every connection it opens. Without it the outbound fails to build with an invalid settings: missing field error that names password. It is the only key: any other, such as email, is an error.

[outbound.settings] · protocol = "vless" · Explained in VLESS

KeyTypeRequiredDefaultDescription
idstringyes—The UUID to authenticate with; it must match a users[].id on the server. Same accepted forms as the inbound: hyphenated, 32 hex digits, or the hyphenated form braced or prefixed with a lowercase urn:uuid:. Leaving it out fails with invalid settings: missing field, a malformed value with invalid uuid. Xray's encryption and level are rejected, and there is no mux setting.
flowstring (enum)no—The XTLS flow the client announces: "xtls-rprx-vision" for Vision, or unset (or "") for plain VLESS. It must match the server. Vision runs only over REALITY (security = "reality"); on any other transport the config fails with outbound proxy@v0: vless vision (xtls-rprx-vision) rides only over reality. Any other value fails with unknown vless flow "…".

[outbound.settings] · protocol = "vmess" · Explained in VMess

KeyTypeRequiredDefaultDescription
idstringyes—The UUID of the account on the server, in any form the inbound accepts. Leaving it out fails with a missing field error; a malformed value fails with invalid uuid.
securitystring (enum)no"aes-128-gcm"The body cipher. aes-128-gcm and auto select AES-128-GCM, as does leaving the key out. chacha20-poly1305 selects ChaCha20-Poly1305. Matching ignores letter case. Anything else, including none and zero, fails with unknown vmess security "…". Not to be confused with [outbound.stream].security, which turns on TLS.

[outbound.settings] · protocol = "anytls" · Explained in AnyTLS

KeyTypeRequiredDefaultDescription
passwordstringyes—The password the server knows you by. The outbound sends SHA-256(password) once per session, right after the TLS handshake. Without it the outbound fails with an invalid settings: missing field error that names password; an empty one fails with anytls password must not be empty.
clientstringno""What the client setting announces to the server at the start of each session. Empty, the default, names no client software.
idle_session_check_intervalu64no30Seconds between two checks of the idle sessions in the pool. A whole number of seconds, not a duration string: "30s" fails. A value of 5 or less means 30.
idle_session_timeoutu64no30Seconds a session may stay idle in the pool before a check closes it. A value of 5 or less means 30.
min_idle_sessionintegerno0How many idle sessions a check keeps however long they have been idle, the newest first. 0 lets every idle session time out.

[outbound.settings] · protocol = "sss" · Explained in sss

KeyTypeRequiredDefaultDescription
idstringyes—The UUID to authenticate with; it must match a users[].id on the server. Same accepted forms as a VLESS outbound. Leaving it out fails with invalid settings: missing field, a malformed value with invalid uuid.
transformtableno{ up = [], down = [] }The server's two chains, exactly as the server writes them: up is what this outbound sends (it encodes it), down what the server sends back (it decodes it). Same notation and limits as the inbound.
udp_max_datagramu16no65535The server's datagram limit, from 1 to 65535. A datagram larger than this is dropped before it is sent.
flush_delaystringno"0ms"This end's own flush delay, at most 10ms; see the inbound key. It need not match the server's. The flush that carries the request header is never held.

[outbound.settings] · protocol = "hysteria2" · Explained in Hysteria 2

KeyTypeRequiredDefaultDescription
passwordstringyes—The credential sent in the Hysteria-Auth header once per QUIC connection. Must not be empty (hysteria2 password must not be empty). For a server with a users table, write it as user:pass.
server_namestringno—TLS server name (SNI) and the name the certificate is verified against. Defaults to the outbound's server. Set it when server is an IP address and the certificate names a domain.
allow_insecureboolnofalseAccept any server certificate without checking its chain or name. Cannot be combined with ca_file (allow_insecure and ca_file cannot both be set). Use it only for testing.
ca_filepathno—PEM file of extra CA certificates, added to the system trust store rather than replacing it. Cannot be combined with allow_insecure. A relative path resolves against the working directory.
obfsstring (enum)no—Packet obfuscation beneath QUIC. The only accepted value is salamander; anything else fails with unknown obfs. Must match the server.
obfs_passwordstringdepends—Pre-shared key for salamander, at least 4 bytes (salamander obfs key must be at least 4 bytes), identical to the servers. Required when obfs is set; setting it without obfs is an error.
max_concurrent_streamsintegerno102400TCP flows this outbound may have open at once on its single shared connection, for all users together. A flow beyond the limit fails at once with hysteria2: connection is at its concurrent-stream limit. Must be at least 1 (max_concurrent_streams must be at least 1).
portsstringno—Port hopping: every UDP port the server answers on, as upstream writes them, such as "443,20000-30000". The client changes port every hop interval and keeps one QUIC connection across the changes. With ports, the outbound's port may be left out. A part that is not a port or a range fails with ports "…": "…" is not a port or a range of them, and port 0 with port 0 cannot be hopped to.
hop_intervalu64no30Seconds on one port before hopping, at least 5 (the hop interval must be at least 5 seconds). Needs ports (a hop interval is set but ports is not). It and min_hop_interval / max_hop_interval are alternatives.
min_hop_intervalu64no—With max_hop_interval, a random interval drawn anew for each hop, in seconds. Set both or neither (min_hop_interval and max_hop_interval go together); min_hop_interval must be at least 5 and at most max_hop_interval.
max_hop_intervalu64no—The upper bound of the random hop interval, in seconds.
bandwidthtableno—This client's rates, written as [outbound.settings.bandwidth]: up is the most it sends at, down the receive rate it tells the server. Without up the client never sends at a fixed rate. See the bandwidth table below.
congestionstring (enum)no"cubic"Congestion control when no fixed rate is agreed: cubic, bbr or reno, as on the inbound.
quictableno—QUIC settings of the outbound's connection, written as [outbound.settings.quic]. See the quic table below.

[outbound.settings] · protocol = "wireguard" · Explained in WireGuard

KeyTypeRequiredDefaultDescription
private_keystringyes—Your own Curve25519 private key, the PrivateKey line of a wg-quick file. 32 bytes, written as standard padded base64 (what wg genkey prints) or as 64 hex digits. Unpadded base64 is refused. Error: invalid wireguard private_key.
peer_public_keystringyes—The peer's public key, the PublicKey line of the [Peer] section. Same encodings as private_key. Error: invalid wireguard peer_public_key.
preshared_keystringno—Optional pre-shared key mixed into the handshake, the PresharedKey line. Same encodings as private_key. Set it only when the peer has one for you; a mismatch means the handshake never completes. Error: invalid wireguard preshared_key.
endpointstringyes—The peer's UDP address as host:port. An IPv6 address is written in brackets as wg-quick writes it ([2001:db8::1]:51820), or bare (2001:db8::1:51820), split at the last :; brackets around anything else fail with outbound <tag>: invalid host "…": brackets hold only an IPv6 literal. The host is an IP address or a name. A name is looked up when the tunnel is brought up (on its first flow, and again whenever the tunnel is rebuilt) with the resolver [dns] sets up for proxy servers, and endpoint_address_family picks which of its addresses is dialed. Errors: wireguard endpoint must be host:port, invalid wireguard endpoint port.
endpoint_address_familystring (enum)no"auto"Which IP family to use for a named endpoint, with the same values and aliases as address_family (auto, ipv4_only, ipv6_only, prefer_ipv4, prefer_ipv6). The outbound's own address_family is for destinations inside the tunnel, not for the endpoint. An unknown value fails with invalid endpoint_address_family "…".
addressarray of IPsyes—The tunnel-local addresses the peer assigned to you, as bare IPs without a prefix length: ["10.0.0.2", "2001:db8:a::2"]. A CIDR such as 10.0.0.2/32 is refused with invalid IP address syntax. They decide which destination families the tunnel can reach: without an IPv6 address, IPv6 destinations are unreachable. An address_family of ipv4_only or ipv6_only needs an address of that family (wireguard address_family ipv6_only needs an IPv6 address).
mtuintegerno1420Largest IP packet inside the tunnel, in bytes; the userspace TCP stack sizes its segments from it. Lower it (for example to 1280) when small requests work but large transfers stall.
keepaliveu16no—Persistent keepalive interval in seconds, the PersistentKeepalive line. Absent or 0 turns it off. Set it (commonly 25) when this host is behind NAT or a stateful firewall and connections may sit idle.
reservedarray of integersno—Exactly three bytes ([0, 0, 0] to [255, 255, 255]) written into header bytes 1 to 3 of every outgoing WireGuard packet, as Xray's reserved does. Incoming packets have these bytes cleared before decoding whether or not reserved is set. Only set it when your service tells you to. Any other length fails with invalid length …, expected an array of length 3.

[inbound.stream] · [outbound.stream] · Explained in Transports and TLS

KeyTypeRequiredDefaultDescription
networkstring (enum)no"tcp"The carrier under the protocol: tcp (plain TCP), tls (TLS over TCP), ws (WebSocket) or grpc (gRPC over HTTP/2). Case-sensitive and not trimmed: "WS", " ws" and "" all fail with unknown stream network. Protocols without a transport accept only tcp (or empty) here, and anytls only tls.
securitystring (enum)no"none"none (or empty) for no extra layer, tls to put TLS under a ws or grpc network, reality for REALITY over network = "tcp", under VLESS only (reality is for vless only). Surrounding spaces are ignored; the match is case-sensitive. Any other value fails with unknown stream security "..." (expected "tls" or "none"). With network = "tcp", tls is refused; write network = "tls" instead. With network = "tls", the connection is TLS either way. reality with any other network fails with security = "reality" needs network = "tcp".
tlstabledepends—Certificate, key and verification settings for a stream that uses TLS. An inbound using TLS needs cert_file and key_file here. A ws or grpc outbound also takes server_name as its Host or :authority fallback, with or without TLS. See the [stream.tls] table.
wstableno—WebSocket path and Host for network = "ws". See the [stream.ws] table.
grpctabledepends—gRPC service name and authority for network = "grpc"; that network requires grpc.service_name. See the [stream.grpc] table.
realitytabledepends—REALITY settings for security = "reality": on an inbound the private key, the server names, the shortIds and the cover site dest; on an outbound the server's public key, the server name and the shortId. See the REALITY page.

[inbound.stream.tls] · [outbound.stream.tls] · Explained in Transports and TLS

KeyTypeRequiredDefaultDescription
server_namestringno—Outbound only. The name sent as SNI and checked against the server certificate. Falls back to the outbound server. When the name is an IP address, no SNI is sent and the certificate must list that IP. A ws or grpc outbound also uses it as the fallback for ws.host or grpc.authority, with or without TLS.
allow_insecureboolnofalseOutbound only. Skip certificate chain and host name verification entirely. Cannot be combined with ca_file (tls.allow_insecure and tls.ca_file cannot both be set).
ca_filepathno—Outbound only. A PEM file of CA certificates to trust in addition to the system roots; the host name is still verified. A file with no certificate fails with no certificate in CA PEM bundle. Cannot be combined with allow_insecure. A relative path resolves against the working directory.
cert_filepathdepends—Inbound only, required whenever the inbound uses TLS (tls stream needs tls.cert_file). A PEM certificate chain: the leaf certificate first, then any intermediates. Read at start and whenever a changed configuration is applied. Client certificates are not supported.
key_filepathdepends—Inbound only, required whenever the inbound uses TLS (tls stream needs tls.key_file). The PEM private key that matches the leaf certificate; a key that does not match fails with an OpenSSL error that contains no private key assigned.

[inbound.stream.ws] · [outbound.stream.ws] · Explained in Transports and TLS

KeyTypeRequiredDefaultDescription
pathstringno"/"The HTTP path of the upgrade request. An empty path becomes / and a missing leading / is added, so ray means /ray. A ?ed=N query parameter is not part of the path: on an outbound it turns on early data of up to N bytes (at most 16384); on an inbound it is removed and ignored. The inbound compares the request path exactly and answers anything else with 404.
hoststringno—On an inbound: when set, the request Host header must match it, ignoring case and any :port, or the upgrade gets 404; when absent, any Host is accepted. On an outbound: the Host header to send, falling back to tls.server_name and then to server; it does not change the TLS SNI. Set it when server is an IPv6 address, which is not a valid URI host on its own.

[inbound.stream.grpc] · [outbound.stream.grpc] · Explained in Transports and TLS

KeyTypeRequiredDefaultDescription
service_namestringdepends—Required when network = "grpc" (grpc stream needs grpc.service_name). The tunnel paths are /SERVICE/Tun and /SERVICE/TunMulti. The name is inserted verbatim, so write it without slashes. Both sides must use the same name.
authoritystringno—Outbound only. The HTTP/2 :authority of each request, falling back to tls.server_name and then to server; it does not change the TLS SNI. Set it when server is an IPv6 address, which is not a valid URI authority on its own.

[inbound.stream.reality] · Explained in REALITY

KeyTypeRequiredDefaultDescription
private_keystringyes—The server's X25519 private key as unpadded base64url of 32 bytes (43 characters), the PrivateKey line of xray x25519. Padding (=), the + and / of standard base64, spaces or a wrong length fail with reality.private_key: invalid REALITY private key: expected 32 bytes of unpadded base64url; leaving it out fails with reality needs reality.private_key. No error repeats the key. Keep it secret: anyone who has it can pose as this server.
server_namesarray of stringsyes—The server names (SNI) a client may send to be let in, matched exactly. At least one (reality needs reality.server_names). A wildcard or an empty name fails with invalid reality server name "…"; a trailing dot, a name over 253 bytes or a character other than letters, digits, -, . and _ fails with building inbound <tag> failed: invalid REALITY server name "…". Use names that dest serves: a probe that sends one gets dest's own certificate for it. A client that sends any other name is relayed to dest.
short_idsarray of stringsyes—The shortIds a client may present, each an even number of hex digits, at most 16, in either case. A shorter value is padded with zeros to 8 bytes, as in Xray, so "ab" and "ab00" are the same shortId, and "" is the all-zero one. At least one entry (reality needs reality.short_ids); a malformed one fails with reality.short_ids: invalid REALITY shortId: expected an even number of hex digits, at most 16, without repeating the value. Generate one with openssl rand -hex 8.
deststringyes—The site this server passes itself off as, host:port; an IPv6 literal goes in brackets ([2001:db8::1]:443). The server dials it over TCP for every connection, with the system resolver and outside routing. Leaving it out fails with reality needs reality.dest (host:port), a value without a colon with reality.dest must be host:port, a port that is 0 or not a number with invalid reality.dest port, an empty host with reality dest needs a host.
max_time_diffu64no—Seconds. A client whose clock, as sealed in its hello, differs from the server's by more than this is relayed to dest. Unset or 0 does not check. Xray's maxTimeDiff is in milliseconds.
min_client_versionstringno—The lowest client version let in, inclusive, as x.y.z; fewer parts leave the rest zero (25 is 25.0.0). The version is the one a REALITY client seals into its hello; a client below it is relayed to dest. Each part must be a decimal number below 256, or the config fails with reality.min_client_version: invalid REALITY client version "…": expected x.y.z, each part below 256. etemenanki-app's own client reports 26.6.27.
max_client_versionstringno—The highest client version let in, inclusive, in the same format. A minimum above the maximum fails with reality min_client_version is above max_client_version.
require_hybridboolnofalseLet in only a client whose hello carries exactly one X25519MLKEM768 key share, placed before any X25519 one: the rule XTLS REALITY servers follow since 2026-10. Off, the server takes the first X25519 share, or the X25519 half of a hybrid share. sing-box and mihomo clients send an X25519 share alone, so they are relayed to dest when this is on; Xray v26.10.17 clients and etemenanki-app's own client send the hybrid share first and pass either way.

[outbound.stream.reality] · Explained in REALITY

KeyTypeRequiredDefaultDescription
public_keystringyes—The server's X25519 public key as unpadded base64url of 32 bytes: the Password (PublicKey) line of xray x25519, Xray's publicKey or password. Leaving it out fails with reality needs reality.public_key, a malformed value with reality.public_key: invalid REALITY public key: expected 32 bytes of unpadded base64url. With a key that is not the server's, the server relays the client to dest, and the client refuses dest's real certificate: the connection fails with REALITY TLS: decrypt error.
server_namesarray of stringsdepends—The client sends the first entry as its SNI; it must be one of the server's server_names. Without an entry the SNI is [outbound.stream.tls] server_name, then server, and with none of them the config fails with reality needs reality.server_names, tls.server_name or server. A wildcard fails with outbound proxy@v0: invalid reality server name "*.example.com".
short_idsarray of stringsno[]The client presents the first entry as its shortId, in the server's format: an even number of hex digits, at most 16. Without an entry it presents the all-zero shortId, which the server lets in only when its short_ids include it (""). A malformed value fails with reality.short_ids: invalid REALITY shortId: expected an even number of hex digits, at most 16.

[route] · Explained in Routing

KeyTypeRequiredDefaultDescription
defaultstringno—Tag of the outbound or balancer that takes every flow no rule matches. When absent, the first [[outbound]] in the file is the default; a balancer is never picked implicitly. direct and blackhole work without an outbound block of that name. A tag that names neither an outbound nor a balancer fails with route references unknown outbound <tag>. With [subscribe], [subscribe.routes] default overrides it.
geoippathdepends—Path of a v2ray-format geoip.dat. Required when any rule uses geoip (a geoip matcher is used but no geoip file is configured), and not even opened otherwise. A relative path resolves against the working directory of the process, not the directory of the config file. The file is read at startup and by --test; only the codes the rules name are kept.
geositepathdepends—Path of a v2ray-format geosite.dat. Required when any rule uses geosite (a geosite matcher is used but no geosite file is configured), and not even opened otherwise. Relative paths and reading work as for geoip.
rulearray of tablesno[]The rules, written as [[route.rule]] blocks (singular: [[route.rules]] is an unknown field). Tried in file order; the first rule that matches picks the outbound. With [subscribe], these rules are ignored with a warning, and the subscribe file's route groups take their place.

[[route.rule]] · Explained in Routing

KeyTypeRequiredDefaultDescription
outboundstringyes—Tag of the outbound or balancer that takes the flows this rule matches. direct and blackhole work without an outbound block of that name. An unknown tag fails with route references unknown outbound <tag>.
domain_suffixarray of stringsno[]Matches the domain itself and every subdomain, on label boundaries: example.com matches example.com and a.example.com, not notexample.com. Case-insensitive. Write no leading dot: .example.com matches nothing.
domain_keywordarray of stringsno[]Matches a domain that contains the string anywhere: ads matches ads.example.com and downloads.example.com. Case-insensitive.
domain_fullarray of stringsno[]Matches exactly this domain and no subdomain. Case-insensitive.
domain_regexarray of stringsno[]A regular expression in Rust regex syntax, tested against the lowercased domain. Unanchored: add ^ and $ to match the whole name. The pattern itself is not lowercased, so write it in lower case. An invalid pattern fails with invalid domain regex "<pattern>": ….
cidrarray of stringsno[]Matches a destination IP address inside the range, such as 10.0.0.0/8 or 2001:db8::/32. A bare address is a single host. Host bits must be zero (invalid cidr "10.0.0.1/8": host part of address was not zero). Never matches a destination given as a domain.
source_cidrarray of stringsno[]Matches when the client address is inside the range. Same syntax and errors as cidr. Flows from a Unix-socket inbound have no client address and never match.
portarray of stringsno[]Destination ports as strings: a single port "443" or an inclusive range "8000-9000". Spaces around the numbers are allowed. A bare integer such as 443 fails to parse; a range whose lower bound is above its upper bound fails with invalid port spec: "9000-8000" has a lower bound above its upper bound.
networkstring (enum)no—The transport of the flow: tcp or udp. One string, not an array, lowercase only. Anything else fails with invalid rule network "<value>" (expected "tcp" or "udp").
inbound_tagarray of stringsno[]Matches flows that arrived on one of these inbounds. Compared exactly, case included.
geositearray of stringsno[]A list from [route].geosite: code, or code@attr for only the entries that carry that attribute. Codes and attributes are case-insensitive. Write no geosite: prefix. An unknown code fails with geosite code not found: <code>.
geoiparray of stringsno[]A list from [route].geoip: code matches destination IPs in the list, !code matches destination IPs outside it. Case-insensitive. Like cidr, neither form ever matches a destination given as a domain. An unknown code fails with geoip code not found: <code>.

[[balancer]] · Explained in Balancers

KeyTypeRequiredDefaultDescription
tagstringyes—Name of the balancer. [route].default and [[route.rule]].outbound refer to it exactly as they refer to an outbound. It must not repeat any [[outbound]] tag or the tag of another balancer, and must not be empty.
outboundsarray of stringsyes—The member outbounds, by exact tag. At least one (balancer <tag> has no members). Only outbound tags are accepted, including the nodes of a subscribe file: a missing tag or the tag of another balancer fails with balancer <tag> references unknown outbound <member>. Every member needs an upstream that a TCP connect can probe, so socks, http, trojan, vless, vmess and shadowsocks outbounds can be members, and freedom, blackhole, hysteria2 and wireguard ones are refused with balancer <tag>: outbound <member> has no upstream a TCP health probe can reach. Under failover the list order is the priority.
strategystring (enum)no"failover"How a healthy member is chosen for each new flow: failover takes the first healthy member in outbounds order, round_robin takes each healthy member in turn. Matched exactly and case-sensitively; anything else, such as "roundrobin" or "Failover", fails with unknown balancer strategy "<value>" (expected "failover" or "round_robin").
probe_intervalu64no30Seconds to wait after one health probe of a member finishes before the next one starts. Each member is probed on its own schedule, and the first probe runs as soon as the balancer starts. A probe is a plain TCP connect to the member's server and port.
probe_timeoutu64no5Seconds one probe may take, name resolution included, before the member counts as down.

[dns] · Explained in DNS

KeyTypeRequiredDefaultDescription
backendstring (enum)no"system"Where answers come from: system (the host resolver, getaddrinfo), udp (plain DNS over UDP), tls (DNS over TLS, RFC 7858) or https (DNS over HTTPS, RFC 8484). Lower case only; any other value fails with dns: unknown backend "…" (expected "system", "udp", "tls" or "https").
serverstringdepends—Required for udp, tls and https (dns: the udp backend needs a server address). The resolver's socket address as an IP literal with a port, such as "192.0.2.53:53" or "[2001:db8::53]:853". A host name or a missing port is refused with dns: invalid server address: invalid socket address syntax, because there is nothing yet to resolve it with. For https this is the address that is dialed; url gives the name and the path.
server_namestringdepends—Required for tls. The name sent as SNI and checked against the resolver's certificate. It is never guessed from server; a missing value fails with dns: the tls backend needs a server name to verify against. The https backend takes its name from url instead.
urlstringdepends—Required for https (dns: the https backend needs the resolver's url). Must start with https:// (dns: "…" is not an https:// url). The host is sent as SNI and as the Host header and is what the certificate is checked against, so write it as a name; everything from the first / on is the request path, and /dns-query is used when there is none. A URL with userinfo (user@) or an empty host is refused.
ca_filepathno—PEM file of extra CA certificates that tls and https trust in addition to the system store, for a resolver with a private certificate. A file with no certificate fails with no certificate in CA PEM bundle. A relative path resolves against the working directory.

subscribe file · [[proxy_server]] · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
namestringyes—The node's name, which is the tag of the outbound it becomes and what a pick names. It must differ from every other node and from the config's own outbound and balancer tags (subscribe: node "…" is defined twice, or shares its name with a config outbound).
serverstringyes—Host name or IP address of the server, without a port. Write an IPv6 address bare (2001:db8::10). A name is looked up with the pre_proxy servers of the file's [dns] (or the config's [dns] when the file has none).
portu16yes—The server's port: UDP for hysteria2 and wireguard, TCP for the others.
protocolstring (enum)yes—One of vless, vmess, trojan, shadowsocks, socks, http, hysteria2, wireguard, anytls or sss, spelled exactly. The app's aliases such as hy2 are not accepted here. It decides which of the keys below the node takes; a key of another protocol fails the parse, and so does a protocol the reader does not know (unknown variant).
streamtableno—vless, vmess, trojan, shadowsocks, socks, http and sss: the transport, as an inline table such as { network = "ws", path = "/ws", tls = {} }. See the stream table below. Absent means plain TCP. anytls has no stream: it always runs over TLS, with its TLS keys in the node.
idstringdepends—vless, vmess and sss, required: the user's UUID.
flowstring (enum)no—vless: the XTLS flow, xtls-rprx-vision or left out. It needs a reality stream (vless vision (xtls-rprx-vision) rides only over reality); any other value fails with unknown vless flow.
securitystring (enum)no"auto"vmess: the body cipher, auto (AES-128-GCM), aes-128-gcm or chacha20-poly1305, spelled exactly.
methodstring (enum)depends—shadowsocks, required: aes-128-gcm, aes-256-gcm, chacha20-poly1305 (or chacha20-ietf-poly1305), xchacha20-poly1305 (or xchacha20-ietf-poly1305), 2022-blake3-aes-128-gcm, 2022-blake3-aes-256-gcm or 2022-blake3-chacha20-poly1305.
passwordstringdepends—trojan, shadowsocks, hysteria2 and anytls, required. For a Shadowsocks 2022 method, the base64 key, or iPSK:uPSK for a multi-user server. For a Hysteria 2 server with per-user accounts, user:pass.
userstringno—socks and http: the account's user name.
passstringno—socks and http: the account's password.
server_namestringno—hysteria2 and anytls: the TLS server name, sent as SNI and checked against the certificate. Defaults to the node's server.
allow_insecureboolnofalsehysteria2 and anytls: accept any certificate. Use it only for testing.
obfstableno—hysteria2: Salamander obfuscation, written { type = "salamander", password = "…" }. The password must be at least 4 bytes and match the servers.
portsstringno—hysteria2: port hopping, every port the server answers on, such as "443,20000-30000". The node still needs port. The hop interval defaults to 30 seconds.
hop_intervalu64no—hysteria2: seconds on one port before hopping, at least 5. Needs ports.
upstringno—hysteria2: the most the client sends at, as a number and a unit such as "50 mbps". It becomes the outbound's bandwidth.up.
downstringno—hysteria2: the most the client receives at, which the server is told. It becomes the outbound's bandwidth.down.
private_keystringdepends—wireguard, required: your private key, as in a wg-quick file.
peer_public_keystringdepends—wireguard, required: the peer's public key.
preshared_keystringno—wireguard: the pre-shared key, when the peer has one for you.
addressarray of IPsdepends—wireguard, required: your tunnel addresses as bare IPs, such as ["10.0.0.2", "2001:db8:a::2"]. The peer is the node's server and port.
mtuintegerno1420wireguard: the tunnel MTU.
keepaliveu16no—wireguard: persistent keepalive, in seconds.
reservedarray of integersno—wireguard: exactly three bytes for the reserved header field, only when the service asks for them.
transformtableno—sss: the server's transform chains from the client's view, written { up = […], down = […] }: each direction is an array of expressions in the same notation as the outbound key, run in the order written. A single expression is written as an array of one. Without it, both chains are the identity. The chains are checked when the node becomes an outbound.
udp_max_datagramu16no65535sss: the largest datagram one UDP record carries, as the server sets it.

subscribe file · [[proxy_server]] stream · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
networkstring (enum)yes—tcp, ws, grpc or reality. There is no tls network here: TLS is on whenever the tls table is present. reality is VLESS over REALITY on plain TCP; it takes public_key, server_name and short_id, and no tls table.
pathstringno"/"ws: the WebSocket path.
hoststringno—ws: the Host header. Defaults to tls.server_name, then to the node's server.
service_namestringdepends—grpc, required: the gRPC service name.
authoritystringno—grpc: the HTTP/2 :authority. Defaults to tls.server_name, then to the node's server.
tlstableno—tcp, ws and grpc: turns TLS on, including as an empty tls = {}. Its keys are server_name and allow_insecure.
public_keystringdepends—reality, required: the server's X25519 public key, unpadded base64url of 32 bytes (43 characters).
server_namestringdepends—reality, required: the SNI the client sends, the name of the site the server passes itself off as, not the node's own server.
short_idstringno—reality: the shortId the client presents, up to 16 hex digits. Leave it out when the server admits the empty shortId.

subscribe file · [[proxy_server]] stream.tls · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
server_namestringno—The name sent as SNI and checked against the certificate. Defaults to the node's server.
allow_insecureboolnofalseAccept any certificate. A node has no ca_file: without this key, the certificate is checked against the system roots.

subscribe file · [dns] · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
pre_proxyarray of stringsyes—Servers asked directly, before any proxy is up. They look up the nodes' host names and the host names of the through_proxy servers. Write each as an address: a name here is refused when the resolvers are built. May be empty.
through_proxyarray of stringsyes—Servers asked through the route table: they look up everything else, including the destinations of direct and applications' own DNS queries. system is refused here. A name is looked up with pre_proxy. May be empty, and then pre_proxy answers everything.
use_hostsboolyes—Answer from the system hosts file before asking any server.
connect_ipv6string (enum)yes—How a node whose name has both A and AAAA records is reached: required (IPv6 only), preferred (IPv6 first), tolerated (IPv4 first) or forbidden (IPv4 only). It becomes each node's address_family (for a WireGuard node, its endpoint_address_family).
resolve_ipv6boolyes—Whether applications behind the client get AAAA answers to their DNS queries.

subscribe file · [[route_group]] · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
namestringyes—What the client shows and what [subscribe.routes] picks by. Unique in the file (subscribe: route group "…" is defined twice), and never default, which [subscribe.routes] keeps for the default route.
inheritstring or tableno"default"Where the group's traffic goes while it has no pick: "default" (wherever unmatched traffic goes), "direct", "blackhole", or { group = "<name>" } to follow another group.
matchesarray of tablesno[]What the group matches, as one-key tables such as { geosite = ["netflix"] }. The group matches a flow when any entry matches, and an entry matches when any of its values does. An empty list matches nothing, but the group can still be inherited from.

subscribe file · [[route_group]] matches · Explained in Subscribe files

KeyTypeRequiredDefaultDescription
domain_fullarray of stringsno—The exact domain.
domain_suffixarray of stringsno—The domain or any of its subdomains.
domain_keywordarray of stringsno—A substring of the domain.
domain_regexarray of stringsno—A regular expression over the lower-cased domain, not anchored.
cidrarray of stringsno—A destination IP range such as "192.0.2.0/24". Never matches a destination given as a domain.
portarray of stringsno—A destination port "443" or range "8000-9000".
networkarray of stringsno—"tcp", "udp" or both.
geositearray of stringsno—A geosite list, "code" or "code@attr", from the config's [route] geosite file.
geoiparray of stringsno—A GeoIP list, "code" or "!code", from the config's [route] geoip file.