[stealth 05/11] Add stealth direct-connection app exclusions#8783
Open
reflog wants to merge 7 commits into
Open
[stealth 05/11] Add stealth direct-connection app exclusions#8783reflog wants to merge 7 commits into
reflog wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in “stealth direct-connection apps” mode that reuses the existing split-tunneling UI to manage an Android-only, user-editable package denylist that is applied via VpnService.Builder.addDisallowedApplication, backed by shipped JSON defaults plus SharedPreferences edits.
Changes:
- Introduces
STEALTH_DIRECT_CONNECTION_APPSbuild flag in both Flutter (bool.fromEnvironment) and Android (BuildConfigfield parsed from Flutter dart-defines / env / Gradle properties). - Adds default exclusions asset (
assets/stealth/default_exclusions.json) and a Dart test to validate schema/package-name correctness. - Adds Android storage + builder-application logic, and routes split-tunnel method-channel operations to the new store when the flag is enabled (package-name filter type).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/features/split_tunneling/default_exclusions_asset_test.dart | Validates the shipped stealth default exclusions JSON structure and package-name validity. |
| pubspec.yaml | Ensures stealth assets directory is bundled. |
| lib/features/split_tunneling/split_tunneling.dart | Adds stealth UI mode that rewords/hides split-tunnel elements (websites hidden, apps wording made neutral). |
| lib/features/split_tunneling/apps_split_tunneling.dart | Rewords titles/section label for stealth direct-connection mode. |
| lib/core/common/app_build_info.dart | Adds compile-time flag stealthDirectConnectionApps. |
| docs/stealth-direct-connection-apps.md | Documents behavior, build inputs, and default asset update workflow. |
| assets/stealth/default_exclusions.json | Ships the initial default disallowed package list with metadata. |
| assets/locales/en.po | Adds new English strings for stealth direct-connection wording. |
| android/app/src/main/kotlin/org/getlantern/lantern/stealth/DirectConnectionAppExclusionStore.kt | Implements defaults loading, user edits storage, and applying exclusions to VpnService.Builder. |
| android/app/src/main/kotlin/org/getlantern/lantern/stealth/DirectConnectionAppExclusions.kt | Parses defaults JSON and computes effective package sets with validation/normalization. |
| android/app/src/main/kotlin/org/getlantern/lantern/service/LanternVpnService.kt | Applies configured direct-connection exclusions during tunnel build. |
| android/app/src/main/kotlin/org/getlantern/lantern/handler/MethodHandler.kt | Routes split-tunnel add/remove/get calls to the new exclusion store in stealth mode. |
| android/app/build.gradle | Adds parsing for Flutter dart-defines and emits BuildConfig.STEALTH_DIRECT_CONNECTION_APPS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
11 tasks
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
STEALTH_DIRECT_CONNECTION_APPSbuild flag shared by Flutter and AndroidVpnService.Builder.addDisallowedApplicationon each tunnel startCloses #8767
Validation
dart format --set-exit-if-changed lib/core/common/app_build_info.dart lib/features/split_tunneling/apps_split_tunneling.dart lib/features/split_tunneling/split_tunneling.dart test/features/split_tunneling/default_exclusions_asset_test.dartpython3JSON/schema validation forassets/stealth/default_exclusions.jsondart test test/features/split_tunneling/default_exclusions_asset_test.dartpassed after allowing SDK cache writes; local resolver lockfile churn was revertedgit diff --cached --checkNot run
gradle.flutter testbundle path: local checkout has noapp.env, so Flutter asset bundling fails before reaching this asset.