Skip to content

helium

With panel_type = "helium", a katana node takes its description and its users from helium through Helium’s node API v2, under /api/node/v2/. katana polls the panel, serves the node the panel describes, and reports each user’s traffic and, where it sees them, the client addresses users connect from.

The panel describes the whole inbound: the protocol, the port, the transport, TLS or REALITY, and each protocol’s own settings. Every request and answer is a type of the helium-node-api crate, which Helium serializes from the same definitions katana reads. katana’s config keeps only what belongs to the machine: the listen address, the certificate, the poll interval and the switches in [node.controller]. A local key that would describe the protocol is refused, so a helium node sets no node_type.

helium is supported from katana 4.5.0. katana 5.0.0 and later speak node API v2; katana 4.5.0 to 4.10.x spoke node API v1. An older katana stops at unknown panel_type "helium". Moving a node from katana 4 to 5 lists what to change in the config.

Property helium in katana
panel_type "helium", matched without regard to case
Authentication [node.api].key, the node’s own API token, sent as Authorization: Bearer <key>. It never appears in a URL.
Node types VMess, VLESS (with TLS or REALITY, and Vision over REALITY), Trojan, Shadowsocks (2022 or AEAD), AnyTLS, SOCKS, HTTP, sss, Hysteria 2. The node config names the protocol.
Node description A typed node config, helium_node_api::config::NodeConfig: the protocol, the port, the transport, the security and the protocol’s settings
Local keys node_type, enable_vless and every [node.hysteria] key but congestion are refused
Speed limits One limit for every user, said once in each users answer, in bytes per second, or one local override
Device limits One limit for every user, said once in each users answer, enforced with enable_device_limit
Audit The local rule file alone. Hits are not reported.
Reports Traffic and, with enable_device_limit, client addresses, in one request per poll

This node takes everything but the certificate from helium: the protocol, the port, the transport, TLS or REALITY, the users and their limits. The certificate always comes from the local files.

/etc/katana/config.toml
# A katana node for helium (Helium's node API v2). The panel supplies the
# protocol, the port, the transport, TLS or REALITY, the users and their
# limits; the certificate is always local. Replace the node's API token and
# the certificate paths.
[log]
level = "info"
[[node]]
panel_type = "helium"
[node.api]
host = "https://panel.example.com"
node_id = 1
key = "replace-with-the-panel-key" # the node's API token, sent as Authorization: Bearer
timeout = 10 # seconds per panel request; 0 means 5
[node.controller]
listen_ip = "0.0.0.0"
update_periodic = 60 # seconds between panel polls
enable_device_limit = true # clients connect directly, so katana sees their addresses
[node.controller.cert]
mode = "file"
cert_file = "/etc/katana/fullchain.pem"
key_file = "/etc/katana/privkey.pem"
  1. Create the node in helium. Note the server node’s ID and its API token. Each node has a token of its own.

  2. Write the config. Put helium’s base URL in host, the node ID in node_id and the token in key. Do not set node_type or enable_vless: the panel names the protocol, and katana refuses a helium node that sets them (Keys the panel describes). Point cert_file and key_file at a certificate for the name clients connect to; a REALITY node needs none.

  3. Check it. --test builds the panel client, the outbounds, [dns] and the routing table without contacting the panel:

    Terminal window
    katana --test -c /etc/katana/config.toml
    Configuration OK

    --test does not fetch the node, so it cannot tell you whether the panel’s description is one katana can serve. For the same reason it judges a helium node as it judges any node that is not Hysteria 2: it builds no Hysteria 2 listener and reads no certificate.

  4. Start katana and watch for the listener line and the line that says how the node turns away failing clients:

    INFO katana::manager::node: node 1: listening on [::]:443
    INFO katana::manager::node: node 1: device limit on, IP ban after 30 failures in 120s for 300s; gRPC connections closed after 8 failed streams in a row

These [node.api] keys matter on helium. Unknown keys are an error, so a typo stops --test.

