Skip to main content

Overview

The Narada Python SDK allows you to route all browser traffic through a proxy server. This is useful for scenarios such as:

Privacy & Anonymity

Mask your IP address and browse anonymously through proxy servers.

Geo-Restrictions

Access region-locked content by routing traffic through proxies in different locations.

Corporate Networks

Work within enterprise environments that require proxy authentication.

Prerequisites

Make sure you have completed the Getting Started with the SDK guide before configuring proxy settings.

Configuration Reference

The ProxyConfig class provides all the options you need to configure proxy settings:

server (required)

The proxy server URL. Supports HTTP, HTTPS, and SOCKS5 protocols.Formats:
  • HTTP proxy: http://proxy.example.com:8080
  • HTTPS proxy: https://proxy.example.com:8080
  • SOCKS5 proxy: socks5://proxy.example.com:1080
proxy = ProxyConfig(server="http://proxy.example.com:8080")
Optional username for proxy authentication. Must be provided together with password.
proxy = ProxyConfig(
    server="http://proxy.example.com:8080",
    username="your_username",
    password="your_password"
)
Optional password for proxy authentication. Must be provided together with username.
Never hardcode credentials in your source code. Use environment variables or a secrets manager instead.
Optional comma-separated list of domains that should bypass the proxy.
proxy = ProxyConfig(
    server="http://proxy.example.com:8080",
    bypass=".example.com, internal.corp, localhost"
)
Use a leading dot (.example.com) to match all subdomains of a domain.
Set to True to ignore SSL certificate errors. Required for proxies that perform HTTPS inspection (MITM).
Only enable this option if you trust your proxy server completely. Disabling certificate verification exposes your traffic to potential interception.
proxy = ProxyConfig(
    server="http://corporate-proxy.example.com:8080",
    ignore_cert_errors=True  # Use with caution!
)

Quick Start

1

Import the Required Classes

Import ProxyConfig and BrowserConfig from the Narada SDK:
from narada import Narada, ProxyConfig, BrowserConfig
2

Create a Proxy Configuration

Define your proxy settings using ProxyConfig:
proxy = ProxyConfig(
    server="http://proxy.example.com:8080",
    username="your_username",  # optional
    password="your_password",  # optional
)
3

Apply Proxy to Browser Configuration

Pass the proxy configuration to BrowserConfig:
config = BrowserConfig(proxy=proxy)
4

Launch Browser with Proxy

Use the configuration when opening a browser window:
async with Narada() as narada:
    window = await narada.open_and_initialize_browser_window(config)
    # All browser traffic now routes through the proxy
Your browser window is now configured to route all traffic through the proxy server.

Troubleshooting

If you’re seeing SSL/TLS certificate errors:
  1. Corporate proxy - Your proxy may be performing HTTPS inspection (MITM)
  2. Enable ignore_cert_errors - Set ignore_cert_errors=True if you trust the proxy
  3. Install CA certificate - Alternatively, install your organization’s CA certificate
Only use ignore_cert_errors=True with trusted proxies in controlled environments.

Next Steps

View the complete proxy example on GitHub.