CV

VPN Proxy.

Windows tool that sends a short list of sites through a VPN while all other traffic stays direct. A local proxy and a routing script built from a domain list are enabled as the system proxy at start and removed on exit. It ships as an install package for colleagues with a diagnostics report.

Developer tools

Year
2026
Personal project
My part
Sole developer
Core stack
3 technologies
Claude Code, Python
Website
Not public
No public link

My role

I designed and wrote the whole tool alone, from the proxy and the routing script to the tests, the installer and the diagnostics report.

DevOps

Capabilities

Routing

  • Local proxy that sends only the listed sites to the VPN and everything else direct
  • Routing script generated from a plain text list of 25+ domains, with a dot check against look-alike domains
  • Registered as the system proxy at start and removed on exit, so Chrome follows it without an extension

Architecture

  • Two processes from one executable, joined by a named pipe so the VPN client's filters never see loopback traffic
  • Bridge that closes each side separately, so an accepted reply is not lost to a reset
  • Python standard library only, 450+ lines including tests and log tools

Packaging and checks

  • Install package for colleagues with installer, uninstaller and a diagnostics script that writes a report
  • Build that refuses to package when a check is red or the package holds an unexpected entry
  • Self-check of five networking tests that can be pointed at an older copy to prove it goes red, plus a separate check of the diagnostics script
  • Two analysers for the browser's network log that show which proxy each host used

Patterns and decisions

The tool is one Python program that uses only the standard library, so a colleague installs nothing beyond the package. A local proxy listens on the loopback address, and a routing script is generated on every request from a plain text list of 25+ domains. An entry matches the domain itself or anything under it, with a dot check so a look-alike domain stays direct. Everything else goes direct.

At start the tool registers the script as the system proxy setting, so Chrome follows it without an extension. A cleanup block removes the setting when the tool stops. A second copy cannot disturb the first: it fails to bind the port and never touches the setting of the running one.

The proxy handles three kinds of request: the routing script, HTTPS tunnelling and plain HTTP. Each connection gets a thread, and each direction of a tunnel gets its own. The code is 450+ lines of Python with the tests and log tools, plus an installer, an uninstaller and a diagnostics script that writes a report for a colleague to send back. The build refuses to package if either check is red, and it verifies that the package holds exactly the expected top-level entries.

Cases

Two processes joined by a named pipe. On a colleague's PC the VPN client treated the proxy's own loopback traffic as something to filter once the program sat on its per-application list, and the proxy hung before it could listen. I split the program in two. The front only listens locally and stays off the VPN list. The egress opens the outbound connections and is on the list, but never touches the loopback address. They talk over a named pipe, which is not network traffic, so the client's filters never see it. Both are the same executable started under two names. The front starts the egress by itself and retries for about five seconds while it unpacks. The first pipe instance is exclusive, so a second egress exits quietly.

Closing the two sides of the bridge separately. After the proxy closed a socket while the server was still sending, Windows sent a reset and threw away a reply the browser had already accepted. One site broke exactly on that. I rewrote the bridge so that an empty message on the pipe means end of stream from that side. Only the write half of the other socket is shut down, and everything closes after both directions finish. A test pins it: a server sends 300,000 random bytes, half-closes and drains while the client keeps sending, and the answer must arrive unchanged.

Tests that check themselves. Networking bugs show up under odd timing, so a green run alone proves little. The self-check starts both processes on a free port and drives them against local servers with no internet. It covers the routing script, a dead target that must answer with a 502 error, and a plain HTTP request that must reach the server in its origin form. The heaviest check sends a 5,000,000-byte random payload in uneven chunk sizes in both directions at once and compares it byte for byte. A setting points the same test at an older copy of the proxy, so I can confirm it goes red on code known to be wrong. The diagnostics script has a check of its own. A shell script extracts the embedded PowerShell, confirms it parses, runs it against a dead port and asserts what the summary must say and must not say. It also refuses non-ASCII characters in the batch files, since the Windows command shell misreads them.

Core stack

AI engineering

Languages & markup

Quality & tooling