Key Type Default On helium
host string "" helium’s base URL with its scheme, for example "https://panel.example.com". katana removes a trailing / and appends /api/node/v2/<node_id>/…. Write the URL the panel answers at: katana does not follow redirects.
node_id integer 0 The server node’s ID in helium. It goes into every request’s path.
key string "" The node’s API token, sent as Authorization: Bearer <key>.
timeout integer 0 Seconds allowed for each panel request, from connect to the end of the body. 0 means 5.
speed_limit float 0 A local per-user limit in Mbps. A value above 0 replaces the speed limit the panel sends, for every user; the device limit stays the panel’s.
rule_list_path string "" A local file of audit rules, one regular expression per line: the node’s only audit rules.
node_type, enable_vless Refused: the panel describes the protocol.
device_limit No effect on helium.

Under [node.controller], enable_device_limit holds users to the panel’s device limit and makes katana report client addresses; see Device limits. update_periodic, disable_get_rule and disable_upload_traffic work as on every panel.

Of [node.hysteria], only congestion may be set: cubic (the default), bbr or reno, the congestion control a Hysteria 2 node uses when no fixed rate is agreed with a client. It is how this machine sends, not something a client has to match, so the panel does not describe it. --test checks it on every node.

A helium node’s protocol comes from the panel alone. A local key that would describe it is refused, so it can neither overrule the panel nor look as if it were in force. katana looks for these keys in this order and names the first one it finds:

  1. [node.api]: node_type, enable_vless.
  2. [node.hysteria]: port, credential, udp, udp_idle_timeout, obfs, obfs_password.
  3. [node.hysteria.masquerade], with any key.
  4. [node.hysteria]: up_mbps, down_mbps, ignore_client_bandwidth.
configuration error: node 1: [node.api] node_type is set, but a helium node's protocol is described by the panel; remove it (of [node.hysteria], only congestion is this host's to choose)

katana builds the panel client at every start, --test and reload, so all three refuse it. --test prints the line above. At startup katana logs the same reason after node 1: and does not start that node. A reload that sets one of these keys is refused as a whole, and every node keeps running as it was.

katana calls three endpoints under <host>/api/node/v2/<node_id>/. Every request carries the token in the Authorization header, and says Accept-Encoding: gzip, so helium may compress its answers; katana reads a compressed answer as it decompresses it.

Request Body Answer ETag When
GET …/config config::NodeConfig, see The node config yes At start, then every poll
GET …/users users::Users, see Users yes At start, then every poll
POST …/report report::Report, see Reports report::ReportAnswer Every poll that has something to report, unless disable_upload_traffic = true leaves it empty, and once more when the node stops

The type names are those of the helium-node-api crate. One poll runs the requests in order, every update_periodic seconds (60 by default):

sequenceDiagram
    participant K as katana node
    participant H as helium
    K->>H: GET /api/node/v2/1/config
    H-->>K: node config, or 304
    K->>H: GET /api/node/v2/1/users
    H-->>K: limits and users, or 304
    Note over K: read the local audit rules, apply whatever changed
    K->>H: POST /api/node/v2/1/report
    H-->>K: duplicate false

There is no rules endpoint, and the node config carries no routes: a helium node’s audit rules are its local rule_list_path alone. katana presents a client certificate when the panel asks for one, unless the node sets enable_mtls = false, and does not follow redirects, as with every panel.

For config and users, katana remembers the last ETag header helium sent and returns it in If-None-Match on the next request, exactly as it came, a weak tag (W/"…") included. A 304 Not Modified answer means unchanged: katana keeps the node description or user list it already has. katana stores a tag only after it has read the whole body, so an answer cut off in transfer is asked for in full again.

A config edit to [node.api], to enable_mtls or to [node.hysteria] congestion gives the node a new panel client, which holds no tags. Every attempt to bring a node up forgets the tags too.

When a poll’s GET fails, katana logs a warning and keeps the last state it applied, so a panel outage does not take a running node down.

GET config returns one JSON object. Its protocol names the protocol, and its other keys are that protocol’s. Every protocol has a port: the port the node listens on and clients dial. Three examples:

