VPNs and proxies
Your public IP and VPN route, proxy apps, the VPN kill switch and the leak test.
VPN and public IP
Health › Where traffic leaves, the Wi-Fi menu and kilobat ip show the interface the default route uses and whether that's a VPN, read from this Mac's routes and the VPNs macOS lists as connected. A VPN that's connected while the default route stays on Wi-Fi, such as Tailscale without an exit node, shows as Split: only some destinations go through it. Turn on Settings › Network › Look up public IP to also see the address websites see, asked from Cloudflare on network changes and every 30 minutes, with the country it is registered to from the DB-IP data bundled with Kilobat. It is off by default, since Cloudflare sees that request; kilobat ip --public asks once. The registry country isn't where you or a server are, and neither it nor a VPN shows that a connection is private or anonymous. Settings › Menu bar › VPN adds On, Split or Off (with the country code when the lookup is on) next to the bat, and History lists when a VPN went on or off and when the public IP changed.
Proxies and VPNs
Kilobat works alongside proxy apps (Clash Verge, ClashX, mihomo, Mihomo Party, FlClash, Surge, sing-box, Stash, V2Ray, Xray, Shadowsocks) and VPNs. It only reads them; it never routes traffic or changes their settings.
- Traffic counts for the right app. An app that sends through a local proxy is charged for its own traffic, and the proxy core or VPN tunnel that forwards it is labelled “Carries other apps’ traffic” instead of being counted twice.
- Which route each app took. With a Clash-compatible API (Clash Verge, ClashX, mihomo, Mihomo Party, FlClash, sing-box’s clash_api), an app’s row shows the node it went through, such as “via HK-01 · 2 direct”, and its tooltip lists each host, node and rule. Kilobat reads the API address and secret from the app’s own config, and never shows the secret.
- Problems, in Health’s Where traffic leaves:
- a system proxy that points at an app that isn’t running, which breaks every browser;
- DNS or IPv6 that skip the VPN;
- a proxy and a VPN both taking traffic;
- global mode;
- blocking that can’t see apps behind a system proxy. macOS filters never see connections to 127.0.0.1, so turn on the proxy’s TUN mode, or block the app in the proxy’s rules.
- Why can’t it connect? adds a Proxy app layer with the proxy’s mode and how fast its current nodes answer, and says when a dead node is the problem.
In the terminal: kilobat proxy, kilobat proxy routes --app Telegram, kilobat proxy test and kilobat vpn. For a core Kilobat doesn’t find on its own, pass --controller 127.0.0.1:9090 --secret …. Agents get the same through get_proxy_status, test_proxy_nodes and check_vpn.
VPN kill switch
With Pro and the network filter on, turn on VPN kill switch in Settings › Network. If your VPN drops, Kilobat blocks new connections until it’s back, so nothing goes out over the café or hotel Wi-Fi in the meantime. The popover and the dashboard say Blocked: VPN is down, the menu bar bat gets a lock, and a notification offers Allow for 5 Minutes.
- It arms once your VPN is up. The kill switch waits until your VPN has carried all traffic once since the Mac started, so turning it on without a VPN never cuts you off. From then until a restart it blocks whenever the VPN is down, on every network, because the moment you join a new network is when apps would leak. A split VPN that carries only some destinations counts as down.
- What still connects: your VPN app, its helpers and network extension (WireGuard, Tailscale, Mullvad, NordVPN, Proton VPN, ExpressVPN, Surfshark, Cisco Secure Client, GlobalProtect, OpenVPN Connect, Tunnelblick and others, plus any VPN app macOS has a configuration for), Apple’s networking services (DNS, DHCP, certificate checks, the network login window, built-in VPNs), Kilobat, and the local network unless you turn that off. Everything else waits, whatever its rules or profile, Unrestricted included.
- The way out. Allow for 5 Minutes in the banner, the notification or the menu bar’s right-click menu lets everything through, for a network login page or a quick check, and blocks again if the VPN is still down. Turn Off sits beside it, and in Settings.
What it can’t do: the filter only sees new connections, so ones already open when the VPN dropped keep going, though most die with the tunnel they used. DNS lookups still go out so the VPN can find its server. If Kilobat quits, the filter keeps the last state it was given, and still blocks when the VPN’s tunnel interface disappears; open Kilobat to allow traffic or turn it off. In the terminal: kilobat settings kill-switch on, and kilobat vpn or kilobat conditions show its state; agents read it in check_vpn and get_conditions, and set_kill_switch asks you first.
VPN leak test
With your VPN on, click Check for Leaks in Health › Where traffic leaves or in Settings › Network. In about ten seconds Kilobat checks three ways traffic can go around a VPN and says pass or fail for each, with the setting that fixes it, named as your VPN app names it where Kilobat knows (Mullvad, NordVPN, Proton VPN, ExpressVPN, Tailscale, WireGuard; for Cisco, GlobalProtect and other work VPNs, what to ask IT).
- DNS. The resolvers macOS uses for ordinary lookups, and the route to each: one reached over Wi-Fi or Ethernet instead of the tunnel leaks every name you look up. Kilobat also looks up a few made-up names through bash.ws, which reports the resolvers that asked; one that is neither your VPN’s nor a public DNS service such as Cloudflare or Google is likely your internet provider’s.
- IPv6. A VPN that carries only IPv4 while the Mac has an IPv6 route over Wi-Fi sends IPv6 sites your real address. Kilobat asks api6.ipify.org for your IPv6 address to show what they see, and names the VPN setting, or how to turn IPv6 off for the network (System Settings › Network › Wi-Fi › Details › TCP/IP › Configure IPv6 › Link-Local Only).
- UDP and WebRTC. A browser’s WebRTC sends UDP from every network interface. Kilobat sends a STUN request (Google’s or Cloudflare’s server) over the VPN and one straight out of Wi-Fi or Ethernet: if the second gets an answer, or the first comes back from a different address than the VPN’s exit, a page can learn your real address. The fix is the VPN’s kill switch or lockdown option. Kilobat can’t run a browser’s WebRTC, so it also says how to stop browsers sharing local addresses: Safari hides them; Firefox with
media.peerconnection.enabledoff; Brave’s WebRTC IP handling policy; Chrome with Google’s WebRTC Network Limiter extension.
The leak test is free. It changes nothing, and the services it asks see your address as any site would. A pass covers this Mac at that moment, not every app. In the terminal: kilobat vpn leaks (exits 1 when something leaks, --json for scripts); agents use check_vpn_leaks.