Route your browser session traffic through a custom SOCKS5 proxy.
Using a Proxy
Pass a SOCKS5 proxy URL when creating a session:
const session = await client.browser.session.create({
proxyUrl: "socks5://user:[email protected]:1080",
});
socks5://username:password@host:port
| Component | Required | Description |
|---|
socks5:// | Yes | Protocol (only SOCKS5 supported) |
username:password@ | No | Authentication credentials |
host | Yes | Proxy server hostname or IP |
port | Yes | Proxy server port |
Examples
// Without authentication
proxyUrl: "socks5://proxy.example.com:1080";
// With authentication
proxyUrl: "socks5://myuser:[email protected]:1080";
// With IP address
proxyUrl: "socks5://user:[email protected]:1080";
Notes
- Only SOCKS5 proxies are supported
- HTTP/HTTPS proxies are not supported
- UDP enabled proxies are greatly encouraged
- Proxy must be accessible from Browser Cash infrastructure
- Proxy errors will cause the session to fail
Ensure your proxy server allows connections from Browser Cash.