Skip to Content
Foxbridge CDP ProxyCLI Reference

CLI Reference

Flags

FlagDefaultDescription
--port9222CDP WebSocket server port
--binaryauto-detectPath to Firefox or Camoufox binary
--headlessfalseRun browser in headless mode
--profile—Firefox profile directory
--backendjugglerBackend protocol: juggler or bidi
--bidi-url—Connect to an existing BiDi WebSocket endpoint instead of launching Firefox
--bidi-port9223Port for BiDi WebSocket when auto-launching Firefox with --backend bidi

Examples

Basic usage with Camoufox

foxbridge --binary ~/.camoufox/camoufox --port 9222

Headless mode

foxbridge --binary /path/to/camoufox --headless --port 9222

BiDi backend with auto-launch

foxbridge --backend bidi --binary /usr/bin/firefox --port 9222

Firefox is launched with --remote-debugging-port and foxbridge connects to the BiDi WebSocket automatically.

BiDi backend connecting to existing browser

foxbridge --backend bidi --bidi-url ws://localhost:9223/session --port 9222

Custom profile directory

foxbridge --binary /path/to/camoufox --profile /tmp/foxbridge-profile --port 9222

HTTP Endpoints

EndpointDescription
GET /json/versionBrowser version info + WebSocket URL
GET /json/listActive page targets with WebSocket URLs
GET /jsonAlias for /json/list
WS /devtools/browser/Main CDP WebSocket connection
WS /Convenience alias for WebSocket

Binary Detection

If --binary is not specified, foxbridge searches for Firefox/Camoufox in this order:

  1. ./camoufox or ./firefox (current directory)
  2. ~/.camoufox/camoufox
  3. System PATH (which firefox / which camoufox)

Testing

# Run all tests with race detector go test -race ./... # Build only go build ./...

CI runs automatically via GitHub Actions on every push to main.

Last updated on