Ghost Assembly Ghost Proxy

Chrome and Firefox extension

Ghost Proxy

Switch your browser between SOCKS proxies and Direct in one click, without touching system proxy settings.

Point it at any SOCKS4 or SOCKS5 proxy — a local forwarder, a proxy on your network, or one on a remote host. The whole browser goes through the proxy you pick, the toolbar icon takes that proxy's color, and a dead proxy is reported as a dead proxy instead of looking like a broken connection.

  • Chrome 121+
  • Firefox 140+
  • MIT

Install Source on GitHub

01

Overview

Ghost Proxy sets the browser's own proxy setting. Your system proxy, other browsers and other programs are untouched, and the browser is either on one proxy or on Direct — there are no per-site rules to maintain.

One click

Pick a proxy or Direct from the toolbar popup. An optional keyboard shortcut flips between the last proxy and Direct.

State by color

Each proxy has a color, and the whole toolbar icon takes it. Slate means Direct. You can tell where traffic goes without opening anything.

Says when it is down

In Chrome, a failed connection through the proxy puts a red badge on the icon and a Switch to Direct button in the popup.

Never falls back

A dead proxy is reported, not worked around. Traffic you meant to send through a proxy never quietly goes direct.

02

Install

Download ghostproxy-<version>.zip from the latest release. The same zip works in both browsers, and a .sha256 file beside it lets you check the download:

Shell
sha256sum --check ghostproxy-0.1.0.zip.sha256

Chrome or Chromium 121+

  1. 1Unzip the release into a folder you will keep.
  2. 2Open chrome://extensions and turn on Developer mode.
  3. 3Choose Load unpacked and select the folder.
  4. 4Pin Ghost Proxy from the puzzle-piece menu so its icon stays visible.

Firefox 140+

  1. 1Open about:debugging#/runtime/this-firefox.
  2. 2Choose Load Temporary Add-on and select the zip.
  3. 3In about:addons → Ghost Proxy, turn on Run in Private Windows.

Firefox removes temporary add-ons when it restarts, until Ghost Proxy is signed. The private-window step is required; see Firefox for why.

03

Uninstall

Remove it from chrome://extensions or about:addons. The browser drops the proxy setting an extension controlled when the extension goes away, so the browser returns to its own proxy configuration. Your saved proxies are deleted with it.

04

Proxies

Open the options page from Manage proxies in the popup, or right-click the toolbar icon → Options in Chrome and Manage Extension → Preferences in Firefox.

Field Rules
Name 1 to 40 characters. Shown in the popup and in the toolbar tooltip.
Host A host name or IPv4 address, such as 127.0.0.1 or socks.example.com. Stored in lowercase.
Port 1 to 65535. A local forwarder such as ssh -D 1080 listens on the port you give it.
Scheme SOCKS5 or SOCKS4. Prefer SOCKS5; see DNS and privacy.
Color One of eight; a new proxy gets the first color not yet in use. There is no red, which is kept for the down warning.
  • Blue
  • Green
  • Orange
  • Purple
  • Pink
  • Yellow
  • Teal
  • Silver

Editing and order

  • Two proxies cannot share an address. The browser's setting records only scheme, host and port, so a duplicate could not be told apart.
  • Editing the proxy in use applies at once. Change its address and the browser switches to the new one; rename it or change its color and nothing reconnects.
  • Deleting the proxy in use switches to Direct, after asking.
  • ↑ and ↓ set the popup's order. The first proxy is the one the shortcut picks before you have used any.

Bypass list

Hosts on the bypass list always connect directly, one per line. The default is localhost, 127.0.0.1, ::1 and <local> (names without a dot). Neither browser sends localhost through a proxy anyway; in Chrome, add <-loopback> to change that. Saving the list re-applies the proxy in use.

05

Toolbar

The icon shows where traffic goes; the badge appears only when something needs your attention. Hover the icon for the proxy's name and address.

  • Filled with a color — the proxy with that color is in use.
  • Slate — Direct, or the browser's own proxy settings.
  • ! Red ! — the browser could not reach the proxy (Chrome only). The popup offers Switch to Direct. The warning clears after 30 seconds without errors, or when you switch.
  • ? Grey ? — another program, extension or policy set a proxy that is not one of yours. If another extension or a policy controls the setting, the popup says so and switching is disabled.

Why errors right after a switch are ignored. Requests already in flight to the previous proxy keep failing for a moment after you switch. Errors in the first two seconds are not held against the new proxy.

06

Keyboard

One command, Toggle between the last proxy and Direct, ships without a key so it cannot collide with your desktop's or browser's shortcuts. Assign one yourself:

Browser Where
Chrome chrome://extensions/shortcuts
Firefox about:addons → ⚙ → Manage Extension Shortcuts

The popup is keyboard-operable too: the proxies are a radio group, so the arrow keys move between them and switch.

07

DNS and privacy

