fix(status): stop Addresses owned reading 6 while Routed reads 2 in VPN Only - #161
Merged
Merged
Conversation
In VPN Only with two entries, Settings > Status read Routed 2 and Addresses owned 6: the row counted the 4 catch-all routes as addresses. The row still reads the kernel's tagged routes, and now counts them with RoutedBySource, the rule the card and Routed use. A new RoutedBySource.catchAllCount gives the catch-alls, and everythingElseDirect reads it. The row says "2, plus 4 catch-alls", or one number in Bypass and Custom. English, Spanish and French.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: GeiserX/VPN-Bypass/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…t-split # Conflicts: # docs/CHANGELOG.md
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.
In VPN Only with two entries on the list, Settings > Status read Routed 2 and, a few rows down under Tunnels, Addresses owned (kernel-tagged) 6. The row counted the 4 catch-all routes the app installs to send everything else direct as addresses, so the page contradicted itself.
The row now reads "2, plus 4 catch-alls", "0, plus 4 catch-alls" with an empty list, and one number in Bypass and Custom.
It still reads the kernel's tagged routes, so it can still show drift between the kernel and what the app recorded. It counts them with
RoutedBySource.addressCount, the function behindroutedAddressCount, the card and Routed. A newRoutedBySource.catchAllCountgives the catch-alls, andeverythingElseDirectnow reads it, so there is still one rule for what a catch-all is. A tagged destination the app has no record of counts as an address. While the kernel holds what the app installed, the first number equals Routed.Before / after
VPN Only, 2 entries, 2 addresses plus the 4 catch-alls installed. Offscreen renders of the real
StatusTabwith fixed fake state.Strings
2, plus 1 catch-all2, plus 4 catch-alls2, más 1 ruta general2, más 4 rutas generales2, plus 1 route générale2, plus 4 routes générales"ruta general" and "route générale" are the words the es and fr files already use for catch-all routes.
Tests
StatusPageTestscovers VPN Only with entries ("2, plus 4 catch-alls", "1, plus 1 catch-all"), VPN Only without entries ("0, plus 4 catch-alls", "0"), Bypass (bare number, and leftover catch-all ranges counted as addresses), Custom, the first number matchingaddressCountin both modes, a kernel that disagrees with the record, and the Spanish and French text.RoutedAddressCountTestspinscatchAllCountper mode, and a user's own0.0.0.0/2entry is not counted as a catch-all.I broke each key line once on the Mac mini and watched the tests go red, then restored it:
catchAllCountignoring the mode: 3 failures (Bypass read "6, plus 4 catch-alls")Full suite on the mini: 1481 tests, 10 skipped, 0 failures.
scripts/check-localizations.py: all 594 keys have es and fr entries.docs/usage.md no longer names this row as the exception to the counting rule, and the changelog has an entry under [Unreleased].