Skip to content

fix: apply BLOCKED_APPS to VpnService builder in Android SS/Xray mode#18

Merged
the-thirteenth-fox merged 1 commit into
XIIIFOX:mainfrom
AbdulManan-official:main
Jul 19, 2026
Merged

fix: apply BLOCKED_APPS to VpnService builder in Android SS/Xray mode#18
the-thirteenth-fox merged 1 commit into
XIIIFOX:mainfrom
AbdulManan-official:main

Conversation

@AbdulManan-official

Copy link
Copy Markdown
Contributor

The Android VpnService setup in XrayVPNService.kt only excluded the
app's own package from the VPN tunnel via addDisallowedApplication(packageName).
The BLOCKED_APPS list passed from Dart (via startVless's blockedApps param)
was received into XrayConfig but never actually applied to the VpnService.Builder.

This meant per-app VPN exclusion (split tunneling) silently did nothing in
VPN mode when using Shadowsocks/Xray-based configs, even though the same
feature worked correctly for other connection types.

Fix: loop through config.BLOCKED_APPS and call addDisallowedApplication()
for each package, same as already done for the app's own package.

Tested on a real Android device — confirmed apps added to blockedApps now
correctly bypass the VPN tunnel while others remain protected.

@the-thirteenth-fox

Copy link
Copy Markdown
Contributor

Thanks. Tested on an Android emulator (API 37) with two working Xray/VLESS configurations. All works.

@the-thirteenth-fox
the-thirteenth-fox merged commit 738e866 into XIIIFOX:main Jul 19, 2026
4 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