With SOCKS5, the browser hands host names to the proxy, so DNS lookups happen at the proxy and do not leak from this machine. With SOCKS4, names are resolved locally before the connection is made. Prefer SOCKS5.

Ghost Proxy asks for three permissions and nothing else:

Permission Used for
proxy Changing the browser's proxy setting.
storage Remembering your proxies, on this machine only.
alarms Clearing the proxy-down warning after 30 quiet seconds.

It has no host permissions and no content scripts, reads no pages, makes no network requests of its own and collects no data. Proxies are stored with storage.local, not synced, because a port that is right on one machine is rarely right on another.

08

Firefox

The same extension runs in Firefox, with two differences the browser imposes.

  • Private-window access is required. Firefox lets an extension change the proxy only if it may run in private windows, and the proxy then applies to private windows too. Until you allow it, the popup says so and switching is disabled.
  • No down warning. Firefox reports proxy failures only to extensions with access to every website. Ghost Proxy does not ask for that, so in Firefox a dead proxy shows up as pages failing to load.

09

Limits

  • The whole browser uses one proxy at a time; there are no per-site rules or PAC scripts.
  • SOCKS only. HTTP and HTTPS proxies, and SOCKS username/password authentication, are not supported.
  • Ghost Proxy cannot start, stop or test proxies. It learns that one is down only when a connection through it fails.
  • Chrome's incognito windows follow the setting only if you allow Ghost Proxy in incognito (chrome://extensions → Details).
  • If another extension or an enterprise policy controls the proxy, Ghost Proxy shows that and does not fight it.

10

Troubleshooting

You see Check
Red ! and pages fail Is the proxy running and listening on that host and port? For an ssh -D forwarder, is the SSH session still up? Switch to Direct to get back online.
Grey ? and switching disabled The popup says whether another extension or a policy controls the proxy. Disable the other proxy extension, or ask your administrator about the policy.
Firefox: switching disabled Turn on Run in Private Windows for Ghost Proxy in about:addons.
A local site goes through the proxy Add its host to the bypass list.
Incognito ignores the proxy Allow Ghost Proxy in incognito from its Details page in chrome://extensions.

11

Architecture

Plain JavaScript ES modules, shipped as written: no build step and no runtime dependencies. One manifest declares both a service worker for Chrome and a background script for Firefox, so one zip serves both browsers.

Module Owns
profiles.js Validating proxies and the bypass list at the boundary; the color palette; storage.
proxy-config.js Building the browser's proxy value and matching it back to a proxy. The only browser-specific code: the setting's shape, detected from what the browser returns, never from the user agent.
state.js Status, switching, the toggle command, proxy health and the toolbar indicator.
icon.js Drawing the toolbar icon in a proxy's color, once per color.

Nothing stores a copy of "the active proxy". Ghost Proxy reads the browser's setting and matches it to a saved proxy each time, so the toolbar can never disagree with what the browser is doing. Proxy health lives in session storage: it survives the service worker sleeping, not a browser restart.

12

Testing

just test runs the Vitest unit suite: library functions take a browser-shaped api argument, so tests drive them with an in-memory fake of Chrome and Firefox.

just test-browser loads the unpacked extension into Playwright's Chromium and browses through a SOCKS5 server the test starts itself. It proves pages load through the proxy, that DNS went through it, that a stopped proxy raises the warning, and that the popup and options pages pass axe.

just test-docs checks this page in Chromium and Firefox: accessibility in both color schemes, keyboard navigation, a 360px phone, reduced motion, local assets only and no JavaScript. Playwright cannot load extensions into Firefox, so the extension itself is checked there by web-ext lint and by hand with just run-firefox.

13

Releasing

Set the same version in extension/manifest.json and package.json, and merge it to main through a passing pull request. Then tag that commit:

Shell
git tag v0.1.0
git push origin v0.1.0

The release workflow checks the tag against both version fields, that the commit is on main and that CI passed for it, then attaches the zip and its SHA-256 that CI built and tested. It never rebuilds. just build makes the same zip locally, byte for byte, from an explicit file allowlist.

14

Development

mise.toml pins tool versions, the justfile owns commands, and npm owns development dependencies.

Shell
just setup         # toolchain, npm dev dependencies, Playwright browsers
just run           # Chromium with the unpacked extension, throwaway profile
just run-firefox   # Firefox with the extension loaded temporarily
just lint          # ESLint, Prettier, web-ext lint, ruff
just typecheck     # tsc over the JSDoc types
just test          # unit tests
just test-browser  # end-to-end tests in Chromium
just test-docs     # this page in Chromium and Firefox
just security      # osv-scanner, gitleaks, actionlint, zizmor
just build         # reproducible zip and SHA-256 in dist/
just docs          # serve this page at localhost:8000
just ci            # everything CI runs

GitHub requires the ci check and CodeQL to pass before a pull request merges, and Pages publishes this page only after they pass on main.