---
title: "IP allowlisting"
description: "Route Browsers traffic through your VPN by allowlisting proxies."
image: "https://help.agent.mq/og.svg"
---

> Documentation Index
> Fetch the complete documentation index at: https://help.agent.mq/llms.txt
> Use this file to discover all available pages before exploring further.

# IP allowlisting

Use this setup when you need to allowlist Browsers traffic through your firewall or API gateway.

By routing traffic through your own static proxy or VPN, you can:

* Pass network traffic through allowlisted infrastructure
* Control your browser's IP address and location
* Comply with internal security policies, firewalls, and access controls

## How to route Browsers through your VPN

Browsers sessions can route traffic through your own static HTTP/HTTPS proxy.

This lets you control the outbound IP. If your systems only allow traffic from trusted IPs, allowlist the IP of your proxy.

1. Deploy a VPN or proxy server in your trusted network
2. Allowlist that IP in your firewall, backend, or third-party system
3. Pass the proxy config into your Browsers session
4. Browsers routes browser traffic through your proxy

## Custom proxy configuration

### Node.js

```js create_session_with_proxy.js
import { Browsers } from "@agentmq/browsers";

const browsers = new Browsers({ apiKey: process.env.AGENTMQ_TOKEN! });

async function createSessionWithCustomProxies() {
  const session = await browsers.sessions.create({
    proxies: [
      {
        "type": "external",
        "server": "http://...",
        "username": "user",
        "password": "pass",
      }
    ]
  });
  return session;
}

const session = await createSessionWithCustomProxies();
```

### Python

```python create_session_with_proxy.py
from agentmq.browsers import Browsers
import os

browsers = Browsers(api_key=os.environ["AGENTMQ_TOKEN"])

def create_session_with_custom_proxy():
  session = browsers.sessions.create(
    proxies=[
    {
      "type": "external",
      "server": "http://...",
      "username": "user",
      "password": "pass",
    },
  ]
  )
  return session

session = create_session_with_custom_proxy()
```

## Key requirements

* Your proxy must support HTTP or HTTPS
* It must be accessible from Browsers (public IP or via tunnel)
* You must allow traffic from Browsers to your proxy (firewall, VPN config, etc.)

## Troubleshooting

If your session fails to connect:

* Make sure your proxy server is publicly accessible or properly tunneled
* Confirm the proxy IP is correctly allowlisted in your system
* Check the proxy authentication credentials
* Ensure you're using HTTP or HTTPS (Socks5 proxies are not supported)
* Try connecting to the proxy from a local machine to verify it works outside your network

- **Proxies** — Read more about using custom proxies and proxy configuration options.

Source: https://help.agent.mq/browsers/security/ip-allowlisting/index.mdx
