Skip to content

katana configuration

Every table of the katana configuration file on one page. The same tables appear on the katana 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. Unlike etemenanki-app, katana applies a changed level on hot reload.
dnstableno{}Name resolution for every outbound of every node, written as [dns]. Each node builds its own resolver and cache from it. Without it, katana uses the host resolver behind an always-on cache. The panel HTTP requests do not use it. A hot reload that changes it drops every connection on every node.
nodearray of tablesyes—The panel nodes to serve, one [[node]] block each, with the sub-tables [node.api], [node.controller], [node.controller.cert], [node.hysteria], [node.route] and [[node.route.rule]]. Written in the singular, as an array of tables. The file parses without any, but both --test and a normal start fail with config defines no [[node]] entries.
outboundarray of tablesno[]Named upstream proxies, one [[outbound]] block each. Written in the singular. The definitions are shared: every node builds its own copy of each one, and its route table names them by tag. The tags direct, freedom, block and blackhole always exist and cannot be redefined, and tags that start with audit# are reserved for audit rules; a reserved or repeated tag fails with duplicate/reserved outbound tag <tag>. A hot reload that changes any [[outbound]] drops every connection on every node.

[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 "info,etemenanki_supervisor=debug". At startup a RUST_LOG variable that holds a valid filter takes precedence. --test does not validate it: at startup an unparsable directive is skipped with an ignoring ... line on stderr, and a word that is not a level, such as "warning", is read as a target name and silences every log line, errors included. A hot reload that changes the value applies it and replaces the RUST_LOG filter; a value that does not parse is logged as invalid log level and the current filter stays.

[dns] · Explained in The configuration file

KeyTypeRequiredDefaultDescription
backendstring (enum)no"system"Where answers come from: "system" (the host resolver, which honours /etc/hosts and nsswitch.conf), "udp" (plain DNS), "tls" (DNS over TLS, RFC 7858) or "https" (DNS over HTTPS, RFC 8484). Case-sensitive, unlike most katana enums: "UDP" fails with dns: unknown backend "UDP" (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 katana dials; 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 roots, 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.

[[node]] · Explained in Nodes

KeyTypeRequiredDefaultDescription
panel_typestring (enum)yes—Which panel API this node talks to: NewV2board (UniProxy, for Xboard and V2board), its alias V2board, or Helium (Helium's node API v2, whose node config describes the whole inbound, so a helium node sets no node_type). Compared case-insensitively. katana 6.0.0 removed SSPanel: SSpanel, in any case, fails --test with node <id>: panel_type "SSpanel" is not supported: katana serves the NewV2board and Helium panels, quoting the value as written. Leaving the key out fails --test with node <id>: unknown panel_type ""; any other value fails the same way, with the value shown lowercased. At startup, a node refused for either reason is logged and skipped, and katana exits only when no node can be started. On a hot reload, such a value makes katana refuse the whole reload and keep running the current configuration. Part of the node identity.
enable_mtlsboolnotrueWhether katana presents its client certificate to a panel that asks for one. With true, the default, it does. With false it presents none, even to a panel that asks: set it for a panel that should not receive the certificate. Works with every panel_type. Not part of the node identity: a hot reload that changes it alone gives the node a new panel client without a restart. The new client reads the node settings and users again at once, and the node keeps its connections unless the answer changes the protocol or transport.
apitableyes—How to reach the panel and what to ask it for, written as [node.api]: the panel URL, node ID and key, the node type (except on helium, whose panel describes the protocol), plus a few local overrides.
controllertableno{}This machine's side of the node, written as [node.controller]: listen address, poll interval, the sniffing, rule, upload and VMess clock switches, the device limit and IP ban, and the [node.controller.cert] certificate table. Every key has a default.
routetableno{}This node's routing table, written as [node.route] with [[node.route.rule]] blocks. Without it, every flow goes to the direct outbound.
hysteriatableno{}Settings for a Hysteria 2 node, written as [node.hysteria]: credential format, UDP relay, masquerade, congestion control, overrides of the panel's rates, and optionally a local port and obfuscation. Used only by a Hysteria 2 node: one whose node_type is a Hysteria 2 value, or on helium one the panel describes as hysteria2. A helium node refuses every key but congestion, since its panel describes the rest; congestion is checked on every node. A hot reload that changes the table gives the node a new panel client and drops every connection on it.

[node.api] · Explained in Nodes

KeyTypeRequiredDefaultDescription
hoststringyes—Base URL of the panel, with the scheme: https://panel.example.com. If the panel is served under a path, include it. Trailing slashes are removed before katana appends the API path. Part of the node identity, compared exactly as written.
node_idu32yes—The node's ID in the panel, a non-negative integer. Part of the node identity.
keystringyes—The panel's node communication key: the server token in Xboard and V2board, the node's own API token in helium. UniProxy panels receive it as the token query parameter on every request; helium receives it in an Authorization: Bearer header, never in the URL. Part of the node identity.
node_typestring (enum)depends—What kind of node the panel describes, compared case-insensitively. Required on NewV2board and V2board, where leaving it out fails with unknown node_type ""; refused on Helium. The values: V2ray, vmess or vless (all three mean a V2ray node, VMess unless enable_vless is on), Trojan, Shadowsocks, AnyTLS, Socks or socks5, Http (4.9.0 and later), or Hysteria2, hysteria or hy2. katana also knows sss, but sss nodes are helium-only: NewV2board and V2board refuse it with newV2board: no UniProxy panel describes an sss node; sss is Helium's own protocol, served with panel_type = "Helium". UniProxy panels receive the value lowercased as the node_type query parameter (or as vless for a V2ray node with enable_vless on), so write it the way the panel spells it. When a UniProxy panel names the protocol in its node config, as Xboard does, a protocol of another family refuses the node. A helium node refuses the key, because its panel describes the protocol: [node.api] node_type is set, but a helium node's protocol is described by the panel; …, at --test, at start and on a reload. On NewV2board and V2board, the type katana asks for is part of the node identity, so a hot reload that changes the requested type (anything but case) replaces the node. Any other change builds a new panel client on a hot reload and applies at once.
enable_vlessboolnofalseServe VLESS instead of VMess on a V2ray node. A UniProxy panel is then asked for node_type=vless. On NewV2board and V2board, turning it on or off for a node whose node_type is V2ray or vmess changes the type katana asks for, which is part of the node identity, so a hot reload replaces the node. With node_type = "vless" the type asked for is vless either way, so a hot reload that changes it builds a new panel client, which switches the node between VLESS and VMess at once and drops every connection on it. On other node types it has no effect. A helium node refuses it, because its panel says whether the node is VMess or VLESS: [node.api] enable_vless is set, but a helium node's protocol is described by the panel; ….
timeoutu64no0Limit for each panel HTTP request, in seconds, from connecting until the whole response has been read. 0 means 5 seconds. A hot reload that changes it builds a new panel client in place, without replacing the node.
speed_limitfloatno0Speed-limit override in Mbps (1 Mbps is 125 000 bytes per second; fractions and integers are both accepted). Above 0, it replaces the limit the panel gives each user of this node, so every user gets exactly this rate. On helium it replaces the one speed limit each users answer gives every user, and the device limit stays the panel's. 0 or a negative value uses the panel's limits. A hot reload that changes it builds a new panel client and keeps every connection; the new rate applies at once, to connections already open as well.
device_limitintegerno0Has no effect; kept for XrayR compatibility. Per-user device limits come from the panel and are enforced with [node.controller].enable_device_limit.
rule_list_pathpathno""A local file of audit rules, one regular expression per line; blank lines and lines starting with # are skipped. A rule is matched against the flow's domain name in lower case: the name the client asked for, or the name sniffed from its first bytes. A flow addressed by IP with no sniffed name never matches. A matching flow goes to a blackhole outbound, which discards it. Read together with the panel rules, so disable_get_rule = true also turns this file off. Re-read at every rule refresh, so edits to its contents apply at the next cycle. An unreadable file or an invalid line is logged and skipped. On helium, whose node config carries no routes, this file is the node's only source of audit rules. katana reports hits to no panel. A hot reload that changes the path builds a new panel client, which reads the new file at once; connections are kept.

[node.controller] · Explained in Nodes

KeyTypeRequiredDefaultDescription
listen_ipstringno"0.0.0.0"Address the listener binds: UDP for Hysteria 2 nodes, TCP for every other node type. The port always comes from the panel (or from [node.hysteria].port). Write an IPv4 or IPv6 address without brackets, such as "0.0.0.0", "::" or "203.0.113.10". 0.0.0.0 means every address, IPv6 included: where this host's IPv6 sockets also take IPv4, katana binds ::, and the start-up log reads listening on [::]:<port>. Where they do not, katana binds 0.0.0.0; with net.ipv6.bindv6only set it warns IPv6 sockets here take IPv6 alone (net.ipv6.bindv6only), so listen_ip 0.0.0.0 serves IPv4 only. Any other address is bound as written. The value as written is also part of the node tag, such as V2ray_0.0.0.0_443. A node on one address also puts it in its handoff socket's name; see handoff_dir.
send_ipstringno"0.0.0.0"Has no effect: katana does not bind outgoing connections to a source address; the operating system chooses it.
update_periodicu64no60Seconds between poll cycles. One timer drives everything: fetching the node settings and users, refreshing the audit rules, and reporting traffic. 0 counts as 1. The panel's own push and pull intervals are not read. The first cycle runs one full period after the node is up. It also caps the wait between attempts while a node retries its first start, which otherwise grows to 60 seconds. A hot reload that changes it restarts the timer.
disable_upload_trafficboolnofalseStop reporting user traffic to the panel. Speed limits and audit rules still apply. Traffic counted while it is on is discarded, so turning it off again reports only what moves from then on. Read on every cycle, so a hot reload applies it at the next cycle.
disable_get_ruleboolnofalseStop fetching audit rules, both from the panel and from rule_list_path. Set at startup, the node runs with no audit rules.
disable_sniffingboolnofalseStop reading the TLS SNI or HTTP Host from the first bytes of each TCP flow. The sniffed name feeds both the routing rules and the audit rules, so with sniffing off, a flow addressed by IP matches neither a domain rule nor an audit rule. The destination katana connects to is never changed. A hot reload that changes it drops every connection on the node.
disable_vmess_clock_checkboolnofalseVMess nodes only (a V2ray node serving VMess). By default a VMess handshake is accepted only while its timestamp is within 120 seconds of the server clock, either way. With true, any plausible timestamp passes, so a client whose clock is wrong still connects. The cost is replay protection: a handshake replayed more than 240 seconds after it first arrived is served again. When it is on, the node logs node <id>: VMess clock check off at start. A hot reload that changes it runs one poll at once, logs VMess clock check on or off, applies to new connections and keeps the open ones.
enable_device_limitboolnofalseHold each user to the device limit the panel sends, and ban client IPs that keep failing to authenticate. Both count client IP addresses, so turn it on only where katana sees them: clients connect directly, the relays in front of the node send a PROXY protocol v2 header, or, on a WebSocket node, a trusted reverse proxy names them in real_ip_header. On helium it also makes katana report the client addresses users connect from. The Device limits and IP bans page describes both. A hot reload that changes it applies to new connections and keeps the open ones.
real_ip_headerstringdepends—WebSocket nodes behind a reverse proxy: the header of each WebSocket upgrade request that names the client, such as "X-Real-IP" or "X-Forwarded-For". Unset, the node reads no header. The header counts only on a connection from an address in real_ip_from; from anyone else it is ignored. A list names the rightmost address outside real_ip_from, or the leftmost when every address is inside it. A trusted proxy that sends no such header, or one that is not a list of IP addresses, is served as the client itself. The address it names is what the device limit, the IP ban and helium's reports count. Set it together with real_ip_from: alone it fails with real_ip_header needs real_ip_from: the proxies trusted to set it, and a value that is not a header name fails with real_ip_header "<value>" is not a header name. katana checks both keys on every node, at --test, at start and on a reload, but only nodes over WebSocket read the header. A hot reload that changes it runs one poll at once, applies to new connections and keeps the open ones.
real_ip_fromarray of stringsdepends[]The reverse proxies trusted to set real_ip_header, as CIDRs such as "127.0.0.1/32" or "::1/128", like nginx's set_real_ip_from. A bare address is a single host. Set host bits ("192.0.2.1/24") or a value that is not a CIDR fail with real_ip_from "<value>": <reason>. Needed with real_ip_header, and only with it: set alone, it fails with real_ip_from is set without real_ip_header. A hot reload that changes it runs one poll at once, applies to new connections and keeps the open ones.
ban_max_failuresu32no30Under enable_device_limit: ban a client IP once this many of its authentications fail within ban_window_secs. An IPv6 client's whole /64 counts and is banned as one IP, and an IPv4-mapped address counts as its IPv4 address. 0 bans no one. Counts failures on VMess, VLESS, Trojan, Shadowsocks and AnyTLS nodes. sss streams refused before authentication and connections a REALITY node passes to its cover site are not counted; Hysteria 2 connections are neither counted nor refused.
ban_window_secsu64no120The window, in seconds, in which ban_max_failures failures ban an IP. A window that has passed starts the count afresh.
ban_secsu64no300How long a ban lasts, in seconds. A banned IP's new connections are dropped before the TLS handshake; its open connections continue.
carrier_max_failuresu32no8gRPC nodes only: close a gRPC connection once this many of its streams in a row fail to authenticate. A stream that authenticates resets the count. 0 never closes one. Independent of enable_device_limit.
handoff_dirpathno—Also take the TCP connections that a relay running on the same host accepted for this node and hands over, on a Unix socket of the node's own in this directory. A node on every address (listen_ip 0.0.0.0 or ::) names it after its port, <handoff_dir>/<port>.sock, such as /run/katana/handoff/443.sock for a node on port 443. A node on one address puts the address first, <handoff_dir>/<listen_ip>-<port>.sock, such as /run/katana/handoff/203.0.113.5-443.sock, with an IPv6 address as katana prints it, such as 2001:db8::1-443.sock; so nodes on one port and different addresses get different sockets. The relay sends each connection with a PROXY protocol v2 header that names its client, and katana serves it as if its own listener had accepted it. Every stream node, that is every node type but Hysteria 2, gets a socket; a Hysteria 2 node gets none. The socket has mode 0660, so only its owner and its group can connect. A missing directory is created, mode 0750 and in handoff_group; a directory that already exists is left as it is. Unset, no socket is bound. Write an absolute path short enough that the directory, a / and the node's socket name at port 65535, the longest any port gives, fit in the 107 bytes a Unix socket's path may have: at most 96 bytes on a node on every address, and less on a node on one address, such as 84 bytes with listen_ip = "203.0.113.5". A relative path fails with handoff_dir "<value>" must be an absolute path, a longer one with handoff_dir "<value>" is too long: with "<name>" in it, a socket's path would pass the 107 bytes a Unix socket's path may have, where <name> is that longest name, such as 65535.sock. katana checks it on every node, at --test, at start and on a reload. A hot reload that changes it runs one poll at once, which binds, moves or removes the socket and keeps every open connection, the handed-over ones included.
handoff_groupstringno—The group the handoff sockets, and a directory katana creates for them, are given: the relay's, so that it can connect. Write the group's name as /etc/group lists it, such as "relay"; the relay's user must be in the group. katana looks the name up in /etc/group itself, not through NSS, at --test, at start, on a reload and at every poll, and refuses a name it does not find there with handoff_group "<value>" is not a group in /etc/group. Needs handoff_dir: set alone, it fails with handoff_group is set without handoff_dir. Unset, the sockets keep katana's own group. Unless katana runs as root, its own user must be in the group too, because a process can give a file only a group it belongs to. A hot reload that changes it runs one poll at once, which binds the socket again with the new group and keeps every open connection. The directory keeps the group it has, even one katana created, so give it the new group yourself.
certtabledepends{}The listener certificate, written as [node.controller.cert]. Required with mode = "file" for Trojan and Hysteria 2 nodes, and for V2ray nodes the panel marks as TLS. katana reads the files again at every poll, so a renewed certificate reaches new connections at the next poll while open ones continue. A hot reload that changes any of its keys drops every connection on the node.

[node.controller.cert] · Explained in Nodes

KeyTypeRequiredDefaultDescription
modestring (enum)depends"none""none" (no certificate) or "file" (read cert_file and key_file). Case-sensitive. "file" is required for every node that uses TLS; without it a stream node fails with TLS node requires cert.mode = "file" and a Hysteria 2 node with hysteria2 node requires cert.mode = "file". The ACME modes "dns", "http" and "tls" are refused on every stream node, TLS or not: node requests kernel-unsupported feature: ACME cert mode "dns"; on a Hysteria 2 node they fail like any value other than "file". Any other value behaves like "none" on a stream node. A REALITY node reads nothing from this table: it needs no certificate, and none of these checks apply to it.
cert_filepathdepends""PEM certificate chain: the server certificate first, then any intermediates (a fullchain.pem). Required with mode = "file"; if it or key_file is empty, a TLS or Hysteria 2 node fails with TLS node requires cert.cert_file and cert.key_file. katana reads it when the node starts and again at every poll, so a renewed certificate reaches new connections at the next poll.
key_filepathdepends""PEM private key matching cert_file. Required with mode = "file". Read at the same moments as cert_file; a key that does not match the certificate fails the node's build.
reject_unknown_sniboolnofalseNot implemented, so true is refused rather than silently ignored: the node fails with node requests kernel-unsupported feature: cert.reject_unknown_sni. Leave it false.

[node.hysteria] · Explained in Hysteria 2 nodes

KeyTypeRequiredDefaultDescription
portu16no0The UDP port to listen on. A non-zero value makes this a locally described node: katana builds the node from this table and never calls the panel's node-config endpoint. 0 asks the panel for the port and the obfuscation, as for every other node type. A helium node refuses it: its panel always describes the node.
credentialstring (enum)no""How the client's auth string identifies a user. "" or uuid: the whole string is the user's UUID. user_pass: the string is label:uuid, split on the first colon, where the label is <uuid>@v2board.user on Xboard and V2board; the label is compared case-insensitively. The value itself is case-sensitive; anything else fails with unknown hysteria credential kind "…" (expected "uuid" or "user_pass"). A helium node refuses the key, so its users authenticate with their UUID alone.
udpboolnofalseRelay UDP as well as TCP. Off by default, unlike the upstream server: the listener then tells clients that UDP is disabled and relays TCP only. A helium node refuses it: the panel's udp says whether UDP is relayed.
udp_idle_timeoutu64no60Seconds a UDP session may carry no datagrams before katana closes it. Accepted range 2 to 600 (udp_idle_timeout must be between 2 and 600 seconds). The default 60 applies only when udp = true: the key is only valid with UDP on, and setting it while udp is off fails with udp_idle_timeout is set but udp is not enabled. A helium node refuses it: the panel's udp.idle_timeout_secs sets the timeout, held to the same range.
obfsstring (enum)no—Packet obfuscation for a locally described node. The only accepted value is salamander, in lowercase; anything else fails with unknown obfs "…" (expected "salamander"). With port = 0 the panel's obfuscation applies instead. A helium node refuses it: the panel's obfs sets the obfuscation.
obfs_passwordstringdepends—The Salamander key shared with every client, at least 4 bytes (obfs_password must be at least 4 bytes for salamander). Required when obfs is set. Setting it without obfs is refused with obfs_password is set but obfs is not; did you mean obfs = "salamander"?, so a typo cannot quietly turn obfuscation off. Same local-node rule as obfs, and a helium node refuses it too.
masqueradetableno{}The HTTP/3 response given to every request that does not carry a valid credential, written as [node.hysteria.masquerade]. Applies to locally described nodes and to nodes Xboard or V2board describe. A helium node refuses the table, with any key: the panel's masquerade sets the answer.
up_mbpsu64no—The most the node sends one client at, in Mbit/s. Overrides the panel's up_mbps. 0 is no cap. Used only when a fixed rate is agreed with a client, that is when ignore_client_bandwidth ends up false. A helium node refuses it: the panel's up_mbps applies.
down_mbpsu64no—The most the node receives at, in Mbit/s, told to every client in the handshake answer. Overrides the panel's down_mbps. 0 is no limit. A helium node refuses it: the panel's down_mbps applies.
ignore_client_bandwidthboolno—Answer every client with auto, so neither end sends at a fixed rate and both use congestion. Overrides the panel's value. Unset here and at the panel, it is true. With false, a client that declares its download rate is sent to at that rate, capped by up_mbps. A helium node refuses it: the panel's ignore_client_bandwidth applies, true when the panel leaves it out.
congestionstring (enum)no"cubic"Congestion control when no fixed rate is agreed: cubic, bbr or reno, in lower case. Anything else fails --test with unknown hysteria congestion "…" (expected "cubic", "bbr" or "reno"), on every node, Hysteria 2 or not. No panel sends it. The one key of this table a helium node may set.

[node.hysteria.masquerade] · Explained in Hysteria 2 nodes

KeyTypeRequiredDefaultDescription
statusu16no404The HTTP status code. Any code from 100 to 999 except 233, which is the Hysteria 2 authentication success status and would tell the prober it had authenticated (masquerade.status must not be 233, the Hysteria 2 authentication success status). Out-of-range values fail with masquerade.status is <code>, but must be 100 to 999.
bodystringno"404 page not found\n"The response body, sent as is with a matching Content-Length.
content_typestringno"text/plain; charset=utf-8"The value of the Content-Type header.

[node.route] · Explained in Routing

KeyTypeRequiredDefaultDescription
defaultstringno"direct"Tag of the outbound a flow takes when no rule matches. Any tag the node's outbounds have is accepted: the built-in direct, block, freedom and blackhole, or the tag of a top-level [[outbound]]. Tags are case-sensitive. An unknown tag fails with route references unknown outbound <tag>.
geoippathdepends—Path to a v2ray-format geoip.dat. Required as soon as any rule of this node uses geoip, otherwise the build fails with building route failed: a geoip matcher is used but no geoip file is configured. katana reads the file only when a rule references it, so an unused path is never opened. Only the referenced codes are kept in memory. At every poll katana looks at which file is at the path, so a new file put in its place, such as a fresh download renamed over the old one, is loaded at the next poll without a config edit.
geositepathdepends—Path to a v2ray-format geosite.dat (the v2fly dlc.dat works). Required as soon as any rule of this node uses geosite, otherwise the build fails with building route failed: a geosite matcher is used but no geosite file is configured. Read only when referenced, and a new file at the path is loaded at the next poll, like geoip.
rulearray of tablesno[]The rules, one [[node.route.rule]] block each, checked from top to bottom after the node's audit rules. The first rule that matches picks the outbound. Written in the singular.

[[node.route.rule]] · Explained in Routing

KeyTypeRequiredDefaultDescription
outboundstringyes—Tag of the outbound a matching flow takes. It must be one of the node's outbounds (direct, block, freedom, blackhole or a top-level [[outbound]] tag), otherwise the check fails with route references unknown outbound <tag>. Required.
domain_suffixarray of stringsno[]Domains that match themselves and every subdomain: example.com matches example.com and www.example.com, not notexample.com. katana lowercases each entry. Matched against the domain the client asked for and against the sniffed TLS SNI or HTTP Host. Write entries without a leading dot: .example.com matches nothing.
cidrarray of stringsno[]Destination IP ranges, IPv4 or IPv6, such as 192.0.2.0/24 or 2001:db8::/32. A bare address is a single-host range. Parsing is strict: set host bits (192.0.2.1/24) or an oversized prefix fail with invalid cidr "<value>": <reason>. Matches only destinations the client addressed by IP; katana does not resolve domains before routing.
portarray of stringsno[]Destination ports as strings: a single port "443" or an inclusive range "6881-6889". Spaces around the numbers are ignored. Write "80", not 80: a TOML integer fails the parse. A value that is not a port fails with invalid port spec: "<value>", and a range whose lower bound is above its upper bound fails with invalid port spec: "<value>" has a lower bound above its upper bound.
geositearray of stringsno[]Entries of the [node.route].geosite file: code, or code@attr to keep only the domains tagged with that attribute, such as category-ads-all or google@ads. Codes and attributes are case-insensitive. Matched against the requested domain and the sniffed domain, like domain_suffix. A code missing from the file fails with building route failed: geosite code not found: <code>.
geoiparray of stringsno[]Entries of the [node.route].geoip file: code, such as private or cn, or !code to match every IP outside that list. Codes are case-insensitive. Like cidr, it matches only destinations addressed by IP, and !code does not match a domain destination either. A code missing from the file fails with building route failed: geoip code not found: <code>.

[[outbound]] · Explained in Outbounds

KeyTypeRequiredDefaultDescription
tagstringyes—Name that [node.route].default and [[node.route.rule]].outbound refer to. Must be unique across all [[outbound]] tables, must not be one of the built-in tags direct, freedom, block or blackhole, and must not start with audit#, which katana uses for audit rules. Each of these mistakes fails with duplicate/reserved outbound tag <tag>. Compared case-sensitively everywhere.
protocolstring (enum)yes—Which client to build, case-insensitive: socks (alias socks5), http, vmess, vless, shadowsocks (alias ss), wireguard (alias wg), or direct (alias freedom). Anything else fails with unknown outbound protocol "<name>", with the name in lower case. There is no trojan, hysteria2 or blackhole protocol here; use the built-in block tag to drop traffic.
serverstringdepends—The upstream host: an IP address or a domain name. For wireguard it is the peer's UDP endpoint host. Required for every protocol except direct. An IPv6 address may be written with or without brackets: 2001:db8::10 or [2001:db8::10]. Brackets around anything else fail with outbound server "<host>": brackets hold only an IPv6 literal. A domain is resolved with the node's [dns] resolver: when a connection is made, or for wireguard when the tunnel starts, with endpoint_address_family applied. Empty fails with outbound needs a non-empty server and non-zero port.
portu16depends—The upstream port; the peer's UDP port for wireguard. Required and non-zero for every protocol except direct. Zero or absent fails with outbound needs a non-empty server and non-zero port (got "<server>":0). This check runs before protocol is read, so it also catches a misspelled protocol that has no server or port.
usernamestringno—socks and http only. The user name for SOCKS5 username/password authentication, or for HTTP Basic Proxy-Authorization. Set it together with password.
passwordstringdepends—For socks and http, the password that goes with username. For shadowsocks it is required and holds the secret: the password for a classic method, or the base64 PSK for a 2022- method, optionally as an iPSK:uPSK chain. Missing for shadowsocks fails with shadowsocks outbound <tag> needs a password. A 2022 key shorter than the method's key length fails with shadowsocks-2022: PSK too short (…), and invalid base64 with decode PSK: ….
uuidstringdepends—Required for vmess and vless: the account UUID on the upstream server. Missing fails with outbound <tag> needs a uuid; a malformed value fails with outbound <tag>: uuid is not a valid UUID, which does not repeat the value, because it is a credential.
securitystring (enum)no"auto"vmess only. The body cipher, case-insensitive: auto, aes-128-gcm or aes128gcm select AES-128-GCM; chacha20-poly1305 or chacha20poly1305 select ChaCha20-Poly1305. auto always means AES-128-GCM. none, zero and anything else fail with unsupported vmess security "<name>".
methodstring (enum)depends—Required for shadowsocks; the name picks the protocol version. SIP022: 2022-blake3-aes-128-gcm, 2022-blake3-aes-256-gcm, 2022-blake3-chacha20-poly1305, written exactly in lower case. Classic AEAD, case-insensitive: aes-128-gcm, aes-256-gcm, chacha20-poly1305 (or chacha20-ietf-poly1305), xchacha20-poly1305 (or xchacha20-ietf-poly1305), and the aead_aes_128_gcm, aead_aes_256_gcm, aead_chacha20_poly1305 aliases. Anything else, including an empty or missing value, fails with unsupported shadowsocks cipher "<name>".
global_paddingboolnofalsevmess only. The VMess client always pads its chunks, whatever this is set to, which hides the exact payload sizes at a small cost in bandwidth.
address_familystring (enum)no"auto"Which resolved addresses the outbound may use, for any protocol: auto (keep the resolver's order), ipv4_only, ipv6_only, prefer_ipv4, prefer_ipv6. Case-insensitive, surrounding spaces are ignored, - is read as _, an empty string means auto, and these aliases are accepted: ipv4, v4, 4, ipv4only; ipv6, v6, 6, ipv6only; prefer_v4, ipv4_prefer, v4_prefer; prefer_v6, ipv6_prefer, v6_prefer. It applies to the destination for direct and wireguard, and to the server name for the other protocols. Anything else fails with outbound <tag> invalid address_family "<value>". On wireguard, ipv4_only or ipv6_only needs a local_address of that family (outbound <tag>@v0: wireguard address_family ipv6_only needs an IPv6 address); the peer's endpoint has its own endpoint_address_family.
private_keystringdepends—Required for wireguard: your own Curve25519 private key, the PrivateKey line of a wg-quick file. 32 bytes as padded standard base64 (what wg genkey prints) or 64 hex digits. Missing fails with wireguard outbound <tag> needs a private_key; a bad encoding with wireguard outbound <tag> private_key: invalid WireGuard key: expected base64 or hex encoding of 32 bytes.
public_keystringdepends—Required for wireguard: the peer's public key, the PublicKey line of the [Peer] section. Same encodings and error forms as private_key. etemenanki-app calls this key peer_public_key.
pre_shared_keystringno—wireguard only. Optional pre-shared key, the PresharedKey line. Same encodings as private_key; a bad one fails with wireguard outbound <tag> pre_shared_key: …. Set it only when the peer has one for you. etemenanki-app spells it preshared_key.
local_addressarray of stringsdepends—Required for wireguard, at least one entry: the tunnel-local addresses from the Address line, such as ["10.8.0.2/32", "2001:db8:a::2/128"]. Anything from / on is dropped, so the prefix length is optional. Without an IPv6 entry the tunnel cannot reach IPv6 destinations, and the other way round. Errors: wireguard outbound <tag> needs at least one local_address, wireguard outbound <tag> invalid local_address "<value>": ….
mtuintegerno1420wireguard only. Largest 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—wireguard only. 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.
reservedarray of integersno—wireguard only. Exactly three bytes, each 0 to 255, written into header bytes 1 to 3 of every outgoing WireGuard packet, as Xray's reserved does. Set it only when your service tells you to. Another length fails with wireguard outbound <tag> reserved must be exactly 3 bytes; a value above 255 fails the parse.
endpoint_address_familystring (enum)no"auto"wireguard only. Which of the peer's addresses the tunnel dials, with the same values and aliases as address_family, which covers only destinations inside the tunnel. A domain server is looked up with the node's [dns] resolver when the tunnel starts, and the first address left is dialed. An unknown value fails with outbound <tag> invalid endpoint_address_family "<value>".