Skip to content

fix(routing): honor ad and app proxy policies#38

Merged
LIghtJUNction merged 1 commit into
mainfrom
fix/issues-36-37-routing
Jul 13, 2026
Merged

fix(routing): honor ad and app proxy policies#38
LIghtJUNction merged 1 commit into
mainfrom
fix/issues-36-37-routing

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Owner

What changed

  • make ad-allow inherit the normal final policy while keeping Direct/Proxy overrides
  • generate the same exact selector in jq, no-jq, migration, and bundled config paths
  • add a high-priority package rule so Proxy-listed apps really use the proxy outbound
  • reload sing-box after app policy changes
  • update multi-app writes transactionally and keep Proxy/Bypass lists mutually exclusive
  • align WebUI wording with the effective behavior

Root cause

ad-allow defaulted to Direct, so an allowed domain could still ignore the active Proxy/final policy. Per-app settings only changed TUN include/exclude fields and did not reload the running core; the Proxy list also lacked a package-to-proxy route rule.

Validation

  • sh scripts/test-ad-routing.sh
  • sh scripts/test-app-routing-policy.sh
  • cargo test -p magicnet-cli (44 passed)
  • cargo fmt --all -- --check
  • npm run typecheck in webui/
  • npm run build in webui/
  • pre-commit run --all-files (magicnet-validate passed)
  • parent and nested git diff --check
  • sing-box check on bundled and generated configurations

Fixes #36
Fixes #37

Dependency: LIghtJUNction/MagicSingBox#3 (merged)

Make ad allowlists inherit the final policy, force Proxy-listed apps through the proxy outbound, and reload app policy changes immediately.\n\nRefs #36\nRefs #37

Signed-off-by: LIghtJUNction <lightjunction.me@gmail.com>
Copilot AI review requested due to automatic review settings July 13, 2026 04:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @LIghtJUNction, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@LIghtJUNction LIghtJUNction merged commit 8d4da53 into main Jul 13, 2026
3 checks passed
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.

代理软件走向直连且设置没用 广告放行

2 participants