Linux Guide
Profiles (Linux)
Save, switch, duplicate, export, import, rename and delete ProxyBridge profiles on Linux. What a profile contains, where the files live, and the .pbprofile format you can share between Linux, Windows and macOS.
Profiles on Linux
A profile is a saved setup: your proxy servers, your rules, your log filters and your settings. Profiles let you keep different configurations side by side, for example one for web application testing, one for a client project and one for everyday use, and switch between them with a click. The command line runs a profile too, so the setup you build in the window is the setup your scripts and your boot service use.
The window title always shows the active profile: ProxyBridge - Pentest lab, and so does the status bar at the bottom.
What a profile contains
| Saved in the profile | |
|---|---|
| Proxy servers | Including their authentication details, the default proxy and each proxy's DNS via proxy choice |
| Rules | Name, process names, hosts and domains, ports, protocol, action, which proxy, localhost option, on/off state, and the order |
| Log filters | The Include and Exclude filters for the Connections log |
| Settings | Enable Traffic Logging, Auto-clear Logs, Log Every Connection, text size (zoom), and whether DNS follows the rules (DnsViaProxy) |
Some things belong to the app, not the profile: which profile is active, whether to check for updates on start-up, and Start at Boot (all three in settings.json; see Settings, pausing and start at boot). The Enable ProxyBridge switch is never saved: ProxyBridge always starts enabled.
The Profile menu
Profile is a menu of its own, like in the Windows app. Every item works at once on the active profile; there is no list window to open first.
| Menu item | What it does |
|---|---|
| New Profile... | Asks for a name and creates an empty profile, then switches to it |
| Duplicate Profile... | Asks for a name (it suggests <active> copy) and creates a copy of the active profile with its proxies, rules, filters and settings, then switches to the copy |
| Rename Profile... | Renames the active profile |
| Delete Profile... | Asks for confirmation, then deletes the active profile and switches to another one. The last remaining profile cannot be deleted |
| Import Profile... | Loads a .pbprofile file as a new profile and switches to it |
| Export Profile... | Saves the active profile to a .pbprofile file |
| Switch Profile | A submenu listing your profiles. The active one is ticked. Choose another to switch |
A profile name cannot be empty and must be unique. Any other characters are allowed; ones that cannot be used in a file name are stored encoded (the profile Test/lab is saved as Test%2Flab.pbprofile).
Switching
Switching applies the new profile at once: the previous profile's proxies and rules are removed from the engine and the new profile's are loaded, the switches (traffic logging, auto-clear, log every connection, zoom) take the new profile's values, and the window title and status bar follow. The engine keeps running. Connections that were already open keep their route until they close.
If Start at Boot is on, the service applies the active profile when the machine starts: the next boot starts the profile you were last using.
Everything is saved automatically
Changes to proxies, rules, filters and settings are written to the active profile as soon as you make them. There is no Save button.
Export and import
Use Export Profile... to back up a setup, move it to another computer, or hand it to a colleague. Use Import Profile... on the other side.
- Importing creates a new profile named after the file (
work.pbprofilebecomeswork) or after theNameinside it. It never overwrites an existing one: if the name is taken,(2),(3)and so on is added. ProxyBridge then switches to it. - A file that cannot be read is refused with the reason (
Import failed: ...) and nothing is changed. Files are limited to 4 MiB, 255 proxies and 4096 rules, and are checked completely before anything is applied: a profile is never loaded half-way. Text with control characters in any field, numbers such as1080e1that other programs would read differently, repeated keys and a rule that points at a proxy that is not in the file are all rejected. - The
.pbprofilefile is plain JSON. You can edit it in a text editor, keep it in version control and run it with the command line. - The format is shared with ProxyBridge on Windows and macOS. A profile exported on one system can be imported on another; settings a system does not know are ignored.
Passwords are stored in the file in clear text. Exported files are written readable by their owner only (
0600). Before you share an exported profile, remove theUsernameandPasswordvalues of the proxy servers, or make sure the proxy account is one you can discard. The command line warns when it loads a profile with credentials that other users can read.
Where the files are
| What | Where |
|---|---|
| Profiles | /etc/proxybridge/profiles/<name>.pbprofile (one file per profile) |
| App settings (active profile, update check) | /etc/proxybridge/settings.json |
The folder belongs to root (mode 0700, files 0600), because the files hold proxy passwords. The window never reads or writes it directly: it asks the ProxyBridge service, which saves the profiles. Import and Export read and write the file you choose as yourself. To back up everything, copy the /etc/proxybridge folder with sudo. To use another folder, for example in tests, set PROXYBRIDGE_CONFIG_DIR.
If you used an earlier version, its single config.ini is converted into profiles the first time the new version starts, and kept next to them as config.ini.bak.
The .pbprofile format
{
"Version": "1.0",
"Name": "Pentest lab",
"IsTrafficLoggingEnabled": true,
"DnsViaProxy": true,
"LogEveryConnection": false,
"AutoClearConnectionLogs": true,
"FontZoom": 100,
"DefaultProxyId": 1,
"ProxyConfigs": [
{
"Id": 1,
"Name": "Burp Suite",
"Type": "HTTP",
"Host": "127.0.0.1",
"Port": "8080",
"Username": "",
"Password": "",
"SendDomainToProxy": true
},
{
"Id": 2,
"Name": "Corporate SOCKS5",
"Type": "SOCKS5",
"Host": "proxy.corp.example.com",
"Port": "1080",
"Username": "alice",
"Password": "secret",
"SendDomainToProxy": true
}
],
"ProxyRules": [
{
"Name": "Browsers through Burp",
"ProcessName": "firefox;chromium;google-chrome",
"TargetHosts": "*",
"TargetPorts": "80;443",
"TargetDomains": "",
"Protocol": "TCP",
"Action": "PROXY",
"IsEnabled": true,
"ProxyConfigId": 1,
"LocalhostViaProxy": false
},
{
"Name": "Company network",
"ProcessName": "*",
"TargetHosts": "10.0.0.0/8",
"TargetPorts": "*",
"TargetDomains": "*.corp.example.com",
"Protocol": "BOTH",
"Action": "PROXY",
"IsEnabled": true,
"ProxyConfigId": 2,
"LocalhostViaProxy": false
}
],
"LogFilters": [
{
"Mode": "Exclude",
"ProcessName": "systemd-resolved",
"Ip": "",
"Port": "",
"Protocol": "All",
"Action": "All"
}
]
}
| Field | Meaning |
|---|---|
Name |
The profile's name |
IsTrafficLoggingEnabled |
Settings > Enable Traffic Logging |
DnsViaProxy |
Whether DNS (port 53) follows your rules (default true). With false, DNS always goes out directly. A Linux addition that other apps ignore |
LogEveryConnection |
Settings > Log Every Connection |
AutoClearConnectionLogs |
Settings > Auto-clear Logs |
FontZoom |
Settings > Zoom, from 60 to 300 |
DefaultProxyId |
The proxy marked Default. A Linux addition that other apps ignore |
ProxyConfigs[].Id |
A number that stays with the proxy. Rules refer to it |
ProxyConfigs[].Type |
SOCKS5 or HTTP |
ProxyConfigs[].Port |
The port, written as a string (a plain number is read too) |
ProxyConfigs[].SendDomainToProxy |
The DNS via proxy option of that proxy |
ProxyRules[].ProcessName |
The Process Name field |
ProxyRules[].TargetHosts and TargetDomains |
The single Target Host box is saved as two lists: IP entries in TargetHosts and domain names in TargetDomains, the same way the Windows and macOS apps do. Linux merges them back into one box |
ProxyRules[].Action |
PROXY, DIRECT or BLOCK |
ProxyRules[].ProxyConfigId |
Which proxy a PROXY rule uses. 0 means the default proxy (DefaultProxyId, otherwise the first proxy). An id that is not in the file makes the profile invalid, instead of silently routing somewhere else |
ProxyRules[].IsEnabled |
The Enable check box. The command line skips disabled rules |
ProxyRules[].LocalhostViaProxy |
Also proxy localhost traffic for that rule |
LogFilters[].Mode |
Include or Exclude |
Older profiles with a single, global LocalhostViaProxy at the top level are still read: that value becomes the default for rules that do not have their own setting. Fields Linux has no use for (Language, CloseToTray, ...) are ignored when a Windows profile is imported. A profile written by hand needs only ProxyConfigs and ProxyRules; everything else has a default.
Ideas for using profiles
- One profile per proxy tool:
burp,mitmproxy,interceptsuite,tor. Switch tools without re-entering rules. - A clean "no proxy" profile: switch to a profile with a rule set to Direct, or to an empty one, to stop all routing while keeping your real setup untouched.
- Per-project profiles for pentest engagements, stored with the project's notes.
- Shared team profile: export it, review it, commit it, and have everyone import the same rules.
- One profile for the machine, one for you: the profile that Start at Boot applies is the one that was active last, so keep a quiet, stable profile active on a server and switch to an experimental one only while you work (and back afterwards).
- The same file on every operating system: build the profile on a Linux box, export it, and import it on a Windows or macOS test machine.
