Blog Privacy
How one local port gives a VPN away
In 2026 it was shown that apps can scan local proxy ports to detect and slip past a VPN. How it works, which versions, and which switch to check.

Per-app routing sends banks and shops over the local network, so they should not know about your proxy. Issue 2120 of 2026 pointed out that it is not that simple.
Per-app routing opens a separate door for some apps. But there may be a small unlocked window through which any app can feel where your exit is. This is about closing it.
Where the problem was
Besides the VPN, Hiddify opens a local proxy port for programs that only understand proxies. In older versions the port stayed open in VPN mode, without a password.
Any app on the same device could therefore:
- Try the ports of
127.0.0.1one by one. - Send a request through the one that answers.
- Read which country it came from, and with it the exit IP.
Apps excluded from the VPN could do it too, even those in Android's private space. The report says companies in Russia were told to find VPN servers this way and add them to block lists.

The default today
The maintainers replied that in the new version the port is optional in VPN mode. The 5.9 docs are more precise: it is closed in VPN mode, and those who need it turn on Keep open in VPN mode, with Require password beside it.
What to check
| Where | Advice |
|---|---|
| Settings → About | 5.9.15 or later |
| Inbound → Keep open in VPN mode | Off |
| Inbound → Require password | On, if the port must be open |
| Quick settings → Connection sharing | Off when unused; the sharing port can be scanned too |
| Service mode | In system proxy mode the port must be open; use VPN if that matters |

Not only Hiddify
Every client with an open local proxy port shares this, including the default mixed port of Clash apps. Checking the port beats changing apps.
Is it open on mine
In VPN mode, put a terminal app into the bypass list:
curl -x socks5h://127.0.0.1:12334 https://api.ipify.org
curl -x http://127.0.0.1:12334 https://api.ipify.orgThe proxy's IP means open, refused means closed. Try 12334, 2334, 7890, 10808 and 1080. On computers:
netstat -ano | findstr LISTENING | findstr 127.0.0.1
lsof -nP -iTCP -sTCP:LISTEN | grep 127.0.0.1Is a password enough
It keeps the exit secret, but the way it refuses still shows that a proxy is there. Close it if you can; a password only if you must.
Other signs
| Sign | Can it be hidden |
|---|---|
| The system reports a VPN | No |
| An adapter named tun0 | No |
| Local proxy port | Yes |
| Time zone, language, SIM country | They may not match the exit |
| DNS server | Bypassed apps use the local one |
Closing the port protects your exit IP, not the fact that you use a VPN.
Sharing is a window too
It listens on every adapter: anyone in the same Wi-Fi can use it. Off in public places, with a password at home.
Five minutes
- Version5.9.15 or later
- Service modeVPN
- Inboundkeep open = off, password = on
- Connection sharingOff when unused
- Test with the commandRefused
Other clients
Clash-type: remove mixed-port, socks-port and port or set 0, only TUN; a secret for the control port. v2rayNG: turn the local proxy off, or a random port with authentication. sing-box: no mixed inbound.
I am the only user of my phone. Does it matter?
It depends on what is installed. If you must keep an app you do not trust, spend the minute.
What breaks when the port is closed?
Only programs you pointed at 127.0.0.1 by hand, such as some download managers and developer tools.
In system proxy mode?
It needs a port. Switch to VPN mode, or use a password and accept being noticed.
iPhone?
Apps are more isolated but loopback is shared, so the same. Off by default in new versions.
On a router?
Devices can scan it: password, and only the needed subnet.

