Home/Docs/Windows Guide/Proxy rules (Windows)

Windows Guide

Proxy rules (Windows)

Every field of a ProxyBridge rule on Windows: applications, hosts and domains, ports, protocol, action and localhost handling. How rules are ordered and matched, with worked examples.

Proxy rules on Windows

A rule says: when this application connects to these hosts and ports over this protocol, do this. Rules decide which traffic is sent through a proxy, left alone, or blocked. Open them with Proxy > Proxy Rules...

The Proxy Rules window listing two rules

The rules window

Part What it does
Add... Create a new rule
Clone Copy the selected rule (a quick way to make a variant)
Edit... Change the selected rule. Double-clicking a rule does the same
Remove Delete the selected rule
On check box Switch a rule on or off without deleting it
Up / down arrows Move the selected rule higher or lower in the list (see Rule order)
Search box Show only matching rules (see Searching a long list)
Columns On, Name, Applications, Hosts, Ports, Proto, Action, Proxy (the proxy's name, type and address)

A rule change applies to connections opened afterwards. Connections that are already open keep the route they started with.

You can have up to 128 rules in a profile.

Add or edit a rule

Click Add... (or Edit...) to open the Proxy Rule window.

Field Meaning
Name Your label for the rule. Left empty it becomes ProxyBridge Rule. The name is for you; it is also shown in Live Connections
Enabled Same as the On check box in the list
Applications Which programs the rule is for
Target Hosts Which destinations (IP addresses and domain names)
Target Ports Which destination ports
Protocol TCP, UDP, or Both
Action What to do: Direct, Block, or a proxy server
Also proxy localhost traffic Shown only when the action is a proxy. See Localhost traffic

A rule only matches when all of Applications, Target Hosts, Target Ports and Protocol match.

Applications

The Applications field holds one or more program names. Rules always match by name (or path), never by process ID, so a rule keeps working after the program restarts.

What you type Matches
* Every program
chrome.exe That program, wherever it is installed
firefox.exe; chrome.exe Either program. Separate entries with ; (a comma also works)
steam*.exe Wildcards: * stands for any text. steam*.exe, *.exe, *ch* and ch* all work
"C:\Program Files\App\app.exe" One exact program, by full path. Use quotes when the path has spaces
C:\Tools\*.exe Wildcards inside a full path work too

How the match works:

  • Matching is case-insensitive.
  • An entry without a \ or / is compared with the program's file name only (chrome.exe).
  • An entry with a \ or / is compared with the program's full path. Use this when two programs share a file name and you only want one of them.
  • Windows services run inside svchost.exe, so a rule for svchost.exe affects all the services hosted there.

The field holds up to 8191 characters, enough for hundreds of programs.

Pick running programs

Available from version 4.3.0.

Click Running... to open Add running process.

  • The list shows one row per running program (several copies of the same program share a row): Process name, PID and Executable path. If a program has several copies the PID column shows the lowest PID and the number of extra copies, for example 4242 (+2).
  • Type in the search box to narrow the list. Every word you type must appear in the name or path, in any case.
  • Refresh reloads the list.
  • Select one or more rows and click Add (or double-click a row).
  • Tick Use full executable path when available to add the full path instead of the name. Programs whose path Windows does not reveal, and paths containing ;, , or a quote, are added by name instead.

The PID is shown for reference only. Nothing you add is tied to a PID. The rule gets the program name (or path), so it still matches after the program restarts with a new PID.

Programs already in the field are not added twice.

Browse for programs

Click Browse... to pick .exe files from disk. From version 4.3.0 you can select several files, even from different folders (for example the results of a Windows search). Only the file names are added.

If the list is full, ProxyBridge tells you how many programs could not be added.

Target hosts

Target Hosts limits the rule to certain destinations. Leave it as * for any destination. IP addresses and domain names go in the same box and can be mixed:

10.*.*.*; github.com; *.google.com

This rule part matches a connection when its IP address matches an IP entry or its domain matches a domain entry.

The box is multi-line. Write one entry per line if you like; the line breaks are only for reading, and the entries are still separated by ;. The field holds up to 8191 characters.

Kind Example Notes
Any * Every destination
Single IPv4 192.168.1.1
IPv4 with wildcards 192.168.*.*, 10.*.*.*, 192.168.1.* * replaces a whole number between the dots
IPv4 range 10.10.1.1-10.10.255.255 Inclusive
IPv4 CIDR 10.0.0.0/8, 192.168.1.128/25, 1.2.3.4/32 A network and a prefix length from /0 to /32. Available from version 4.3.0
Several IPs 127.0.0.1; 192.168.1.1
Single IPv6 ::1, 2001:db8::1
IPv6 CIDR 2001:db8::/32, fe80::/10
IPv6 range 2001:db8::1-2001:db8::ff
Domain github.com That exact name only
Domain with a wildcard *.github.com Any sub-domain, and github.com itself

Writing IPv4 entries: wildcards need all four parts (192.168.*.*, not 192.168.*), and * replaces a whole number only, so 1*.2.3.4 does not work. For a network, CIDR (10.0.0.0/8) and wildcards (10.*.*.*) are equivalent for whole-number boundaries; CIDR also handles networks like 192.168.1.128/25. An entry that is not valid (for example 10.0.0.0/33) matches nothing.

Domain names need plain DNS

ProxyBridge cannot read an encrypted connection, so it learns host names by watching the application's own, ordinary DNS lookups and remembering which name belongs to which IP. That means:

  • Domain rules work only when the application uses unencrypted DNS. Browsers that use "Secure DNS" or DNS over HTTPS (Chrome, Edge and Firefox can) hide the lookups. Turn that off in the browser for domain rules to work, or match on IP addresses instead.
  • The application must have looked the name up after ProxyBridge started. A connection to an address the application resolved earlier has no known name.
  • An IP rule always works, whatever DNS the application uses.

Target ports

You type Matches
* (or empty) Every port
443 One port
80; 8080 Several ports
8000-9000 A range (inclusive)

Protocol

Choice Matches
TCP TCP connections only (web, most APIs, databases)
UDP UDP only (DNS, QUIC/HTTP/3, games, voice)
Both (TCP + UDP) Either

When you pick UDP or Both, the editor shows a warning: UDP only works with a SOCKS5 proxy, and not every SOCKS5 proxy supports UDP. See UDP, QUIC and HTTP/3.

Action

Action What happens to matching traffic
Direct Left alone. It goes out normally. Useful for exceptions placed above a broader rule
Block The connection is dropped. The application's connection fails or times out
A proxy server Sent through that proxy. Every proxy you added in Proxy servers is listed by name

Until you add at least one proxy server, only Direct and Block are offered.

Localhost traffic

Connections to your own machine (127.0.0.1, ::1) are normally not sent to the proxy, even when they match a proxy rule. Most proxies refuse localhost on purpose, and many programs talk to local helpers (developer tools, graphics-driver services, other programs on your PC) that must stay local.

The checkbox Also proxy localhost traffic (shown when the action is a proxy) changes that for this rule only:

Checkbox Connections to 127.0.0.1 / ::1 from the matching programs
Off (default) Go direct. All their other traffic still follows the rule
On Go through the proxy as well

Tick it when the proxy runs on the same PC and you want to see the application's local traffic too, typically for security testing. Do not tick it for a proxy on another machine; that machine cannot reach services on yours.

Because the setting belongs to the rule, you can proxy localhost traffic for one program and leave another program's local traffic alone.

Rule order

Rules are checked from top to bottom, and the first match wins. Put specific rules above general ones.

1  steam.exe     any host   any port   Direct        <- an exception for Steam
2  *.exe         any host   any port   Proxy Burp    <- everything else goes to Burp

A rule whose Applications is * and whose hosts and ports are both * (a pure catch-all) is special: it is only used when no other rule matched, wherever it sits in the list. A rule for * that has a host or port filter is checked in its normal position.

Use the up and down arrows to reorder. Rules you have switched off are skipped. If no rule matches, the connection goes out directly.

Always direct

Some addresses are never proxied, so the network keeps working:

IPv4 IPv6
Broadcast (255.255.255.255, x.x.x.255) Multicast (FF00::/8)
Multicast (224.0.0.0 to 239.255.255.255) Link-local (FE80::/10)
Link-local / APIPA (169.254.0.0/16) Site-local (FEC0::/10) and the unspecified address (::)
DHCP (UDP ports 67 and 68) DHCPv6 (UDP ports 546 and 547)

A Proxy action on these is changed to Direct. You can still add a Block rule for them.

Searching a long list

The search box at the top right of the rules window filters the list. A rule is shown when it contains every word you type (any case) in its name, applications, hosts, ports, protocol, action or proxy. For example chrome github or 192.168 proxy.

  • Ctrl+F jumps to the search box. Typing while the list has focus does the same.
  • Enter or Down moves to the matching rules.
  • Esc, or the x button, clears the search.
  • Edit, Clone, Remove and the On check boxes work on the rules you see.
  • The up and down arrows are disabled while a search is active, because the order of a partial list is ambiguous. Clear the search to reorder.

Examples

Goal Applications Target Hosts Ports Protocol Action
Send a browser through a proxy chrome.exe; msedge.exe * * TCP your proxy
Send only one site's traffic through the proxy chrome.exe github.com; *.github.com 443 TCP your proxy
Send only the company network through the corporate proxy * 10.0.0.0/8; *.corp.example.com * Both corporate proxy
Keep a tool local, send everything else rule 1: curl.exe / Direct. Rule 2: * * * Both your proxy
Block a program completely telemetry.exe * * Both Block
Block one remote service for a program app.exe 203.0.113.7 * Both Block
See an app's local traffic in a security tool app.exe * * TCP your proxy, with Also proxy localhost traffic ticked
Send a game's UDP through a SOCKS5 proxy game.exe * * UDP a SOCKS5 proxy that supports UDP

More worked scenarios are in Use cases and recipes.

Tips

  • Start with a rule for one program and check the Connections tab before you add more.
  • Name your rules. The name shows up in Live Connections, so you can see which rule routed a connection.
  • Rules are saved in the active profile, so switching profile switches the whole rule set.
  • To temporarily stop everything without touching rules, use Proxy > Enable ProxyBridge (Settings, tray and pausing).