Skip to content

Commit 95fa783

Browse files
committed
docs: add proxyBypassList and proxyBypassRgx params to setBrowserContextProxy docs
1 parent e28d87d commit 95fa783

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

ADVANCED_FEATURES.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,22 @@ await client.send('BotBrowser.setBrowserContextProxy', {
7676
});
7777
await page.goto('https://example.com');
7878

79-
// Switch to UK proxy at runtime - no context restart needed
79+
// Switch to UK proxy with bypass rules
8080
await client.send('BotBrowser.setBrowserContextProxy', {
8181
browserContextId: ctx._contextId,
82-
proxyServer: 'socks5h://user:pass@uk-proxy.example.com:1080'
82+
proxyServer: 'socks5h://user:pass@uk-proxy.example.com:1080',
83+
proxyBypassList: 'localhost;127.0.0.1', // standard bypass list
84+
proxyBypassRgx: 'cdn\\.example\\.com|/static/' // regex bypass (RE2 syntax)
8385
});
8486
await page.goto('https://example.co.uk');
8587
```
8688

8789
**Supported protocols:** `socks5://`, `socks5h://`, `http://`, `https://`, all with embedded authentication (`user:pass@host:port`).
8890

89-
**Optional parameter:** `proxyIp` provides the proxy's exit IP to skip automatic IP detection, resulting in faster geo-based timezone and language adaptation.
91+
**Optional parameters:**
92+
- `proxyIp` — provides the proxy's exit IP to skip automatic IP detection, resulting in faster geo-based timezone and language adaptation.
93+
- `proxyBypassList` — semicolon-separated list of hosts/patterns that should bypass the proxy (e.g., `localhost;*.internal.com`).
94+
- `proxyBypassRgx` — regex pattern (RE2 syntax) for URLs that should bypass the proxy. Supports `|` for multiple patterns (e.g., `cdn\.example\.com|/api/health`).
9095

9196
---
9297

0 commit comments

Comments
 (0)