VMess over WebSocket with TLS
{
"protocol": "vmess",
"port": 443,
"transport": {"type": "ws", "path": "/ws"},
"security": {"type": "tls"}
}
VLESS with REALITY and Vision
{
"protocol": "vless",
"port": 443,
"transport": {"type": "tcp"},
"security": {
"type": "reality",
"server_name": "www.example.com",
"server_port": 443,
"private_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"short_id": "0123456789abcdef"
},
"flow": "xtls-rprx-vision"
}
Hysteria 2 with Salamander and UDP
{
"protocol": "hysteria2",
"port": 443,
"obfs": {"type": "salamander", "password": "replace-with-a-long-random-password"},
"up_mbps": 100,
"down_mbps": 100,
"ignore_client_bandwidth": true,
"udp": {"idle_timeout_secs": 60}
}
protocol Keys besides port TLS
vmess transport, security As security says: none or tls
vless transport, security, flow As security says: none, tls or reality
trojan transport Always
shadowsocks cipher, server_key, transport, security As security says: none or tls
anytls padding_scheme Always, over TCP
socks, http transport Always
sss transport, security, transform, udp_max_datagram As security says: none or tls
hysteria2 obfs, up_mbps, down_mbps, ignore_client_bandwidth, udp, masquerade Always, inside QUIC

transport and security are required wherever the protocol has them: nothing missing is read as plaintext or plain TCP. A protocol that always runs inside TLS has no security at all. TLS uses the certificate in [node.controller.cert]; REALITY needs none. An answer that is not a node config katana can use fails the fetch with parse helium config response; see Common errors.

type Keys What katana serves
tcp none Raw TCP, or TLS on TCP
ws path, and optionally host WebSocket. path starts with / and has no whitespace, control character or #; its one query may be ?ed=N, the early-data length Xray clients read, which the node strips. host, when given, is the Host clients send, without a port (an IPv6 address in brackets), and katana accepts only requests for that host.
grpc service_name gRPC with that service name, which must not be empty
type Protocols What katana serves
none VMess, VLESS, Shadowsocks, sss No TLS. VLESS and sss do not encrypt on their own, so they then run in the clear.
tls VMess, VLESS, Shadowsocks, sss TLS with the local certificate
reality VLESS only, over transport tcp only REALITY, with the keys below. No certificate is needed.

REALITY’s keys:

Key Meaning
server_name The SNI answered as REALITY, which is also the cover site’s host. A host name or IPv4 address, matched exactly: ASCII letters, digits, -, _ and ., at most 253 bytes, no wildcard, not ending in a dot.
server_port The cover site’s port. katana dials server_name at this port for every connection that does not authenticate as REALITY.
private_key The X25519 private key: 32 bytes in unpadded base64url, as xray x25519 prints it
short_id The one shortId clients present: an even number of hex digits, at most 16, in either case. "" is the all-zero shortId.

See REALITY and Vision for how katana serves it.

Key Required Meaning
transport yes See Transport
security yes none, tls or reality; see Security
flow no "xtls-rprx-vision" for XTLS Vision. Vision needs security reality, so it runs over TCP only. Left out, the node serves plain VLESS.

VMess has the same transport and security, without reality, and no flow. It runs in AEAD mode only.

Key Required Meaning
cipher yes Shadowsocks 2022, 2022-blake3-aes-128-gcm or 2022-blake3-aes-256-gcm, or one of the AEAD ciphers aes-128-gcm, aes-256-gcm, chacha20-ietf-poly1305 and xchacha20-ietf-poly1305, written exactly so. katana reads all six; Helium’s own admin input refuses the AEAD ones.
server_key for a 2022 cipher The server’s pre-shared key in padded standard base64: 16 bytes for 2022-blake3-aes-128-gcm, such as AAAAAAAAAAAAAAAAAAAAAA==, and 32 bytes for 2022-blake3-aes-256-gcm, such as AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=. Generate a real one with openssl rand -base64 16 or openssl rand -base64 32.
transport yes See Transport
security yes none or tls

On a 2022 node, each user’s key is the first 16 or 32 characters of their UUID as text, as long as the cipher’s key; see Shadowsocks 2022 keys. An AEAD cipher takes no server_key: each user’s password is their UUID. A config whose 2022 cipher lacks its key, or whose AEAD cipher has one, is refused, for example with parse helium config response: aes-128-gcm takes no server_key: each customer's password is their own; leave it out. katana relays TCP only for Shadowsocks.

