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
| Claude | OpenAI | Gemini | |
|---|---|---|---|
| Tool in the request | computer_toolset_20260801 | computer | computer_use |
| Environment | Yours | Yours, or a hosted partner | Yours |
| Example setup in the docs | A Linux desktop with Firefox in Docker | Playwright Chromium | Playwright Chromium |
| Network advice in the docs | Limit internet access to an allowlist of domains | An allow list of sites, limited network access | Allowlists 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
- Anthropic, Computer use tool: platform.claude.com
- Anthropic, computer-use-demo reference implementation: github.com
- OpenAI, Computer use guide: developers.openai.com
- Google, Gemini API computer use: aistudio.google.com
- Playwright, Network proxy settings: playwright.dev