Camofox can route all browser traffic through a proxy server and automatically configure the browser fingerprint to match the proxy’s geographic location. This ensures consistent geolocation signals across all browser APIs.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jo-inc/camofox-browser/llms.txt
Use this file to discover all available pages before exploring further.
Environment variables
Set these environment variables before starting the Camofox server:| Variable | Description | Required |
|---|---|---|
PROXY_HOST | Proxy hostname or IP address | Yes |
PROXY_PORT | Proxy port number | Yes |
PROXY_USERNAME | Proxy authentication username | No |
PROXY_PASSWORD | Proxy authentication password | No |
Configuration
Local development
Docker deployment
Fly.io deployment
Railway deployment
In the Railway dashboard:- Go to your service → Variables
- Add:
PROXY_HOST=166.88.179.132PROXY_PORT=46040PROXY_USERNAME=myuserPROXY_PASSWORD=mypass
- Redeploy
How GeoIP works
When proxy configuration is detected, Camofox’s GeoIP feature automatically:- Resolves the proxy’s exit IP address via geo-lookup
- Sets browser locale to match the IP’s country (e.g.,
en-GBfor UK,de-DEfor Germany) - Sets timezone to match the IP’s region (e.g.,
Europe/London,America/New_York) - Sets geolocation coordinates to match the IP’s city (latitude/longitude)
- Configures Camoufox fingerprint to align with the derived locale
Without proxy
If no proxy is configured, Camofox uses default US-based fingerprinting:- Locale:
en-US - Timezone:
America/Los_Angeles - Geolocation: San Francisco, CA coordinates (37.7749, -122.4194)
Fingerprint consistency
GeoIP ensures that all geolocation signals exposed to websites are consistent:| Browser API | Value Source |
|---|---|
navigator.language | Derived from proxy IP |
navigator.languages | Derived from proxy IP |
Intl.DateTimeFormat().resolvedOptions().timeZone | Derived from proxy IP |
navigator.geolocation.getCurrentPosition() | Derived from proxy IP |
HTTP Accept-Language header | Derived from proxy IP |
Proxy protocol
Camofox uses HTTP CONNECT tunneling (server.js:286-298):
- HTTP proxies with CONNECT tunneling
- SOCKS5 proxies (if your proxy supports it)
- Basic authentication via username/password
Implementation details
Proxy config resolution
ThebuildProxyConfig() function (server.js:285-299) checks for proxy environment variables at startup:
PROXY_HOST or PROXY_PORT is missing, proxy is disabled.
Browser launch with GeoIP
When launching the browser (server.js:379-396), the proxy config is passed to Camoufox’s launchOptions():
geoip: !!proxy flag tells Camoufox to perform geo-lookup and configure fingerprinting.
Context creation without overrides
When creating browser contexts for sessions (server.js:432-443), the code checks if a proxy is configured:
Residential proxies
For best results, use residential proxies instead of datacenter proxies. Residential IPs are less likely to be flagged by anti-bot systems. Recommended providers:- Bright Data - Residential/mobile proxies
- Smartproxy - Residential proxies
- Oxylabs - Datacenter and residential proxies
Proxy rotation
Camofox does not rotate proxies automatically. Each browser instance uses a single proxy configuration for its entire lifetime. For proxy rotation:- Restart the browser with a new proxy config (not recommended - slow)
- Deploy multiple Camofox instances with different proxy configs behind a load balancer
- Use rotating proxies from your provider (proxy endpoint rotates IPs per request)
Debugging proxy issues
Connection failures
Symptoms: Browser fails to launch, all page loads timeout Causes:- Proxy host/port unreachable
- Firewall blocking outbound connections
- Proxy authentication failed
GeoIP mismatch
Symptoms: Browser locale/timezone don’t match proxy location Causes:- GeoIP database out of date
- Proxy IP is newly allocated and not in geo databases
- Context options override GeoIP settings
locale, timezoneId, or geolocation in the context options when using GeoIP.
Slow page loads
Causes:- High latency proxy
- Proxy bandwidth throttling
NAVIGATE_TIMEOUT_MS (default 30s).
Logging
Camofox logs proxy status at startup:geoip: true, GeoIP is active.