Key Required Meaning
padding_scheme no The padding scheme pushed to clients, one key=value line per entry, such as ["stop=8", "0=30-30", "1=100-400"]. No line is empty or holds a line break, and the lines joined with \n are at most 2048 bytes. katana checks what each line means when it builds the node. Left out, clients keep anytls-go’s default scheme.

AnyTLS always runs over TLS on TCP, with the local certificate. Trojan, SOCKS and HTTP have only transport, and always run inside TLS too.

Key Required Meaning
transport yes See Transport
security yes none or tls
transform no The transform chains, {"up": [...], "down": [...]}, each a list of at most 8 expressions in sss’s notation, run in the order listed, such as ["zstd(c=16384)", "baseN()"] or ["baseN()|zstd()"]; up encodes what a client sends, down what the node sends. katana parses each expression when it builds the node. Left out, or with both chains empty, bytes pass as they are.
udp_max_datagram no The largest datagram one UDP record carries, 1 to 65535, and 65535 when left out. Clients must use the same.

The node config has no flush delay, header time or reject, so a helium sss node keeps their defaults: it flushes at once (flush_delay 0), waits 10 seconds for a request header (header_timeout), and drains a stream refused before authentication (reject = "drain"). sss explains the chains and these settings. helium is the only panel that describes sss nodes.

Key Required Meaning
obfs no {"type": "salamander", "password": "…"}: Salamander obfuscation with a password of at least 4 bytes, which every client must know. Left out, packets go as plain QUIC.
up_mbps yes The most the node sends one client at, in Mbit/s. 0 is no cap.
down_mbps yes The most the node receives at, in Mbit/s, told to every client. 0 is no limit.
ignore_client_bandwidth no (default true) Answer every client auto, so neither end sends at a fixed rate and both use congestion. With false, a client that declares its receive rate is sent to at that rate, capped by up_mbps.
udp no {"idle_timeout_secs": 60}: relay UDP, and close a UDP session that has carried no datagrams for that many seconds, 2 to 600, 60 when the key is left out. Without udp, the node relays TCP only and tells clients that UDP is disabled.
masquerade no {"status": 404, "body": "…", "content_type": "…"}, all three keys required: the HTTP/3 answer to every request without a valid credential. status is 100 to 999 and never 233, the Hysteria 2 authentication success status. Left out, the node answers as an unconfigured server does: 404 with the body 404 page not found.

A Hysteria 2 node listens on UDP port, with the local certificate. Each user’s auth string is their UUID. congestion is the one setting that stays in [node.hysteria]. Rates and congestion control explains how the rates and ignore_client_bandwidth decide what each end sends at.

katana compares each node config it reads with the one it is serving, and applies the difference at that poll:

What changes What happens
protocol, port, transport, security (REALITY’s keys included), flow, Shadowsocks’s cipher or server_key, sss’s transform or udp_max_datagram, Hysteria 2’s obfs or masquerade, or whether a Hysteria 2 node has udp katana rebuilds the listener, dropping every connection on the node
Hysteria 2’s up_mbps, down_mbps, ignore_client_bandwidth or udp.idle_timeout_secs, AnyTLS’s padding_scheme Applied to connections that arrive after the change; open connections keep what they had

A masquerade change rebuilds the listener because an open connection would otherwise go on answering probers the old way. Turning UDP off would otherwise leave it relayed for every client connected before.

GET users returns the users of the node and, once for all of them, their limits:

{
"limits": {"speed_limit": 12500000, "device_limit": 3},
"users": [{"id": 7, "uuid": "11111111-2222-3333-4444-555555555555"}]
}
Field Use
limits.speed_limit The speed limit of each user, in bytes per second, not Mbps. It applies to every user on their own, never to the node as a whole. 0 means no limit.
limits.device_limit How many client IP addresses each user’s connections may come from at once. 0 means any number. Enforced only with enable_device_limit = true.
users[].id The user ID that reports carry
users[].uuid The user’s UUID, the credential for every protocol

