Repository navigation
Add opt-in VPN source validation levels and visibility status - #129
Merged
Merged
Conversation
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.
Add opt-in source validation in Split tunneling (Android 10+), applied on reconnection. Both levels check TCP admission. Standard caches UDP permission for a fixed non-sliding second per live flow; Advanced checks every outgoing datagram. Existing enabled settings without a level migrate to Advanced; fresh opt-in selects Standard. Settings remain local and survive imports without being exported.
Disabled sessions retain the original transport and link endpoint instances and use Mobile.start, without source wrappers, UID queries or per-packet mode checks. Enabled sessions bound new admissions to 64 and ownership JNI calls to 8 across active and retiring sessions; overload fails closed. UDP numeric endpoint strings are prepared once per flow. The Echo filter reads only short headers for ordinary packets, with a single bounded copy for unusually long extension chains. Strict non-DNS UDP relays close both sides on denial/error instead of retaining idle upstream associations until the 60-second timeout; existing DNS cleanup and reply peer validation are preserved.
Visibility reports the actual running level and pending reconnection as a session status, not a separate-app bypass test. EN/RU UI and standalone documentation explain TCP setup latency, UDP cost, the Standard stale-owner window, shared UID limits and the non-atomic lookup/forwarding boundary.
Validation:
bundle exec fastlane android native_tests: final full run passed, 315 tests with race detection.bundle exec fastlane android android_checks: 359 JVM/UI tests, lint, debug and unsigned release builds passed locally (arm64-v8a native AAR).bundle exec fastlane android native_fuzz: 20-second parser fuzzing passed, about 90,000 executions, including new ICMP seeds.git diff --checkpassed.One preliminary full native run observed a 5-second timeout in the unchanged MASQUE MTU-discovery test, which does not execute source validation. Later full runs after further code changes passed; the timeout cause was not established, and test timeouts/retry policy were not changed.
APK artifacts
Built from commit
88d8d8efby CI run #435.Artifacts expire after 14 days. Neither APK uses the MegaProxy release key.