mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-10-15 05:42:07 +00:00
[GH-ISSUE #2457] [Android] [Critical] Per-app split tunneling bypass for AmneziaWG 2.0 allows blacklisted apps to see the ip address of the VPN. #1093
Open
opened 2026-10-13 20:34:06 +00:00 by bsakaguchi
·
19 comments
No Branch/Tag specified
dev
feat/otp-login
feat/api-tests
fix/show-locked-xray-settings-page-for-servers-without-write-access
fix/serialize-log-record-writes-and-pin-log-date-format-locale
fix/libagw-review-fixes
fix/ios-xray-ipv6-leak
fix/macos-xray-ipv6-leak
feat/add-support-include-split-tunnel
fix/win-xray-app-split-tunneling
fix/bug-when-saving-after-canceling
fix/xray-reconnect-crash
fix/share-empty-config-on-ssh-timeout
fix/ssh-credentials-input
fix/updater-verify-signature
fix/async-ssh-threading
fix/xray-check-inet-and-liveness-monitor
fix/selfhosted-server-installations
feat/add-support-ikev2-macos
fix/icons-different-color-themes
feat/add_support_arm_windows
feat/add-deep-link
feat/fixed-push-notifications-on-VPN-connect-disconnect-2
feat/implement-QR-code-generation-and-scanning
feat/file-password-protection
feature/add-local-proxy
feat/add-support-split-tunnel-macos
feat/tests
fix/android-register-unacknowledged-purchase
fix/share_on_linux
mirroring-to-outside
feat_copy_docker_configs
feat/self-diagnostics-log
feat/amnezia-free-vless-switch
fix/conan_build_android_on_win
fix/linux-reconnect-dns-reliability
fix/windows-connection-stability
fix/linux-reconnect-refactoring
fix/ios-groupidentifier-order
feat/xray-subscription-link
fix/minor-fixes
fix/xray-config-inplace-edit
feat/amnezia-sdk-typed-api
feat/amnezia-sdk-integration
feat/force-update-native
refactor/marketplace-update-popup
feat/force-update
fix/valnurability_dev
chore-xcode-version
fix/empty-i1-i5
build_qt_6_10_1
master
feat/protocol-selection
fix/openvpn_install
feat/locations_change
feat/locations_change_rework
feature/local-proxy-integration
fix/filepicker_atv
fix_valnurability
fix/macos-ne-codesign-4.8.19.0
temp-branch-for-testing
fix/rebased_4_8_19_linux_fix_error
feat/proxy-storage-cache
fix/zeroed-params
fix/killswitch-blocknets-linux
update/translation_RU
fix/self_hosted_reinstall_error
feat/selfhosted-dns
fix/agp_version_up
feat/switch_to_alive_protocol
feat/support_multipeer
server_scripts_update
fix/extended-vless-configuration
chore/apple-ci-cd-macos-versions
feat/add-telemt
fix/android_keystore_read_error
feat/add-mtproxy
chore/bump-qt-version
fix/make_dbus_async
feature/dns
rebase/apple-tv-target-on-conan
fix/outbound_freedom_xray_with_dns_fix
feat/apk_support
feat/fallback-proxy
feat/apple-tv-target
fix/dns_reconnection_issue
feat/fixed-push-notifications-on-VPN-connect-disconnect
fix/linux-firewall
docker-regional-locks
appstore-review-popup
feat/storekit2
fix/uninstall-split-tunnelling-driver
revert-2376-chore/license-file
support_16kb_android
bump_version
feat_add_review_android
bugfix/translation-absence-on-subscription-key-page
feat/location-separation-by-region
bugfix/text-moving-when-resing-window
fix_backup
feature/add-purchase-android
bugfix/moved-text-while-resizing-window
bugfix/incorrect-killswitch-restore-from-backup
fix/backup-exclude-secondary-api-configs
feat/proxy-fields-for-dev-console
bugfix/ovpn-ios-fix
bugfix/linux-bundle-libraries
fix/xray-app-split-win
fix/upload-to-s3
chore/add-release-date-upload
feat_add_webview_support
feature/configuration-transfer-through-qr
feat/bot-key-unlink-device
fix/ad-link-lang-support
fix/qsecuresettings-with-android
feat/add-support-arm64-win
spanish-translations
fix/context-menu
feat/add-system-dns-support
fix/qt6-9-support
fix/qt6_9_support
bugfix/strict-killswitch-ui
android-7
chore/minor-bugfixes
feature/awg-net-fix-macos-wakeup
fixbug/ios18
bugfix/ios-ne-crash
fix/linux-tray-quit-button
cryptpad-support
bugfix/disable-linux-killswitch
fix/minor-ui-fixes
feature/setup-guid-tun2socks
feature/linux-ipsec
feature/ipsec-linux
refactoring/server-config-in-classes
feature/macos-ipsec
fix/ui-fixes-after-merge-with-d20ed4a
chore/focus_control_after_qt_6.9_migration
feature/integrate-xray-as-a-library
maxos-awg-fix
feature/add-new-awg-docker-image
chore/update-3rd-prebuild
feature/test-news
fix/api-conf-files
bugfix/split-tunneling-with-api-config
bugfix/ios-awg-new-fields
feature/special-handshake-2
feat/xray-api-support
fix/desktop-entry
bugfix/shadowsocks-cipher-setting-not-changing
feature/update-tap
bugfix/openvpn_import_fix
feature/ability-to-change-port-after-installing-xray
bugfix/strict-mode-ovpn
bugfix/win-ipv6-ovpn
bugfix/subnet-adress-setting
exception-podman-docker
bugfix/fix-listviewtype-scrolling
bugfix/win-disabled-ipv6
bugfix/win-ipv6-disabled-ovpn
feature/killswitch-strict-mode
feature/awg-network-check
feature/empty-split-tunneling-list
feature/support-info
chore/update-go-version
checking-Linux-version
update_server_scripts
bugfix/button-selection-easy-setup-page
feature/old-api-proxy
patch/user-checking
fix/correcting-version
support-podman
support_podman
user-checking-patch
feature/check-docker-version
feature/allowed-dns-list
without_lsof
chore/error-body
Update-amneziavpn_ru_RU
shiroow-patch-8
shiroow-patch-7
shiroow-patch-6
shiroow-patch-5
shiroow-patch-4
shiroow-patch-3
shiroow-patch-2
shiroow-patch-1
check_sudo_permissions
feature/euphoria
add_next_octet_to_ip_settings
bugfix/mobile-controllers-init
euphoria
bugfix/android-crush
feature/macox-network-extension
bugfix/pre-release-hotfixes
bugfix/ipsec-pfs
chore/ios-site-links
checking_sudo_permissions
feature/android-tv
improve_navigation_cpp
bugfix/linux-firewall-install
fixbug/wireguard-handshake-time
ReadmeRu_full
feature/xray-user-management
feature/subscription-end-date
chore/clang-format
feature/ru-in-readme
chore/increased-api-timeout
chore/deploy-workflow
bugfix/services-list-scroll
wheel_group_suppor
chore/bump-xcode-version
fixbug/mac-network-extension
feature/android-gpb
feature/page-home-drawer-country-selection
checking-sudo-users
bugfix/service-info-from-response
fixbug/build-macos-ne-2
android-qt-6.7.3
fixbug/build-macos-ne
bugfix/wg-windows-log-folder
feature/psk-key-api-request
bugfix/user-management-qml-warnings
fix/macos-network-extension
fixbug/macos-NE-build
bugfix/fixed-isDevEnv-initialization
bugfix/revert-ios-ovpn
feature/tun2socksSrv
fix/disable_singleapp
feature/awg-wg-name-resolving
feature/disable-dhcp
bugfix/allowed-ips-old-configs
feature/goodbyedpi
feature/add-exception-log
refactoring/remove-ipv6-from-default-routes
refactoring/singleapplication-submodule
macos-dirty-build
test/gateway
Update-amneziavpn_fa_IR.ts
bugfix/ipsec-win
fix/xray-custom-port
improve-tab-navigation
test-win-11
feature/android-tv-remote-control-support
KsZnak-patch-1
feature/awg-wg-qr
bugfix/fix-loopback-splittunel
fix/setup_host_firewall
feature/android-xray
feature/openvpn-pass
feature/connection-string
fix/clickable-errors
bugfix/api_1100_fix
feature/graphview
testsvg
feature/update-win-awg
feature/open-as-amnezia
feature/update-mozilla-upstream
bugfix/qr-code-cutting
feature/native-wg-psk
test/awg-centos
bugfix/hide_error
feature/add-uninstaller-checkbox
bugfix/cancel-button-on-install-page
bugfix/anchors-page-home-warning
awg-udptlspipe
button-focus-fix
revert-677-fix/logger
bugfix/Revert_PR_596
bugfix/allowed-ips-api-configs
bugfix/on-escape-pressed
feature/auto-scroll-for-server-selection-list
fix/ui-fixes
translations/update_fa_IR.ts
feature/new-awg-docker-container
bugfix/awg_ipv6_fix
feature/tab-navigation
fix/username-no-autocapitalization
sure
refactoring/servers-model-cleanup
feature/wg-mtu-setup-ios
3rd_adaptation_to_diff_OS
sudo_not_found
test/docker-ce
bugfix/double_clear_server_from_amnezia
fix/android
client/3rd-prebuilt
revert-559-KsZnak-translation-ru-ex
KsZnak-translation-ru-ex
KsZnak-br1
KsZnak-text-change
feature/api-awg
feature/error-code-output
feature/win_x32_builds
text/debug-output
feature/ovpn3-desktop-cli
bugfix/secureqsettings-deadlock
refactoring/change-settings-when-connected
files_check
ArchLinux-support
second_adaptation_to_diff_os
sudo
refactoring/android-build
adaptation_to_different_os
feature/online_installer_for_v4
update_to_r2
bugfix/return-after-installation
feature/custom_drawer_component
bugfix/split-tunneling
bugfix/existing-awg-container
revert-370-feature/custom_drawer_component
bugfix/adapted_awg_questiondrawer
bugfix/updated_drawer_height_pageserverdata
bugfix/translated_new_source_strings_to_chinese
feature/split-tunneling-config
feature/accessibility-support
branch_connectivity_change_fix
feature/ikev2_android
android_ss_transport
bugfix/macos_fixes
feature/nextcloud-support
feature/macos_network_extension
android_pt_transport_source
feature/ios-openvpn3-pluggable-transport-Cloak
bugfix/cloak_for_desktops_fix
arm-build-macos
fix-macos-build-brew
bugfix/ios-build-openvpnadapter-from-source
feature/download-native-wireguard-config-on-connect
feature/v2ray-container
bugfix/dpkg-busy-checking-stuck
feature/online-installer
dev-killswitch
dev-netadapters
5.0.3.0
5.0.2.1
5.0.2.0
5.0.1.5
5.0.0.5
5.0.0.2
4.8.21.0
4.8.19.0
4.8.18.0
4.8.17.0
4.8.16.0
4.8.15.4
4.8.15.0
4.8.14.5
4.8.14.1
4.8.12.9
4.8.12.8
4.8.12.7
4.8.12.6
4.8.11.4
4.8.11.3
4.8.11.2
4.8.11.1
4.8.11.0
4.8.10.0
4.8.9.2
4.8.9.1
4.8.9.0
4.8.8.3
4.8.8.2
4.8.8.1
4.8.7.2
4.8.7.1
4.8.7.0
4.8.6.0
4.8.5.0
4.8.4.5
4.8.4.4
4.8.4.3
4.8.4.2
4.8.4.1
4.8.4.0
4.8.3.2
4.8.3.1
4.8.2.3
4.8.1.9
4.8.1.0
4.8.0.5
4.7.0.0
4.6.0.3
4.6.0.1
4.5.3.0
4.5.0.0
4.4.0.0
4.3.0.0
4.2.1.0
4.2.0.1
4.1.2.0_cloak_pt_experimental
4.1.0.1
4.0.8
3.1.0
3.0.8
3.0.7
3.0.5
2.1.2
2.1.0
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.1
2.0
1.9.1
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1.0
No labels
pull-request
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amnezia-client#1093
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @R4L34 on GitHub (Apr 9, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2457
Summary
It was mentioned in the previous commit but the person responsible for fixing it did it only for XRay so I feel obligated to mention it again. You can get the ip of the VPN server by explicitly going through the tun0 interface. Like this (in Termux).
curl -s https://ifconfig.me/ip --interface tun0That will allow any spyware (which now includes every russian big-tech app) to not only get the fact that you use a VPN but also get the ip address of the server. Then they can log it, and later block it.
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Applications excluded from VPN routing should not be able to send traffic through the VPN tunnel via a localhost proxy, unless this behavior is explicitly documented and user-controlled. If a local listener is required for internal purposes, access should be restricted to the app's own components.
Security Impact
If the proxy accepts unauthenticated connections and forwards traffic through the VPN tunnel:
User-configured per-app routing policies can be bypassed by any app with INTERNET permission.
Traffic that the user explicitly intended to route directly may leak through the VPN (or vice versa).
The presence of an open, unauthenticated localhost proxy may serve as a detectable signal of VPN usage to monitoring applications.
Operational relevance
In environments where applications or platforms monitor network behavior for signs of VPN usage, this issue may increase the detectability of VPN use. Because an app excluded from VPN routing can still access the VPN tunnel via localhost, it can both infer that the VPN is active and send probe traffic through the tunnel. This may also aid enumeration of VPN egress IPs and contribute to blocking of VPN endpoints. This consideration is particularly relevant given recent reports of app-level VPN detection guidelines being distributed to IT platforms [1][2].
Suggested Mitigations
The same that solved SOCKS5 leak (will be solved if someone merges this pull request).
I repeat that this vulnerability while not as critical poses a significant threat to the VPN's hosted on private servers which were mostly immune to the direct ip blocking from Russian censors.
@theagrik commented on GitHub (Apr 9, 2026):
couldn't reproduce on POCO M4 Pro 5G, Android 13, app version 4.8.14.5 and with Termux excluded. tested on AmneziaWG Legacy, AmneziaWG 2.0 and plain WireGuard without obfuscation.
@uranik777 commented on GitHub (Apr 9, 2026):
I confirm the issue. I'm using a vivo x100 pro (Android 16) The "curl -s https://ifconfig.me/ip --interface tun0" command displays the VPN server's external IP in Termux app. Even though the Termux app is not included to split app tunneling whitelist.
@JinEnMok commented on GitHub (Apr 9, 2026):
Can confirm while running 4.8.14.5 on GrapheneOS with self-hosted VPN with split tunneling (allowed apps only), both AWGv2 and XRay. Recently a few apps (https://github.com/xtclovver/RKNHardering and https://github.com/loop-uh/yourvpndead) have been published that analyse the network settings and connections to simulate the kind of check the Russian authorities can perform (provided they manage to install something on your phone), and Amnezia VPN fails in at least 3 ways: exposing itself as a VPN app (can't get around that, I guess), exposing a tun interface to all apps, and exposing the socks proxy when running XRay. Needless to say, if it was a actual malevolent app running those checks, vpn users are done (and who's to say any sort of Russian app, be it a bank or a marketplace, isn't running those already). This is also tied to https://github.com/amnezia-vpn/amnezia-client/issues/2452
@SY573M404 commented on GitHub (Apr 10, 2026):
I believe there's no way to fix that. There's no such thing as "tun0 authentication" as it is just an network interface. Network interfaces don't do authentication.
The issue is with how Android manages tun0 permissions and we can (unfortunately) do nothing about it.
UPD: Oh wait, it is possible - the way SingBox does it while routing. Every Android app runs with its own (static per installation) UID and SingBox finds connection owner UID by matching source + destination
Source link
@Gerk17 commented on GitHub (Apr 10, 2026):
Just to clarify — PR #2453 only fixes the SOCKS5 inbound bypass for Xray profiles (issue #2452). It does not and cannot fix what you describe here. The two issues look similar but operate at very different layers:
#2452 was a userspace SOCKS5 listener with no auth — fixable by enabling the auth field that the protocol already supports.
#2457 is the kernel tun0 interface being directly addressable by any process via SO_BINDTODEVICE / --interface tun0. This is a known limitation of Android's VpnService API: split tunneling there controls default routing per UID, not interface visibility. There is no "authentication" for a kernel network interface — the concept doesn't exist at that layer.
Real mitigations require either root (to install per-UID iptables -m owner -o tun0 -j REJECT rules), system privileges (eBPF cgroup filters), or a different OS architecture entirely. WireGuard for Android, Mullvad and other major Android VPN clients have the same limitation, and as far as I know none of them solve it on non-rooted devices.
The most useful thing AmneziaVPN can probably do here is document this clearly in the split tunneling UI, so users understand it's a routing convenience and not a security boundary against hostile apps on the same device.
@SY573M404 commented on GitHub (Apr 11, 2026):
Well, it turned out NekoBox/SingBox actually solved the problem. But implementation is rather gimmicky
@R4L34 commented on GitHub (Apr 11, 2026):
I tested it for a while and came to the conclusion that there is one totally safe configuration in AmneziaVPN on android and it is to use the Whitelist Site based split tunneling. It is the only configuration that disallowed me to connect to the https://ifconfig.me/ip through tun0 interface when the ip was excluded (Blacklist might be fine as well because I only added ifconfig.me into it and therefore it only added ip it resolved to, if it has more then 1one ip then it wont be excluded properly, but again I'm not sure so stick to the Whitelist solution). I dont know the exact reason but I assume its because the selection on "should it go through the vpn or not" happens inside the tun0 interface. And the solution that were brought up here do exactly that but instead of IPs they use apps' UUIDs.
So (correct me if Im wrong) theoretically you could just copy and paste the site based split tunneling code and implement it with app UUIDs. Again this wont help with spyware apps finding out whether you use a VPN or not, but it will prevent them from knowing your VPN ip and compromise it later.
But for now use only Site Based Split-Tunneling in Whitelist mode. Use this website for that https://iplist.opencck.org/ru
@Fast-and-Pythonic commented on GitHub (Apr 14, 2026):
People are reporting that this issue appears starting with kernel 5.7 and newer.
https://habr.com/ru/articles/1020080/#comment_29793082
@Fast-and-Pythonic commented on GitHub (Apr 14, 2026):
I'll mention it here as well.
Amnezia wg2 4.8.14.5 also has this issue.
Poco f7
Android 16
Hyper OS 3.0.6.0
Traffic splitting is also enabled. Traffic splitting is also enabled. Termux is not included in the tunneling list. Its traffic does not go through the tunnel. However, Termux can see the server's IP address using the command curl -s https://ifconfig.me/ip --interface tun0.
@Fast-and-Pythonic commented on GitHub (Apr 14, 2026):
In this case, AmneziaVPN becomes useless for many users who need to bypass the blocks of their crazy governments. AmneziaVPN will simply lose a large portion of its users.
@MrsedD commented on GitHub (Apr 19, 2026):
if not using split tunneling bypass still it allows apps to see the ip address of the VPN.
@Gerk17 commented on GitHub (Apr 19, 2026):
Colleagues, this can't be circumvented on Android. It's a fundamental vulnerability. Any application can access tun0 directly, bypassing split tunneling. But you can configure blacklists on the server itself for all potentially spying applications—their domains (banned at the DNS level) and subnets (banned at the iptables level). Additionally, you can enable only your own AmneziaDNS and ban all DoH/DoT resolvers.
This doesn't guarantee 100% protection, as they can create an IP resolver on an unknown server and access it. However, most requests for your server's IP will still be banned.
Another, more reliable option is to configure whitelists on the server if you need a clearly defined, limited set of resources via VPN.
@atchekho commented on GitHub (Jun 7, 2026):
One way of hiding the server IP address is to add an extra hop using WireGuard: this way the IP address seen by all apps going through the VPN would be the IP of the extra hop server and not the IP of your VPN server.
The example WireGuard config files route the Amnezia VPN traffic (both for AWG and Xray protocols) through the "extra hop" server (and leaves the rest of the traffic routing unchanged).
This configuration uses a tunnel between the Amnezia server and an "extra hop" WireGuard server. Note that this assumes that:
Amnezia VPN server:
8080.443.192.168.86.2/32.192.168.86.1/32.ens0.amn0.WireGuard tunnel:
10.77.77.0/29internal IP block10.77.77.1/2910.77.77.2/29Extra hop WireGuard server:
ens3Contents of
/etc/wireguard/exit-hop.confon the Amnezia VPN server:Contents of
/etc/wireguard/wg0.confon the "extra hop" WireGuard server:@makekryl commented on GitHub (Aug 10, 2026):
I took the liberty of trying to mitigate this; the https://github.com/amnezia-vpn/amneziawg-go/pull/174 along with the patch for the AWG client make things work (with certain limitations, of course - the necessity of dropping unidentifiable packets)
@Fast-and-Pythonic commented on GitHub (Sep 22, 2026):
I've put together a complete fix for this on AmneziaWG and WireGuard, measured on a device, as three PRs:
ConnectivityManager.getConnectionOwnerUidwho owns a connectionOn a Poco F7 (Android 16) with an AmneziaWG server (protocol 3.1), the probes from an excluded app gave 0 of 6 with the setting on and 6 of 6 with it off. They covered
curl --interface tun0, TCP and UDP withSO_BINDTODEVICE, and ICMP. Both include and exclude mode were tested.The setting, on an English build:
Some findings may save time whoever implements this, whichever code ends up merged:
tun0and ping a host it controls. The owner of an ICMP packet cannot be resolved, so a filter has to drop what it cannot attribute. @makekryl's #174 (amneziawg-go) already does this, and that is how I noticed my first version let ping through.getConnectionOwnerUidreturnsINVALID_UIDfor any app not covered by your own VPN, not only when no socket matches. That is AOSP'sConnectivityService. So "unresolved" is exactly the excluded app, and denying it is correct rather than a fallback.close(), the lookup reports UID 0. If a filter re-judges packets after its cache expires, it drops the FIN of legitimate connections in include mode. Deciding TCP on SYN only avoids that.whoami.cloudflareviatun0.A test build with all three parts, signed with my own key, is here if you want to check it on your own device: https://github.com/amnezia-tun0-fix/amnezia-client/releases/tag/v5.0.3.1-strict.7 — it installs next to the official app, as «AmneziaVPN Strict»; the notes there say what else to know.
The notes behind all this, with the probes: https://github.com/amnezia-tun0-fix/strict-split-tunneling-notes
The Xray datapath has an implementation in my forks as well: tun2socks, libxray and
Xray.kt, linked in the client PR. I could not test it, because Xray does not connect from where I am.🤖 Generated with Claude Code
@Fast-and-Pythonic commented on GitHub (Sep 23, 2026):
Update: a second test build, v5.0.3.1-strict.2.
strict.1 had a bug in "only the apps from the list" mode: cloned apps (dual apps, a second space, a work profile) could not connect at all with the switch on. Android routes every copy of a listed app into the VPN, each under its own uid, and the check recognised only the original. It now matches apps the way Android does. Verified on XSpace clones of two browsers; bypass attempts from an unlisted app stay at 0 of 6.
If you run strict.1, install strict.2 over it: same key, nothing to back up. The fix is also in amnezia-vpn/amnezia-client#3199.
🤖 Generated with Claude Code
@Fast-and-Pythonic commented on GitHub (Sep 25, 2026):
Update: a third test build, v5.0.3.1-strict.3, after two reviews of the PRs by @izhddm.
strict.2 had two problems, both fixed here:
The second fix, a verdict keyed on the full connection, is what @makekryl's amneziawg-go#174 did from the start. So is filter state kept per device, which this build also adopts.
Bypass attempts from an app outside the VPN stay at 0 of 6. The review also turned up two limits, listed in the release notes and in amnezia-vpn/amnezia-client#3199. First, an allowed app loses TCP connections it binds to
tun0itself. Second, a UDP packet from a socket closed right after sending may be dropped.If you run strict.1 or strict.2, install strict.3 over it: same key, nothing to back up.
Separately, @izhddm found that on Android 13+ the Xray tunnel publishes the server's address in the VPN's routes, readable by any app without sending a packet. The fix is in amnezia-vpn/amnezia-client#3214. AmneziaWG does not publish it.
🤖 Generated with Claude Code
@Fast-and-Pythonic commented on GitHub (Sep 27, 2026):
For anyone comparing approaches: how other clients handle the two leaks discussed around this issue, as of September 2026. Where only a project's own description was available, that is said.
Two different leaks. The first is a local SOCKS/HTTP inbound on
127.0.0.1without authentication, which any app on the device can use (Habr, 2026-04-07, eight Xray/sing-box clients named). Amnezia closed it in #2456 with a random port and password. The second is the one this issue is about: an app excluded from the VPN binds a socket totun0(SO_BINDTODEVICE, allowed without privileges since Linux 5.7) and reaches the tunnel anyway. Fixing the first does not touch the second.The
tun0leak, elsewhere:getConnectionOwnerUidper flow, RST for denied TCP (Habr, May 2026).getConnectionOwnerUidon Android 10+, answering denied flows with TCP RST or ICMP port unreachable. We have not read its code.package_name_regexrule item after SagerNet/sing-box#4009 (6746fcb). A flow whose owner cannot be resolved can then be blocked by a hand-written rule,{"package_name_regex": [".*"], "invert": true, "outbound": "block"}. It is not a default, and we found no switch for it in the Android app.curl --interface tun0from an excluded app and was closed as not planned.We found nothing on it from WireGuard for Android, Mullvad, Proton VPN, Tailscale, Cloudflare WARP, Outline, Orbot or OpenVPN for Android, and no AOSP bug, CVE or security bulletin. The per-app VPN settings screen in Android 17 changes the UI, not the routing.
The local-proxy leak, elsewhere: inbound authentication, or a way to switch the inbound off, shipped in Karing 1.2.16, Throne 1.1.2, FlClash 0.8.97 and Exclave 0.17.35, among others; in most of them it is opt-in. hiddify/hiddify-app#2120 was closed as not planned.
What does not help: a work profile (Shelter, Island). Android's users share one network namespace, so
tun0is visible from inside the profile, and RKNHardering detects it there (Habr, 2026-04-22).If we missed a project or got one wrong, corrections are welcome.
🤖 Generated with Claude Code
@Fast-and-Pythonic commented on GitHub (Sep 30, 2026):
Update: a new test build, v5.0.3.1-strict.7. The number matches the AmneziaWG library inside; strict.4–6 were internal and never published.
It now installs next to the official app, as «AmneziaVPN Strict», so trying it no longer means removing AmneziaVPN and its configurations.
If you run strict.3, please move to this one. Its VPN service could crash on a disconnect, a reconnect or a network switch: a bug we introduced when moving the owner lookup off the tunnel reader. The worker threads were locked to OS threads, and a locked thread exits with every signal blocked while the JNI bridge detaches it from the JVM. On a test phone that killed the service about once in 60–100 filter swaps under load, with no crash report left behind. Fixed in this build: none in 300.
Also measured on the phone and fixed:
Two more fixes are in this build but on separate branches rather than in amnezia-vpn/amneziawg-go#199: connections coming in through the tunnel to a listed app, and UDP datagrams larger than the MTU. The PR description lists them with the numbers.
Bypass attempts from an app outside the VPN stay at 0 of 6, with all of this on. strict.1–3 took the official app's place, so this build appears next to them: move your configuration by backup and remove the old one.
🤖 Generated with Claude Code