feat: accept wardriver/hunter stream regions and gate their delivery - #5
Merged
Merged
Conversation
Add PUBLISH_EXTRA_REGIONS (default wardriver,hunter): non-IATA stream-region labels accepted in the topic region slot alongside IATA codes and test. They skip IATA validation but keep the pubkey-in-topic match and topic normalization, and are kept lowercase. authorizeForward now blocks /wardriver/* delivery to LIMITED subscribers.
Elektr0Vodka
force-pushed
the
feat/accept-wardriver-hunter-regions
branch
from
September 21, 2026 14:11
41bf1d2 to
156efd6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Accept non-IATA stream-region labels in the topic region slot, alongside real IATA codes and
test.A browser-based wardrive publisher publishes to
meshcore/{region}/{PUBKEY}/wardriver/{obs,track}, where{region}is a stream label (wardriver,hunter) chosen so this traffic stays separable from regional observer traffic. TodayauthorizePublishrequires that slot to be a 3-letter IATA code or literallytest; anything else is rejected and the client is closed. Because these publishes are QoS 0 there is no nack, so a publisher's "sent" counter climbs while the broker silently drops everything.Changes
PUBLISH_EXTRA_REGIONS(new env, comma-separated, lowercase; defaults towardriver,hunter). Labels in this set are accepted as publish regions: they skip IATA validation but keep every other check — the pubkey-in-topic must equal the authenticated JWT pubkey, and the topic is still normalized. Stream labels are kept lowercase (IATA normalizes to uppercase,testto lowercase). Set it explicitly (even empty) to override.authorizeForwardnow blocks/wardriver/*topics for LIMITED (role 3) subscribers. These streams carry realtime location, so only FULL_ACCESS (2) and ADMIN (1) receive them — mirroring the existing/internaland/serialblocks.Notes
AUTH_EXPECTED_AUDIENCE= the hostname the publisher connects to./wardriver/*must be role >= FULL_ACCESS (2).tsc --noEmitclean.