Evomi

Camoufox Proxy Setup with geoip and Sticky IPs

Give Camoufox an Evomi residential proxy, let geoip set timezone, locale and WebRTC from the exit IP, and hold that IP for the whole run so the location you test is the one the site sees.

Money Back Guarantee Superior Support

Trusted by brands worldwide

Hyperbrowser logoDeployr logoFusionbase logoWundrig logoAuxilin logoEWDCI logoInstantly logoSMG logoMotion logoPriceShape logoDealavo logoCrustData logoDashmote logoexpand.ai logo
Setup

Pass an Evomi proxy to Camoufox

Camoufox is a Firefox-based browser driven through Playwright, so it takes a proxy the way Playwright does: a dictionary with server, username and password. Keep the credentials in their own fields rather than inside the server URL.

from camoufox.sync_api import Camoufox

proxy = {
    "server": "http://rp.evomi.com:1000",
    "username": "YOUR_USERNAME",
    "password": "YOUR_PASSWORD_country-DE_session-cfx01de",
}

with Camoufox(proxy=proxy, geoip=True) as browser:
    page = browser.new_page()
    page.goto("https://ip.evomi.com/s")
    print(page.inner_text("body"))

Install it with pip install -U "camoufox[geoip]" and run camoufox fetch once. The geoip extra is what makes geoip=True work. The HTTP endpoint on port 1000 is the simplest choice and carries HTTPS sites as well. The script prints the exit IP, which should sit in the country named in the password.

Pass an Evomi proxy to Camoufox
geoip

Why geoip needs a sticky session

With geoip=True, Camoufox looks up the proxy's exit IP as the browser launches and sets timezone, locale, geolocation and the WebRTC address to match it. That lookup happens once. Evomi Residential gives every request a new IP by default, so without a session parameter the browser would describe one city while its traffic arrived from many.

Always add a session to the password, with an ID of 6 to 10 letters and digits:

  • _session-ID holds the IP for 30 minutes, or longer with _lifetime- up to 1440 minutes. Set the lifetime longer than the run.
  • _hardsession-ID keeps the same IP for as long as possible, with no lifetime to set.
  • _lockedsession-ID fails rather than switch IP. For a test whose result depends on location, a clear failure beats a silent change.

Start each launch with a new session ID. The new browser then gets a new IP and a fresh geoip lookup that agrees with it.

Why geoip needs a sticky session
Contexts

Several markets in one Camoufox run

Localization QA often means loading the same page in a few markets. NewContext gives each browser context its own identity and its own proxy, and Camoufox looks up that context's WebRTC IP and timezone from its exit IP. Evomi covers 195+ countries, so the market is just a parameter:

from camoufox.sync_api import Camoufox, NewContext

USER, PASS = "YOUR_USERNAME", "YOUR_PASSWORD"

def evomi(country, sid):
    return {
        "server": "http://rp.evomi.com:1000",
        "username": USER,
        "password": f"{PASS}_country-{country}_session-{sid}",
    }

with Camoufox(headless=True) as browser:
    for country in ["DE", "FR", "US"]:
        proxy = evomi(country, f"qa{country}01")
        ctx = NewContext(browser, proxy=proxy)
        page = ctx.new_page()
        page.goto("https://example.com/pricing")
        page.screenshot(path=f"pricing-{country}.png")

To keep cookies between runs, for instance for a staging login you own, launch with persistent_context=True and a user_data_dir, and pair it with a _hardsession. On per-GB plans, block_images=True cuts the bytes a run transfers; leave it off when the images are what you are checking.

Several markets in one Camoufox run
Troubleshooting

Common Camoufox proxy errors

  • InvalidIP: Failed to get IP address at launch. geoip could not reach any of its public IP lookup services through the proxy, so the browser did not start. Check the username, password and port first. If the proxy works but the lookup does not, find the exit IP yourself and pass it as geoip="203.0.113.7".
  • Timezone or locale points at the wrong country. Camoufox places the IP with its own GeoIP database, set by geoip_db, while Evomi picked the IP using its database, set by _geosource- (ip-api by default, or maxmind). When the two disagree about an address, geoip follows Camoufox's. Try the other Evomi source, or pick a different Camoufox database with camoufox set --geoip, and confirm the result at https://ip.evomi.com/s.
  • Error 407. The proxy rejected the credentials. Every parameter in the password starts with an underscore; a stray space or a missing underscore is the usual cause.
  • Error 412. The targeting cannot be met, for example a city with no available IPs or a _lifetime above 1440.
  • The location drifts after half an hour. A plain _session expires after 30 minutes. Raise _lifetime or switch to _hardsession.
  • Launch fails after a Playwright upgrade. The camoufox package requires Playwright below 1.63. Give it its own virtual environment so another project cannot upgrade Playwright under it.
Common Camoufox proxy errors
The exit IP drives the identity icon

The exit IP drives the identity

geoip turns the proxy's exit IP into timezone, locale, geolocation and WebRTC settings, which makes the IP the one input worth getting right.

A new market is one parameter icon

A new market is one parameter

Change country-DE to country-FR, or add a city, and the next launch tests a different market with no other change to your code.

Our Products

The perfect product for Camoufox

Best for this Use Case
Residential Proxies icon

Residential Proxies

Starting from$0.49/GB
Buy Now
  • Smooth, Reliable Browsing
  • Higher Success Rates
  • Compatible With Popular Sites
  • Global Location Coverage
  • Free Geo Targeting
Learn More
Mobile Proxies icon

Mobile Proxies

Starting from$2.20/GB
Buy Now
  • Utilize Real Mobile Devices
  • Guaranteed Mobile Connection
  • Compatible With Popular Sites
  • Global Location Coverage
  • Large Collection of Carriers
Learn More
Datacenter Proxies icon

Datacenter Proxies

Starting from$0.30/GB
Buy Now
  • Highly Scalable
  • High Reliability and Uptime
  • Fast and Stable Speeds
  • Free Geo Targeting
  • Unlimited Concurrent Sessions
Learn More
Static Residential Proxies icon

Static ISP Proxies

Starting from$1.00/IP
Buy Now
  • Supports SOCKS5(UDP) / HTTP
  • Non-Expiring Sessions
  • Unlimited Bandwidth
  • Fast and Stable Speeds
  • High Concurrency
Learn More

FAQ

Camoufox proxy questions

Pass a Playwright-style dictionary to Camoufox(): server http://rp.evomi.com:1000, with your Evomi username and password in their own fields. Add geoip=True so timezone, locale and geolocation follow the proxy IP, and a session parameter in the password so that IP stays fixed for the run.