feat(android): add per-app Tor routing with isolated DNS and bridge support - #279
Open
billuwdev wants to merge 8 commits into
Open
feat(android): add per-app Tor routing with isolated DNS and bridge support#279billuwdev wants to merge 8 commits into
billuwdev wants to merge 8 commits into
Conversation
appshubcc
force-pushed
the
main
branch
3 times, most recently
from
July 18, 2026 17:07
bb605a0 to
570c649
Compare
appshubcc
force-pushed
the
main
branch
2 times, most recently
from
August 13, 2026 04:12
95bde57 to
c0bb574
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.
Summary
This PR adds an Android Tor module with per-app routing, DNS isolation,
bridge support, runtime status, and traffic statistics.
Only applications explicitly enabled for both VPN and Tor are routed through
Tor. Other VPN applications continue using the regular VPN route and DNS path.
Changes
tor-outSOCKS outbound and per-package routing rules into Mihomo.Core Changes
This PR modifies the vendored Mihomo core DNS hijack path.
The TUN DNS handler resolves the source Android package name and forwards DNS
packets to
127.0.0.1:19053only when that package is present in the Torpackage set. All other DNS packets continue through the existing Mihomo DNS
relay.
Tor routing state is passed from Flutter to the core using an atomic package
state container.
Traffic Flow