Windows Guide
How ProxyBridge works on Windows
What happens to a packet in ProxyBridge for Windows: the WinDivert driver, rule matching, the local relay, the SOCKS5 and HTTP handshake, UDP, domain names, the background service and its security model.
How ProxyBridge works on Windows
You do not need this page to use ProxyBridge. It explains what is happening underneath, which helps when you are diagnosing a problem or deciding whether the approach fits your case.
The idea
Most programs connect to the internet by themselves, and many ignore proxy settings. ProxyBridge does not ask the program to use a proxy. It watches the program's network packets and, for the programs your rules select, redirects the connection to a proxy.
rules say: Proxy
Application ──► WinDivert ──► ProxyBridge ──► local relay ──► proxy (SOCKS5 / HTTP) ──► destination
│
└── no rule matched, or rule says Direct ──► packet sent on unchanged
The parts
| Part | Role |
|---|---|
WinDivert driver (WinDivert64.sys) |
A signed kernel driver that lets ProxyBridge see and re-send TCP and UDP packets as they leave the PC |
ProxyBridge engine (ProxyBridgeCore.dll) |
Looks up which program owns each connection, applies your rules, redirects packets, and runs the relay |
| Relay | A small local server inside the engine (TCP port 34010, UDP port 34011) that receives the redirected connections and forwards them to the proxy |
ProxyBridge Service (ProxyBridgeSvc.exe) |
Hosts the engine with the privileges the driver needs, so the app does not have to be elevated |
App (ProxyBridge.exe) |
The window you use. It tells the service which proxies and rules to apply |
CLI (ProxyBridge_CLI.exe) |
The same engine without a window; loads the engine itself and needs an administrator terminal |
What happens to a connection
- A program opens a connection. The first packet (for TCP, the SYN) goes out toward its destination.
- WinDivert hands it to ProxyBridge. The packet is held while ProxyBridge decides.
- ProxyBridge finds the owner. It asks Windows which process owns that local port, and gets the program name and path.
- The rules are checked, top to bottom, against program, destination address (and domain, if known), port and protocol. See Proxy rules.
- The action is applied:
- Direct: the packet is sent on, unchanged. Windows carries the rest of the connection.
- Block: the packet is dropped.
- Proxy: ProxyBridge remembers the original destination, then rewrites the packet so it goes to the local relay instead.
- The relay takes over. It accepts the connection, looks up the original destination it remembered, opens its own connection to your proxy, and performs the proxy handshake:
- SOCKS5: asks the proxy to connect to the original destination (by IP address or, if you ticked Let proxy resolve DNS and the name is known, by host name), logging in first if needed.
- HTTP: sends a
CONNECT host:portrequest, with Basic authentication if needed.
- Data flows both ways between the program and the proxy through the relay. The program believes it is talking to its normal destination.
The decision is made once per connection, on its first packet. That is why a rule change affects new connections and not ones already open.
Only the first packet of a Direct or Blocked connection is examined. After that Windows handles it, which is also why Live Connections can list only proxied connections: those are the only ones whose data passes through ProxyBridge.
UDP
UDP has no connection, so ProxyBridge tracks a flow: one local port talking to one destination. UDP that matches a Proxy rule is sent to the relay, which wraps each datagram for a SOCKS5 UDP ASSOCIATE session and unwraps the replies, then hands them back to the program. HTTP proxies have no UDP, so UDP stays direct when the rule's proxy is HTTP. A UDP flow counts as finished after 30 seconds without traffic.
Domain names
The packets carry only IP addresses. To let a rule say github.com, ProxyBridge watches the program's own plain DNS answers and remembers which name maps to which address. A connection to that address is then known by its name. Encrypted DNS (DNS over HTTPS) hides the answers, so no names are learned. See Domain names need plain DNS.
Addresses that are never redirected
Broadcast, multicast, link-local and DHCP traffic is always left alone, so a Proxy rule cannot break the local network. Connections to 127.0.0.1 and ::1 are direct unless the rule opts in. See Always direct.
The service and permissions
ProxyBridge.exe ──► ProxyBridgeSvc.exe ──► engine ──► WinDivert driver
(your account) (runs as SYSTEM)
- The service starts with Windows and owns the driver and the engine. The app is a normal program that connects to the service over a private local channel.
- Access to that channel is limited to SYSTEM, administrators and the ProxyBridge Users group. Other accounts cannot control the engine.
- The app checks it is really talking to the ProxyBridge service before it sends anything, so a look-alike program cannot receive your proxy settings.
- The install folder is writable only by administrators, so a normal user cannot replace the files the service runs.
- The relay only accepts connections from the original destination or from the local machine. Other computers on the network cannot use it as an open proxy.
- ProxyBridge adds a Windows Firewall rule for its relay on all network profiles, which is needed for VPN adapters (see VPNs, Public networks and the firewall).
See Install on Windows for the user-facing side of this.
Performance
- Traffic that matches no rule is sent on immediately and unchanged.
- Process lookups and rule decisions are cached, so a connection is examined once, not once per packet.
- Proxied connections are carried by a fixed pool of worker threads rather than a thread per connection, so a program that opens thousands of connections does not exhaust the PC. Memory is only used for connections that are actively moving data.
- The relay verifies each connection against what it recorded, so ordinary use costs little CPU.
What ProxyBridge is not
- Not a VPN. It does not create a tunnel for the whole PC, it does not encrypt traffic itself and it does not hide your IP address from the sites you visit.
- Not a proxy server. It sends traffic to a proxy you provide.
- Not a decryption tool. Seeing inside HTTPS is the job of the proxy (for example a security tool with its own certificate authority).
Pointing ProxyBridge at a tool that can inspect and modify the traffic is described in Use with security tools.
