- JavaScript 76.1%
- CSS 14%
- HTML 9.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| icons | ||
| src | ||
| test | ||
| .gitignore | ||
| .oxfmtrc.json | ||
| manifest.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| web-ext-config.cjs | ||
Tab SOCKS
A Firefox Manifest V3 extension for per-tab and per-site SOCKS5 split tunneling.
It routes selected tabs or sites through a local SOCKS5 server (default
127.0.0.1:12334) while everything else connects directly.
Requirements
- Firefox 142 or newer (required for the manifest data-collection declaration).
- A SOCKS5 server with no authentication, usually in front of a VLESS tunnel.
- The server must support remote DNS, because the extension sets
proxyDNS: true.
Install for development
pnpm install
pnpm start
pnpm start launches a temporary Firefox profile with the extension loaded.
To load it manually, open about:debugging#/runtime/this-firefox, choose
Load Temporary Add-on, and select manifest.json.
Usage
Open the toolbar popup on any tab:
- This tab — Default, Proxy, or Direct. The override survives navigation and is discarded when the tab closes (or when you press Reset this tab).
- Website — Default, Proxy, or Direct for the site's host and all of its subdomains. Site rules persist across restarts.
- The master switch enables or disables the extension without losing rules.
Open Settings for the endpoint, global default, fail-open behavior, bypass lists, site rule management, and diagnostics.
Precedence
- Local, private, and explicitly bypassed hosts are always direct.
- The current tab override.
- The most specific matching site rule.
- The global default mode.
Site rules match the exact host or any subdomain. For example, a direct rule
for example.com also matches mail.example.com, while a proxy rule for
mail.example.com wins for that host.
The popup suggests the current host with a leading www. removed, so a rule
created on www.example.com covers the whole example.com site.
Failure behavior
By default the extension fails closed: if the SOCKS server is unreachable, proxied requests fail instead of silently going direct. Enable Fail open in Settings if you prefer a direct fallback.
Firefox proxy settings
Firefox resolves proxy.onRequest decisions against the browser's global proxy
configuration. A direct result cannot override a global proxy, so while the
add-on is enabled it saves the current Firefox proxy settings, sets the global
proxy to None, and restores the saved value when you disable the add-on.
If the browser or another extension changes the proxy configuration, the add-on reports it in Settings. Disabling the add-on normally restores the saved value. If an override is still active after disabling, use Restore Firefox proxy settings before removing the add-on.
Limitations
- WebRTC can bypass proxy settings. Disable or constrain WebRTC separately if that matters for your threat model.
- Firefox may use a direct connection for a short window during early startup, before the extension's background page has initialized.
- Site rules are host-based. There is no per-path or per-port matching.
- Private-window support must be granted in Firefox for the add-on to work there. Settings shows the current state.
- Enterprise proxy policy can prevent the add-on from managing proxy settings.
Development
pnpm test # unit tests for host parsing and routing rules
pnpm lint # web-ext validation
pnpm build # packaged extension in dist/
Layout
manifest.json
src/background/ event page, storage, routing, proxy settings
src/shared/ constants and host helpers
src/ui/ popup and options page
icons/ toolbar and add-on icons
test/ Node unit tests