More unique IPs than any network on the planet, in the world's largest residential pool. That's Shifter.More unique IPs than any network, in the world's largest pool. That's Shifter.

See the numbers

Claude, OpenAI and Gemini Computer Use Behind Residential Proxies: Giving Desktop Agents a Local IP

Claude, OpenAI and Gemini computer-use agents run on a screen you provide. How to give it a local residential IP without showing the model your credentials.

Engineering · Updated December 1, 2026 · 7 min read
desktopno passwordgateway✓ example.com✗ google.comlogin added hereDEresidentialEurope/Berlin
The proxy login stays in the amber gateway, outside the screen the model sees.
Knowledge
On this page
  1. Who runs the screen
  2. Browser agents: one argument
  3. Desktop agents: keep the credentials off the screen
  4. What we saw in testing
  5. Matching the rest of the identity
  6. Using it responsibly
  7. The bottom line
  8. Sources and references

Computer-use agents work by looking at a screen and acting on it: Claude, OpenAI and Gemini all take a screenshot, decide on a click or a keystroke, and look again. What they see depends on where the screen’s traffic comes from. A product page in Munich shows euros, German text and a different consent banner from the same page in Virginia. Like the agents in our guide to Playwright MCP with residential proxies, a computer-use agent can only report what the web shows to its IP address.

The good news is that all three put you in charge of the screen, and so of its network. This guide shows where the proxy goes for each, and how to give the agent a local IP without ever showing it your credentials.

Who runs the screen

ClaudeOpenAIGemini
Tool in the requestcomputer_toolset_20260801computercomputer_use
EnvironmentYoursYours, or a hosted partnerYours
Example setup in the docsA Linux desktop with Firefox in DockerPlaywright ChromiumPlaywright Chromium
Network advice in the docsLimit internet access to an allowlist of domainsAn allow list of sites, limited network accessAllowlists and blocklists

Claude. Computer use is a client toolset: Claude chooses the actions, and “your application runs every call in an environment you control.” Current models, including Claude Opus 5.5 and Claude Sonnet 5.5, use computer_toolset_20260801 with no beta header; older models use computer_20251124 with the computer-use-2025-11-24 header. Anthropic’s reference implementation, computer-use-demo in its quickstarts repository, is a Docker container with a virtual display, a lightweight Linux desktop and Firefox.

OpenAI. The Responses API takes a computer tool and returns actions for “your application” to carry out. Its guide uses Playwright and Chromium for browsers and PyAutoGUI for desktops, and lists hosted environments from partners such as Browserbase and Browser Use.

Gemini. The Gemini API’s computer_use tool supports browser, mobile and desktop environments, and “you will need to implement the client-side execution environment.” Its examples drive a Playwright browser at 1440 by 900 pixels.

None of the three guides mentions proxies, but all three tell you to restrict where the agent can go. A residential proxy gateway can do both jobs at once.

Browser agents: one argument

When the environment is a Playwright browser, as in the OpenAI and Gemini examples, the proxy is a launch option. Set the language and timezone to match the IP’s country at the same time, so the page does not see a German IP with an American clock:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(proxy={
        "server": "http://p.shifter.io:443",
        "username": "USERNAME-country-de-sid-task42-ttl-1800",
        "password": "PASSWORD",
    })
    context = browser.new_context(
        viewport={"width": 1440, "height": 900},
        locale="de-DE",
        timezone_id="Europe/Berlin",
    )
    page = context.new_page()

The session ID and lifetime in the username keep one residential IP for the task. An agent may take dozens of steps over several minutes, and an IP that changes halfway through can log it out or empty a cart. Our comparison of sticky and rotating proxies explains the trade-off; for agents, sticky is the default.

Desktop agents: keep the credentials off the screen

A full desktop, like Claude’s reference container, is different. You could type proxy settings into Firefox, but the model reads everything on screen, and screenshots go to the API. A password prompt, a settings page or a proxy URL in an address bar can end up in front of the model and in the provider’s logs. OpenAI’s guide says it plainly: “keep credentials out of page text and screenshots.”

The fix is a small gateway outside the desktop. The desktop’s browser points at it with no login. The gateway checks each destination against an allowlist, then opens the connection through the residential proxy and adds the credentials itself:

import asyncio, base64, os

UPSTREAM = ("p.shifter.io", 443)
ALLOW = {"example.com", "wikipedia.org"}  # sites the agent may reach
AUTH = base64.b64encode(
    f"{os.environ['UPSTREAM_PROXY_USER']}:{os.environ['UPSTREAM_PROXY_PASS']}".encode()
).decode()

def allowed(host):
    host = host.lower().rstrip(".")
    return any(host == d or host.endswith("." + d) for d in ALLOW)

async def pipe(r, w):
    try:
        while data := await r.read(65536):
            w.write(data)
            await w.drain()
    finally:
        w.close()

