Upgrading to katana 6
katana 6 serves two panels instead of three: Xboard and V2board (panel_type = "NewV2board" or "V2board") and helium ("Helium"). SSPanel is gone, and with it the two [node.api] keys that only SSPanel nodes read and the audit reports that only SSPanel received. A node on Xboard, V2board or helium upgrades in place, with the same binary names, the same systemd unit and the same config.toml, unless its file still sets one of the removed keys or its panel asks for TCP header obfuscation.
This page lists the changes for operators moving from katana 5.x to 6.x; it describes 6.0.0, and From 6.0 to 6.1 lists what 6.1.0 changed after it. Two of the changes arrived in 5.1, and are listed for operators coming from 5.0. Upgrading to katana 4 covers the earlier versions. The restart itself follows the procedure in Deployment.
Before the first restart
Section titled “Before the first restart”-
Move every SSPanel node to another panel. katana 6 refuses
panel_type = "SSpanel". See SSPanel is no longer served. -
Delete
vless_flowanddisable_custom_config. A file that still sets either one does not parse. See Two keys are gone. -
Turn off TCP header obfuscation in the panel. A TCP node whose panel sets a header type other than
noneis refused. See TCP header obfuscation is refused. -
Coming from 5.0: rewrite sss chains in the new notation. See sss chains use the new notation.
-
Run the new binary’s
--teston every file. See Check every file with the new binary.
SSPanel is no longer served
Section titled “SSPanel is no longer served”katana 6 serves only panel_type = "NewV2board", its alias "V2board", and "Helium". A node that sets panel_type = "SSpanel", in any case, is refused by name:
$ katana --test -c /etc/katana/config.tomlconfiguration error: node 1: panel_type "SSpanel" is not supported: katana serves the NewV2board and Helium panels--test exits with status 1. The quoted value is spelled as in your file. At startup katana logs the same message for that node, skips it and starts the others, and exits with no nodes could be started if no node is left. A node skipped at startup is checked again at every reload, so while its [[node]] table stays in the file, every save is refused with reload: node sspanel@…: panel_type "SSpanel" is not supported: …; keeping current config.
katana 6 has no way to read an SSPanel node. Serve the node from an Xboard, V2board or helium panel instead, with that panel’s node ID, key and users, and change its [[node]] table to match: panel_type, the [node.api] keys host, key and node_id, and a node_type on Xboard and V2board, which a helium node must not set. Xboard and V2board and helium describe the setup. katana 5 serves these panels too, so you can move a node while it still runs katana 5, and upgrade afterwards.
Audit hits are no longer reported
Section titled “Audit hits are no longer reported”SSPanel was the only panel that took audit hits. katana 6 reports them to no panel, and keeps no record of them. Audit rules still work: a flow that matches one is sent to a blackhole, as before. The warning node <id>: report illegal: … and the audit report a node sent when it stopped are gone. See Destination audit.
Two keys are gone
Section titled “Two keys are gone”katana 5 read [node.api] vless_flow and disable_custom_config only for SSPanel nodes: on Xboard and V2board vless_flow had no effect, and helium refused it. katana 6 removed both keys. [node.api] rejects keys it does not know, so a file that still sets either one fails the parse as an unknown key, even with the default value (vless_flow = "", disable_custom_config = false):
configuration error: config parse error: TOML parse error at line 9, column 1The line and column point at the key. At startup the same error stops katana with exit status 1, and with the template unit the start check refuses the file before katana runs. Delete both keys from every [node.api] before you upgrade. katana 5 reads a file without them exactly as it read the defaults.
TCP header obfuscation is refused
Section titled “TCP header obfuscation is refused”Xboard and V2board can give a TCP node a header obfuscation, such as the http header type. katana 5 ignored the setting and served bare TCP, which clients that send the header could not use. katana 6 refuses the node instead.
A VMess, VLESS (REALITY included), Shadowsocks, SOCKS or HTTP node over TCP is served when the panel sets no header, or a header that names no type or the type none, in any case. Any other type is refused with:
node requests kernel-unsupported feature: tcp header type "http"A header that is not a JSON object is refused with tcp header is not an object, and one whose type is not a string with tcp header type is not a string. The header comes from the panel, so --test cannot see it: the node does not come up, and it keeps retrying like any node whose panel settings katana cannot serve (Start-up log lines). Before you upgrade, set the header type of each such node to none in the panel, and have its users update their subscriptions. helium describes no TCP header.
The client certificate can be turned off
Section titled “The client certificate can be turned off”katana presents a client certificate when a panel asks for one, unless the node sets enable_mtls = false, and does not follow redirects. The new key sits directly under [[node]] and defaults to true, so an existing file needs no change. Set it to false for a panel that should not receive the certificate:
[[node]]panel_type = "NewV2board"enable_mtls = falseWritten inside [node.api], the key fails the parse as an unknown key. A saved edit to it gives the node a new panel client, as an edit to [node.api] does, without a restart; see Hot reload.
Geodata files replaced in place are picked up
Section titled “Geodata files replaced in place are picked up”From 5.1 on, katana looks at a node’s geoip and geosite files every time it builds the node’s spec, which it does at every poll. When a file at the same path has been replaced, the node rebuilds its routes from the new file at its next poll, at most update_periodic seconds later, and new connections are routed with it. Open connections are not dropped. katana 5.0 read the files only when something else made it build a node’s routes again, such as a restart, so a new file at the same path went unnoticed until then.
Replace a file by downloading the new one next to it and renaming it over the old one, as for a certificate renewal, so that a poll never reads a half-written file.
sss chains use the new notation
Section titled “sss chains use the new notation”From 5.1 on, katana reads an sss node’s transform chains in sss’s expression notation: baseN() where 5.0 read base64, for example. Only helium describes sss nodes. A chain that the panel still writes in the earlier notation is refused when katana builds the node, so the node does not come up. Rewrite the chains in the panel before you upgrade a node from 5.0; helium describes the notation.
Log lines
Section titled “Log lines”| katana 5 | katana 6 |
|---|---|
node <id>: audit missed <n> flow events |
node <id>: missed <n> flow events |
node <id>: report illegal: … |
Removed, with the audit reports |
node <id>: node_info failed: sspanel: …, and every other line about /mod_mu/ requests |
Removed, with SSPanel |
| None | node <id>: panel_type "<value>" is not supported: katana serves the NewV2board and Helium panels |
| None | node requests kernel-unsupported feature: tcp header type "<type>", tcp header is not an object, tcp header type is not a string |
Troubleshooting lists every line with its cause.
Check every file with the new binary
Section titled “Check every file with the new binary”Run the new binary’s --test on every config file before you restart anything, as step 4 of the upgrade procedure does. It finds an SSPanel node and the two removed keys, and stops at the first problem, so run it again until every file prints Configuration OK. It does not contact the panel, so it cannot see a TCP header or an sss chain. After the restart, check that every node logs its listening on line, as the smoke test does.
From 6.0 to 6.1
Section titled “From 6.0 to 6.1”katana 6.1.0 reads the same config file as 6.0, with no key added or removed, and upgrades in place; rolling back to 6.0 needs no change to the file either. What changed is how a node reads the panel’s answer:
- A refused Xboard or V2board node says why. katana now converts a UniProxy answer into the same node config helium sends, and refuses what it cannot serve as it reads the answer, with the reason in the log line. 6.0 refused most of these only when it built the node, and some, such as a Shadowsocks
obfs, with no reason at all. The new lines are in the table below; UniProxy refusals lists every reason. - Stricter UniProxy checks. A UniProxy answer is held to the rules of that node config, so 6.1 refuses some answers 6.0 served or refused later: a WebSocket path that does not start with
/or has a query other than?ed=N, a WebSocket host with a port, an empty gRPC service name, an AnyTLS padding scheme with an empty line, a line break or more than 2048 bytes, and a REALITY server name that is not a plain host name. Check such nodes in the panel before you upgrade; Protocols gives each message. - Ports outside 1 to 65535 are refused. 6.0 truncated a
server_portabove65535into another port, so65979was served on443. 6.1 refuses it, as it refuses0, a missing port and a negative one:server_port 65979 is not a port (1 to 65535). - A
[node.hysteria]edit gives the node a new panel client, which reads the node and its users again at once. It still drops every connection on the node, as in 6.0. - A
hostorserver_namechange on a UniProxy Trojan, AnyTLS or Hysteria 2 node no longer drops connections: katana does not read them. - Panel requests ask for gzip (
Accept-Encoding: gzip), from 6.0.1 on, and katana reads a compressed answer as it decompresses it. - katana reads a legacy Shadowsocks node in a helium node config too, with
aes-128-gcm,aes-256-gcm,chacha20-ietf-poly1305orxchacha20-ietf-poly1305and noserver_key; see helium. Helium’s own admin input refuses those ciphers, so its nodes stay Shadowsocks 2022.
| katana 6.0 | katana 6.1 |
|---|---|
node <id>: initial start failed: <reason>; retrying in <N>s, for a UniProxy node katana cannot serve |
node <id>: node_info failed: parse UniProxy config response: <reason>; retrying in <N>s |
node <id>: cannot build the node, keeping the running one: <reason> (ERROR), at a poll |
node <id>: node_info: parse UniProxy config response: <reason> (WARN) |
node <id>: node_info failed: parse UniProxy config response; retrying in <N>s, with no reason |
The same line with the reason after parse UniProxy config response: |
node <id>: panel returned port 0; retrying in <N>s, node <id>: refreshed port is 0, keeping the last one |
… parse UniProxy config response: server_port <n> is not a port (1 to 65535) |
inbound <tag>: reality is for vless only |
node requests kernel-unsupported feature: REALITY on a VMess node |
REALITY node without its settings, on a SOCKS or HTTP node |
node requests kernel-unsupported feature: socks over REALITY, or http over REALITY |
node requests kernel-unsupported feature: REALITY over a stream transport |
security reality runs over transport tcp only |
inbound <tag>: vless vision (xtls-rprx-vision) rides only over reality |
flow xtls-rprx-vision needs security reality |
decode PSK: …, for a UniProxy server_key |
shadowsocks server_key is not base64 |
hysteria2: 233 is the authentication success status and cannot be used for the masquerade, for [node.hysteria.masquerade] |
masquerade.status must not be 233, the Hysteria 2 authentication success status |
hysteria2: <n> is not an HTTP status code, for [node.hysteria.masquerade] |
masquerade.status is <n>, but must be 100 to 999 |
A refusal of the host’s own settings, such as an ACME cert.mode or a missing certificate, still logs initial start failed: … while the node comes up and cannot build the node, keeping the running one: … on a running node.
Rolling back to 5.x
Section titled “Rolling back to 5.x”A katana 5 binary reads a katana 6 config file unless the file sets enable_mtls, which katana 5 rejects as an unknown key. Remove it first, then follow Roll back. A node you moved off SSPanel stays on its new panel, which katana 5 serves too. katana 5.0 does not read the new sss notation and does not pick up geodata replaced in place, so roll back to 5.1 or later if you rely on either.