One click
Pick a proxy or Direct from the toolbar popup. An optional keyboard shortcut flips between the last proxy and Direct.
Chrome and Firefox extension
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.
01
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.
Pick a proxy or Direct from the toolbar popup. An optional keyboard shortcut flips between the last proxy and Direct.
Each proxy has a color, and the whole toolbar icon takes it. Slate means Direct. You can tell where traffic goes without opening anything.
In Chrome, a failed connection through the proxy puts a red badge on the icon and a Switch to Direct button in the popup.
A dead proxy is reported, not worked around. Traffic you meant to send through a proxy never quietly goes direct.
02
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:
sha256sum --check ghostproxy-0.1.0.zip.sha256
chrome://extensions and turn on
Developer mode.
about:debugging#/runtime/this-firefox.
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
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
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. |
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
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.
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
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
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
The same extension runs in Firefox, with two differences the browser imposes.
09
chrome://extensions
→ Details).
10
| 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
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.
browser or chrome.
| 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
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
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:
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
mise.toml pins tool versions, the
justfile owns commands, and npm owns development
dependencies.
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.