Proxy routes are enabled for teams on request. Contact us at info@hyperbrowser.ai to get access. Until they’re enabled for your team,
proxyRoutes is ignored and all of the session’s traffic uses the proxy.Create a session with proxy routes
Proxy routes need a session proxy: setuseProxy, with Hyperbrowser’s managed proxy, a custom proxyServer, or a staticIpId. Then pass proxyRoutes (proxy_routes in Python). Each route has a match, which is one pattern or a list of them, and a proxy:
"direct"sends matching traffic straight out of the browser’s machine."default"sends matching traffic through the session’s proxy.
login.example.com goes through the proxy, every other subdomain of example.com and cdn.example.net go direct, and all other hosts, including example.com itself, go through the proxy.
How routes match
- A pattern is a hostname such as
example.com,*.example.comfor every subdomain ofexample.combut notexample.comitself, or*for every host. To cover a domain and its subdomains, list both:["example.com", "*.example.com"]. - A pattern matches the host on any port. URLs, ports, and IP addresses aren’t accepted as patterns; only
*matches a host that is reached by IP address. - You can write internationalized hostnames in Unicode or in punycode.
- Routes are checked in order, and the first route that matches a host decides. Hosts that no route matches go through the proxy.
"default" first and finish with { "match": "*", "proxy": "direct" }.
Limits
- A session can have up to 32 routes and 128 patterns across all of its routes.
- You set routes when you create a session with the sessions API. Scrape, crawl, extract, and agent task requests don’t accept
proxyRoutes. - Proxy routes can’t be combined with a network policy:
allowInternetAccess: false,allowOut, ordenyOut.
Related Features
Proxy Configuration
Managed and custom proxies, and location targeting
Static IPs
Use dedicated IP addresses