Every field is required. An answer without its limits, or with a negative limit or a malformed UUID, is refused as a whole, because a missing limit read as 0 would lift every user’s: on the first start the start fails with user_list failed: parse helium users response and katana retries it, and a running node logs a warning and keeps the users it has.

katana uses each UUID in its lowercase hyphenated form, such as 11111111-2222-3333-4444-555555555555, whatever form the answer wrote it in:

Protocol The UUID is
VMess, VLESS, sss The user ID
Trojan, AnyTLS The password
SOCKS, HTTP Both the account name and the password
Shadowsocks 2022 The source of the user key: its first 16 or 32 characters
Shadowsocks AEAD The password
Hysteria 2 The auth string

A user katana cannot admit is skipped with a warning that names the user ID and never the credential, as on the other panels: skipping user 7: listed twice, or skipping user 7: shares its credential with user <first>.

Every user gets the speed limit of the users answer, in bytes per second, each in a token bucket of their own. Setting speed_limit in [node.api] to a value above 0 replaces it with that value in Mbps (multiplied by 125 000), so every user on the node gets exactly that limit. The device limit stays the panel’s either way.

When helium changes the limit, katana applies it at the next poll, to the users’ open connections too, without dropping them. Speed limits explains how the token bucket enforces it.

Each users answer says one device limit for every user. katana enforces it only where [node.controller] enable_device_limit = true, because a device is counted by its client IP address and katana must see the real one: clients connect to the node directly, the relays in front of it send a PROXY protocol v2 header, or, on a WebSocket node, a reverse proxy in real_ip_from names each client in real_ip_header (Behind a reverse proxy).

The same switch makes katana report client addresses. Each report then carries, for every user, the addresses of the connections opened since the previous report and of every connection still open, so a connection that stays up appears in every report while it lasts. With the switch off, katana collects no addresses and the ips list is empty.

Device limits and IP bans covers how the limit is counted and the IP ban that the same switch turns on.

Each poll, katana sends one report, a report::Report:

{
"report_id": "6f9619ff-8b86-d011-b42d-00c04fc964ff",
"agent_version": "6.0.0",
"traffic": [{"id": 7, "up": 1048576, "down": 52428800}],
"ips": [{"id": 7, "ips": ["203.0.113.7", "2001:db8::7"]}]
}
Field Meaning
report_id A UUID that identifies this report
agent_version katana’s version
traffic For each user with traffic since the last report, by id, the bytes uploaded (up) and downloaded (down), counted as each connection’s protocol stream
ips For each user, by id, the client addresses described above. Empty without enable_device_limit.

katana sends no request when both lists are empty. A report that carries only addresses is still sent.

helium’s user IDs are 32-bit and its byte counts unsigned. An entry whose user ID does not fit, or whose byte count is negative, is left out of the report with a warning that names the user ID alone: traffic left out of the report: the uid or a byte count is out of range, or client addresses left out of the report: the uid is out of range.

helium answers {"duplicate": false}, or {"duplicate": true} for a report it has already recorded, which katana logs at INFO level as panel already had this report. A report that cannot be delivered is logged as a warning, node 1: report <report_id>: POST report. Traffic reporting describes the accounting.

A helium node’s audit rules are the local file at rule_list_path alone: the node config carries no routes to derive rules from. katana reads the file again on every cycle, so an edit to its contents applies at the next one, and disable_get_rule = true turns it off. The rules match as on every panel; see Audit. A matching flow goes to a blackhole. helium has no endpoint for audit hits, so katana does not report them.

