License format
You don’t need the token format to set up a license: the dashboard issues a ready token, and License explains where to put it. This page is for those who want to verify a token by hand, read a rejection in the log or understand how revocation works.
#How the app verifies a token
- Verification is offline: the app checks the Ed25519 signature with built-in public keys and never contacts Wrabbit servers.
- Only we issue tokens: the app holds no private keys, and a signature cannot be forged from a public key.
- The token is checked on every subscription load. If it fails, its features are not turned on; the rest of the subscription works as usual.
- The dashboard currently issues v1 tokens. 2.2.0 understands the v2 format; your token’s format is visible from its prefix and in the
formatfield of the license API.
#Format v12.1.02.2.0
v1.<base64url(payload)>.<base64url(signature)>
signature = Ed25519(key kid, "v1." + base64url(payload))
Three parts separated by dots. The signature covers the ASCII string v1. + the payload in base64url, without padding. The payload is compact JSON:
{
"dom": "sub.example.com",
"feat": ["brand", "hide", "routing", "app", "push"],
"iss": 1794560400,
"exp": 1797152400,
"kid": "k1",
"sub": "<PROVIDER_ID>"
}
| Field | Value |
|---|---|
dom | The subscription domain — a lower-case host. 2.2.0 also understands a host with a path, but the dashboard issues a host only |
feat | Features: brand, hide, routing, app, push. Unknown strings are skipped. 2.1.0 knows only brand, hide and routing, and skips app and push as unknown |
iss | Issue time, Unix seconds |
exp | End of term, Unix seconds. 2.2.0 does not accept 0 (rejection lifetime); 2.1.0 treats 0 as a token without an end date |
kid | Signing key label. Currently k1 |
sub | Optional provider ID. For a new-url subscription move it must match between the old and new domain tokens |
#Verify a token by hand
The script prints the payload and checks the signature with the k1 public key — the same one built into the app. It needs OpenSSL 3; on macOS — from Homebrew.
#!/usr/bin/env bash
# Usage: ./verify-wrab-license.sh 'v1.<payload>.<signature>'
# Needs OpenSSL 3. Prints the payload and checks the signature with the k1 key.
set -euo pipefail
TOKEN="$1"
PUB="920anxNpSIRAK4JQWMuqeAtYLG20tNiI551WAXZXkLw=" # kid k1, Ed25519, base64
b64url() {
local s; s=$(printf '%s' "$1" | tr '_-' '/+')
while [ $(( ${#s} % 4 )) -ne 0 ]; do s="$s="; done
printf '%s' "$s" | openssl base64 -d -A
}
IFS=. read -r VER PAYLOAD SIG <<< "$TOKEN"
[ "$VER" = v1 ] || { echo "not a v1 token"; exit 1; }
echo "payload:"; b64url "$PAYLOAD"; echo
tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT
printf 'v1.%s' "$PAYLOAD" > "$tmp/msg"
b64url "$SIG" > "$tmp/sig"
{ printf '\x30\x2a\x30\x05\x06\x03\x2b\x65\x70\x03\x21\x00'
printf '%s' "$PUB" | openssl base64 -d -A; } > "$tmp/pub.der"
openssl pkeyutl -verify -pubin -keyform DER -inkey "$tmp/pub.der" \
-rawin -in "$tmp/msg" -sigfile "$tmp/sig"
Signature Verified Successfully means the signature is valid. Then compare dom with the subscription host and exp with the current date: date -r <exp> on macOS or date -d @<exp> on Linux.
#Format v22.2.0+
In v2 the token is signed with an issuing key, and that key’s certificate is signed with a Wrabbit root key. This way the issuing key can be changed without a new app build.
v2.<C>.<CS>.<P>.<S>
C = base64url(certificate JSON)
CS = Ed25519(root, "wrabbit/cert/v2." + C)
P = base64url(token JSON)
S = Ed25519(certificate key, "wrabbit/lic/v2." + C + "." + CS + "." + P)
| Part | Fields |
|---|---|
Certificate C | v = 2, use = lic, alg = Ed25519, kid, pub (issuing public key), nbf and naf (issuing window), max_exp (token term limit), root (root label), optional crit |
Token P | v = 2, use = lic, alg = Ed25519, kid, dom, feat, iat (issued), exp, tid (token ID), optional sub and crit |
- Every part is strict base64url and strict JSON, no longer than 2048 bytes.
- The root must be active; the root signature over
Cand the issuing key signature overC.CS.Pmust be valid; the token and certificatekidmust match. - The token was issued within the certificate window:
nbf ≤ iat ≤ naf. An expired certificate does not cancel tokens already issued. - Term:
expno later than the certificate’smax_expand no more than 400 days afteriat. critlists fields the token must not be accepted without understanding. A field unknown to the app means acriticalrejection: a newer Wrabbit is needed.
#Domain matching
- The host from
dommust match the subscription host exactly: subdomains and suffixes do not count. Case and port don’t matter; 2.2.0 also ignores a trailing dot, the scheme anduser@, while 2.1.0 ignores only case and port. - 2.2.0 matches against the host that answered after redirects, 2.1.0 against the requested host.
- If
domhas a path, the answering address path must equal it or continue after/; path case matters. 2.2.0 only. - 2.2.0 only: a device clock behind the app build date is treated as the build date — the term cannot be bypassed by setting the clock back.
Tokens for CDNs, mirrors and a backup domain go in the wrab-license-alt header: the app takes the token that fits the answering host, and among those the newest format. Details — Domain matching and CDNs and mirrors.
#Rejection codes2.2.0+
In 2.2.0 the check result is written to the “Subscription fetches” log (Settings → Logs) as a short code, and in “Subscription check” as the “Reason” line. 2.1.0 does not show the rejection reason.
ok brand,hide,routing,app,push exp 2027-12-20
rejected domain
rejected expired 2026-11-01
rejected unknown-key k9
rejected critical newfield
| Log code | “Reason” on screen | When |
|---|---|---|
none | — | No token in the response |
ok <features> exp <date> | — | The token was accepted |
rejected format | “malformed token” | Not a three-part v1.… or a five-part v2.…, not base64url, JSON not parsed |
rejected unknown-key <kid> | “unknown signing key (kid …)” | This app version has no key with that label |
rejected bad-signature | “signature mismatch” | The token was altered or truncated |
rejected expired <date> | “expired …” | exp has passed; for v1 — or 31.12.2027 has passed |
rejected lifetime | “invalid term: no expiry or longer than the paid period” | exp = 0; for v2 — a term over 400 days or later than max_exp |
rejected domain | “issued for X, subscription answers from Y” | The dom host or path did not match the answering address |
rejected revoked | “revoked by Wrabbit” | The token, its certificate or key was revoked |
rejected certificate | “signing key isn’t certified by a Wrabbit root” | v2 only: the root is not active, the root signature is invalid, or the token was issued outside the certificate window |
rejected critical <field> | “newer format than this version — please update the app” | v2 only: crit has a field this version doesn’t know |
What to do about each rejection — Why the license didn’t work.
#Revocation2.2.0+
A token can be revoked before its exp — for example, if it leaked. Revocation records are signed with a Wrabbit root key and arrive in the wrabbit-revocations subscription response header.
- The dashboard puts the header into the Wrabbit rule block. Use the block as a whole, with every line, and update it together with the token.
- The value is
wrr2.…(revocation lists) andwrt2.…(root rotation) records separated by spaces or commas, up to 16 records, no more than 1 KB. Header only, not a body line. - The app accepts records from any subscription: a revocation received through one provider applies to the whole device.
- A single token, an issuing key certificate or a whole v1 key can be revoked — with an exception list for honest tokens.
- Revocation only grows: an old or repeated record undoes nothing. A revoked token stops working as soon as the device receives the record.
- 2.1.0 does not understand revocation: for it a token is valid until
exp.