Repository navigation
feat(ip_gate): route country verdict and the unknown client identity - #149
Merged
Merged
Conversation
This was referenced Oct 15, 2026
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.
Closes #148
feat(ip_gate):RouteIpGate::evaluate_access(ip: Option<IpAddr>, countries, handler) -> RouteAccess, the referencecheck_route_ip_accesswith its country arm. The IP-list verdict and the route country verdict are combined (false if either is false, true if either is true, otherwise no verdict), andRouteAccess::country_whitelist_matchedcarries the reference_route_country_whitelist_matched(skip_countriesfor the global stage).Noneis the unknown client identity: denied when the route has anip_whitelistorwhitelist_countries, unrestricted otherwise.feat(geo):check_route_country, the referencecheck_country_access: no handler is no verdict,blocked_countriesis asked first, a configuredwhitelist_countriesis false for an unresolved or unlisted country, and there is no loopback exemption.feat(ip_gate):IpGateConfig::evaluate_unknown, the global_check_unknown_identity_access: a configured whitelist denies the unknown identity, otherwise it passes with no skip state.All additive, no new variants in public enums, so the master adapters keep compiling.
tests/route_country.rsruns 640 route rows and 45 global rows generated by running the reference (check_route_ip_access,check_ip_access); on master the test does not compile because the API is absent, and the adapters (tower, actix, rocket, 158 of 640 route and 2 of 45 global rows differing) are fixed in their own PRs that need this one first. Fmt, clippy, workspace tests, the three conformance gates, doc, 100% line coverage and the MSRV 1.92 check and test pass locally.