Skip to content

fix(status): stop Addresses owned reading 6 while Routed reads 2 in VPN Only - #161

Merged
GeiserX merged 3 commits into
mainfrom
fix/status-owned-count-split
Oct 2, 2026
Merged

GeiserX merged 3 commits into
mainfrom
fix/status-owned-count-split

Conversation

@GeiserX

@GeiserX GeiserX commented Oct 2, 2026

Copy link
Copy Markdown
Owner

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 behind routedAddressCount, the card and Routed. A new RoutedBySource.catchAllCount gives the catch-alls, and everythingElseDirect now 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 StatusTab with fixed fake state.

Before After
before after

Strings

one catch-all several
en 2, plus 1 catch-all 2, plus 4 catch-alls
es 2, más 1 ruta general 2, más 4 rutas generales
fr 2, plus 1 route générale 2, 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

StatusPageTests covers 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 matching addressCount in both modes, a kernel that disagrees with the record, and the Spanish and French text. RoutedAddressCountTests pins catchAllCount per mode, and a user's own 0.0.0.0/2 entry 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:

  • the row back to the raw tagged count: 9 failures ("6, plus 4 catch-alls" is not "2, plus 4 catch-alls")
  • catchAllCount ignoring the mode: 3 failures (Bypass read "6, plus 4 catch-alls")
  • dropping the tagged destinations the app has no record of: 1 failure ("2, plus 3" is not "3, plus 3")
  • the Spanish plural left in English: 2 failures

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].

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.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: GeiserX/VPN-Bypass/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5e6d6988-7f2c-48d7-96be-343d0913cad7

📥 Commits

Reviewing files that changed from the base of the PR and between 93ed4ab and 0cf4b00.

📒 Files selected for processing (10)
  • Sources/VPNBypassCore/MenuBarViews.swift
  • Sources/VPNBypassCore/Resources/en.lproj/Localizable.strings
  • Sources/VPNBypassCore/Resources/es.lproj/Localizable.strings
  • Sources/VPNBypassCore/Resources/fr.lproj/Localizable.strings
  • Sources/VPNBypassCore/RouteManager.swift
  • Sources/VPNBypassCore/StatusTab.swift
  • Tests/VPNBypassTests/RoutedAddressCountTests.swift
  • Tests/VPNBypassTests/StatusPageTests.swift
  • docs/CHANGELOG.md
  • docs/usage.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GeiserX
GeiserX merged commit 6482f09 into main Oct 2, 2026
5 checks passed
@GeiserX
GeiserX deleted the fix/status-owned-count-split branch October 2, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant