Android work profile closes real-IP leak that Happ and v2rayNG don't catch
Popular Android clients Happ and v2rayNG silently send requests from your real IP, meaning your home address, when they crash. Anthropic bans accounts over regional restrictions without refunding the $200. Android doesn't let you combine split tunneling with system Lockdown: either banking apps break, or there's no protection. The Pocket Android project moves Claude and ChatGPT into a work profile where Lockdown blocks 100% of traffic outside the proxy. Check your setup with the force-stop command.
AI-processed from Habr AI; edited by Hamidun News
Happ and v2rayNG are popular Android client apps for VPNs and proxies. Their main feature is split tunneling: you mark which apps go to the internet through your server and which connect directly. The problem is that when such a client fails, requests from the marked apps silently leave with your real IP, meaning the address of your home Wi-Fi or mobile carrier.
For most services, that's minor. For Claude, it isn't: under Anthropic's rules, as the author of the Habr analysis describes, an account blocked for violating regional restrictions is not eligible for a refund. A $200 Max subscription burns in that case.
The author proposes closing the leak not with yet another list of exceptions, but with the work profile built into Android: a separate isolated space on the phone where only the needed apps run.
Disclaimer: this is material from a developer's personal blog, and the author tested the conclusions on his own devices. Bypassing regional restrictions may violate service terms. But the engineering part is useful for anyone configuring a VPN on Android.
Why split tunneling and a kill switch don't coexist on Android
In the phone's main profile (user 0), split tunneling is implemented through VpnService.Builder: the client passes the system a list of apps that either go through the tunnel or bypass it. The only real kill switch in Android is the system Lockdown mode, "Block connections without VPN." It drops any packet that travels outside the tun0 interface. Exceptions to Lockdown can be set only through DevicePolicyManager.setAlwaysOnVpnPackage, and that method is available to the device owner or the work profile owner. Ordinary VPN clients aren't granted those rights.
This leaves a dilemma. Turn on Lockdown alongside split tunneling, and banks, taxi apps and marketplaces on the exception list lose network access. Turn it off, and the phone runs in fail-open mode: if the tunnel drops, packets go out directly.
The check takes ten seconds. Open an app from the proxy list, stop the client with adb shell am force-stop, and the next request leaves with your real IP. You don't need to reboot the phone to trigger the leak: the client can be killed by the LMKD system daemon when memory runs low (HyperOS, ColorOS and EMUI also have their own background-process killers). The tunnel also restarts during automatic subscription updates and when switching from Wi-Fi to LTE. After a reboot, according to the author, the ACTION_BOOT_COMPLETED broadcast arrives with a 15–40 second delay, and apps manage to go out directly in that window.
Why the alternatives also leak
The option of "whole phone through the tunnel, with Russian domains set to direct via Xray or sing-box rules" runs into three problems. First, mobile clients don't connect to a single address: they simultaneously reach Cloudflare captcha, OAuth, Stripe, analytics services and CDNs. If the domain database goes stale or a new subdomain appears, some requests leave with your home IP.
For anti-fraud systems, a session from two countries looks more suspicious than a regular visit without a proxy. Second, if the entire profile is wrapped in tun0, banks see the TRANSPORT_VPN flag, and payments hang. Third, constant keepalive timers keep the device from sleeping properly in Doze mode.
The author measured the battery drain on a single phone. That's a household measurement, not a lab test.
A scheme with your own VPS, AdGuard DNS and an SNI proxy works well for a router, TV or laptop, but it breaks on a smartphone. An SNI proxy works over TCP, while mobile apps actively use QUIC over UDP 443. The ECH technology encrypts the hostname, and routing by SNI stops working. Apps and carriers often ignore custom DNS. Open SNI proxies get found by scanners in about half an hour; they have to be locked down with an IP allowlist, and a phone's address keeps changing.
The work profile: isolation instead of lists
In Pocket Android, the author combined the open-source Shelter with Xray-core (the source code and ready-made APKs are on GitHub). The system creates a separate user, user 10, next to user 0, with its own data directory, cookies and network visibility. Only Claude, ChatGPT and a browser are cloned into it. Pocket runs as Profile Owner and enables Always-on VPN with Lockdown only on user 10. The main profile has no VPN at all, so banks and government services work as usual.
Inside the work profile there are no allowlists: 100% of traffic, including TCP, UDP, QUIC, DNS and IPv6, either goes through the proxy or is blocked by the firewall. Until the tunnel comes up, the profile has no internet at all, so a leak at startup or when the client crashes is ruled out. The bonus is clean cookies, a separate Google account, and the ability to run two copies of the same app on different servers. Pocket won't offer a "whole phone through the tunnel" mode: according to the author, it would bring back the same banking and leak problems.
Limitations
There's no magical invisibility. No separate Linux network namespaces are created, so tun0 is visible in /proc/net/route to a low-level scanner, though a regular check via ConnectivityManager from user 0 doesn't see it. GPS, SIM data, the system language and the time zone remain unchanged. Lockdown won't affect the reputation of the IP itself: an inexpensive datacenter address can be flagged by anti-fraud systems regardless of the phone's settings.
Practical takeaway: if your kill switch doesn't survive a force-stop of the client, it isn't a kill switch. Test your setup this way before trusting it with a paid account.
- Nov 22, 2026Anthropic Goes Public on Nasdaq: Shares Rise from $83 to $111, but Can Safety Hold Up?
- Nov 22, 2026Databricks Is in Talks for a Round at a $225 Billion Valuation, Nearly 20% Above August
- Nov 21, 2026Anthropic and Claude Claim Proof of the Riemann Hypothesis, Stanford Responds Without AI
- Nov 21, 2026Karpathy-Inspired Four Rules for a Coding Agent in One File Gather 232,000 GitHub Stars
Key Questions Answered
Why split tunneling and a kill switch don't coexist on Android?
In the phone's main profile (user 0), split tunneling is implemented through VpnService.Builder: the client passes the system a list of apps that either go through the tunnel or bypass it. The only real kill switch in Android is the system Lockdown mode, "Block connections without VPN." It drops any packet that travels outside the tun0 interface. Exceptions to Lockdown can be set only through DevicePolicyManager.setAlwaysOnVpnPackage, and that method is available to the device owner or the work profile owner.
Why the alternatives also leak?
The option of "whole phone through the tunnel, with Russian domains set to direct via Xray or sing-box rules" runs into three problems. First, mobile clients don't connect to a single address: they simultaneously reach Cloudflare captcha, OAuth, Stripe, analytics services and CDNs. If the domain database goes stale or a new subdomain appears, some requests leave with your home IP. For anti-fraud systems, a session from two countries looks more suspicious than a regular visit without a proxy.
What are the key details on The work profile: isolation instead of lists?
In Pocket Android, the author combined the open-source Shelter with Xray-core (the source code and ready-made APKs are on GitHub). The system creates a separate user, user 10, next to user 0, with its own data directory, cookies and network visibility. Only Claude, ChatGPT and a browser are cloned into it. Pocket runs as Profile Owner and enables Always-on VPN with Lockdown only on user 10. The main profile has no VPN at all, so banks and government services work as usual.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.