Feature On helium
Audit rules from the panel The node config carries no routes; only rule_list_path applies
Audit hit reports Not sent
Node status, online users Not sent; the report’s ips carries client addresses instead
A node-level speed limit The config has none; the limits come with the users
base_config intervals katana polls and reports every update_periodic seconds
You change What happens
panel_type (other than its letter case), host, node_id or key These identify the panel node, so katana stops the node and starts it again with a new panel client. The reload names it helium@https://panel.example.com#1.
timeout, speed_limit or rule_list_path, or enable_mtls Applied in place, without a restart. The node builds a new panel client and at once reads the config and the user list again, in full. A speed_limit, rule_list_path or enable_mtls edit keeps every connection; otherwise katana drops the node’s connections only if the new description changes the protocol or the transport.
node_type, enable_vless, or any [node.hysteria] key but congestion The reload is refused as a whole, with reload: node helium@https://panel.example.com#1: [node.api] node_type is set, …; keeping current config, and every node keeps running as it was.
enable_device_limit, ban_max_failures, ban_window_secs, ban_secs, carrier_max_failures, real_ip_header, real_ip_from, handoff_dir, handoff_group Applied at once to new connections; open connections are kept.
The certificate settings, disable_sniffing, [node.hysteria] congestion or [node.route] Applied at once, dropping the node’s connections. A congestion edit also gives the node a new panel client, which reads the config and the user list again.

Hot reload covers reloads in general.

katana 5 speaks node API v2 alone, so it needs a Helium that serves node API v2. A node still on katana 4 keeps calling node API v1. Before you start a helium node on katana 5:

  1. Remove the keys the panel now describes. Delete node_type, enable_vless and vless_flow from [node.api], and every [node.hysteria] key but congestion, the [node.hysteria.masquerade] table included. A node that keeps any of them but vless_flow is refused at start, by --test and on reload, as Keys the panel describes shows; vless_flow is no key at all since katana 6.0.0, so a file that keeps it fails the parse.

  2. Set in the panel what used to be local. A Hysteria 2 node’s UDP relay, its idle timeout and its masquerade, which katana 4 took from [node.hysteria], are now the panel’s udp and masquerade. So are its obfuscation and its rates, obfs, up_mbps, down_mbps and ignore_client_bandwidth, which [node.hysteria] can no longer override. Its users authenticate with their UUID alone, so credential = "user_pass" has no equivalent.

  3. Move block rules into the local file. Node API v2 carries no routes, so audit rules that came from the panel’s block routes no longer apply. Put the patterns you need in the file at rule_list_path.

  4. Check the file with katana 5: katana --test -c /etc/katana/config.toml must print Configuration OK.

The limits change shape too: each users answer now says one speed limit and one device limit for every user of the node, where node API v1 sent them with each user.

Upgrading to katana 6 lists what changed after katana 5.

These come from the config file itself, and --test reports them:

Message Cause Fix
[node.api] node_type is set, but a helium node's protocol is described by the panel; remove it (of [node.hysteria], only congestion is this host's to choose) The config sets a key the panel describes. The message names the first such key in the same way: [node.api] enable_vless, [node.hysteria] up_mbps, [node.hysteria.masquerade] and so on. Remove the key.
unknown hysteria congestion "vegas" (expected "cubic", "bbr" or "reno") [node.hysteria] congestion is misspelt. Use cubic, bbr or reno, in lower case.
unknown panel_type "helium" katana is older than 4.5.0. Upgrade katana.

These are the messages katana logs when a helium node cannot start. They appear after node <node_id>: node_info failed:, user_list failed: or initial start failed:, followed by ; retrying in <N>s.

Message Cause Fix
GET config Network failure, timeout, or an HTTP error status. helium answers 401 without a token and 403 for a wrong token or node ID. A katana 5 node against a Helium without node API v2 fails here too. Check host, node_id and key, that the panel is reachable, and that it serves node API v2.
parse helium config response: … The answer is not a node config katana can use. The text after the colon says why: a JSON error, for example for an HTML page because host points at the wrong site or at a URL that redirects, or the rule of the node config the answer breaks, such as server_key is 16 bytes, but 2022-blake3-aes-256-gcm takes a 32-byte key. Check that host is helium’s own base URL, with the scheme it answers on, and that the panel describes the node correctly.
parse helium users response The users answer is not the expected JSON: for example it has no limits, or an entry lacks id or uuid. Check the panel’s logs.
TLS node requires cert.mode = "file", hysteria2 node requires cert.mode = "file" The panel describes a node with TLS, or a Hysteria 2 node, and [node.controller.cert] has no certificate. --test cannot see this on helium. Set mode = "file", cert_file and key_file.

Troubleshooting has more diagnostics.