async def tunnel(cr, cw):
    head = await cr.readuntil(b"\r\n\r\n")
    method, target, _ = head.split(b"\r\n", 1)[0].decode().split(" ")
    host, _, port = target.rpartition(":")
    if method != "CONNECT" or not allowed(host):
        cw.write(b"HTTP/1.1 403 Forbidden\r\nContent-Length: 0\r\n\r\n")
        await cw.drain()
        return cw.close()
    ur, uw = await asyncio.open_connection(*UPSTREAM)
    uw.write(f"CONNECT {host}:{port} HTTP/1.1\r\nHost: {host}:{port}\r\n"
             f"Proxy-Authorization: Basic {AUTH}\r\n\r\n".encode())
    await uw.drain()
    status = (await ur.readuntil(b"\r\n\r\n")).split(b"\r\n", 1)[0]
    cw.write(status + b"\r\n\r\n")  # pass the status, never the upstream headers
    await cw.drain()
    if b" 200 " not in status + b" ":
        cw.close(); return uw.close()
    await asyncio.gather(pipe(cr, uw), pipe(ur, cw))

async def handle(cr, cw):
    try:
        await tunnel(cr, cw)
    except (asyncio.IncompleteReadError, ConnectionError, ValueError):
        cw.close()

async def main():
    server = await asyncio.start_server(handle, "127.0.0.1", 3128)
    async with server:
        await server.serve_forever()

asyncio.run(main())

In Docker, run the gateway in its own container with the credentials in its environment, put the desktop on an internal network that can reach only the gateway, and bind the gateway to that network instead of 127.0.0.1. Then set the desktop browser’s proxy to the gateway’s address and port 3128. The desktop has no route to the internet except through the allowlist, which is exactly what Anthropic’s security guidance asks for.

What we saw in testing

We ran the gateway with a German sticky session and pointed Chrome at it, with the language set to de-DE and the timezone to Europe/Berlin:

  • The allowed site loaded through Germany. Our IP lookup API reported a German exit on a German internet provider’s network, with the timezone Europe/Berlin, matching the browser.
  • Everything else was refused. A site off the allowlist failed with a tunnel error before any traffic left the machine.
  • The browser’s own traffic was refused too. Chrome tried to reach several Google services on its own during the test. The allowlist blocked all of them, which also keeps background requests off your proxy bill.

The browser never saw a password, and neither would a model watching its screen.

Matching the rest of the identity

An IP is one signal among many. A desktop agent’s clock, language, fonts and screen size all reach the page, and a mismatch is easy to spot: our fingerprint and IP consistency audit shows how testing sites compare them. For a container desktop, set the TZ and LANG environment variables to the exit country, and keep one screen size for the whole task, since the coordinates the models return are tied to the screenshots they see.

Bandwidth is the other cost to watch. Unlike a scraper, a computer-use agent needs the page to look right, so blocking images is usually not an option; an allowlist that drops third-party trackers is the safer saving. Each screenshot also costs model tokens, roughly 1,000 to 1,800 input tokens each according to Anthropic, so long tasks get expensive on both sides.

Using it responsibly

A local IP lets an agent see what local users see. It does not change what the agent is allowed to do. Use it on sites and accounts you are authorized to use, keep the allowlist tight, and follow the providers’ advice to ask a person before anything consequential, such as a purchase or a message. Our guide to Browser Use agents behind residential proxies covers sessions and concurrency when you run many agents at once.

The bottom line

Claude, OpenAI and Gemini computer use all run on a screen you provide, so you decide where its traffic exits. For browser environments, a proxy and matching locale in Playwright is enough. For full desktops, put a gateway with an allowlist between the desktop and residential proxies, so the agent gets a local, sticky IP and never sees the credentials that pay for it.

Sources and references

Frequently asked questions

Can I use a proxy with Claude computer use?

Yes. Claude's computer use tool is client-side: your application runs the desktop and carries out the actions, so the desktop's network traffic goes wherever you send it. Route the browser inside the desktop through a proxy, ideally a gateway outside the desktop that holds the credentials.

Do OpenAI and Gemini computer use run in their own cloud?

No. Both run actions in an environment you provide, usually a Playwright browser, a virtual machine or a container. OpenAI's guide also lists hosted partner environments such as Browserbase and Browser Use, and Gemini's guide points to a Browserbase demo. In each case, the traffic leaves from that environment.

Why should proxy credentials stay out of the agent's desktop?

A computer-use model reads the screen through screenshots that are sent to the API. A proxy login dialog, a settings page or a URL with a password in it can end up in those screenshots. A gateway outside the desktop adds the credentials itself, so the desktop never holds them.

Should a computer-use agent use rotating or sticky proxies?

Sticky. An agent works through a task over many steps, often signed in or with a cart open. Keep one residential IP for the whole task with a session ID and a lifetime longer than the task, and match the desktop's timezone and language to the IP's country.

Ready to get started?

Try Shifter's residential proxies, 205M+ IPs, 195+ countries, from $0.10/GB.

Get Started