Kernel proxies enable you to route browser traffic through different types of proxy servers, providing enhanced privacy, flexibility, and bot detection avoidance. Proxies can be created once and reused across multiple browser sessions.
Datacenter has the fastest speed, while residential is least detectable. ISP is a balance between the two options, with less-flexible geotargeting. Kernel recommends to use the first option in the list that works for your use case.
Configure specific hostnames to bypass the proxy and connect directly. This is useful for accessing internal services, metadata endpoints, or reducing latency for trusted domains.
You can hot-swap the proxy on a running browser session without restarting it. This updates the proxy configuration immediately — all subsequent network requests from the browser will use the new proxy.
The browser’s network is momentarily disconnected during a proxy hot swap. Any in-flight requests may fail.
Copy
Ask AI
import Kernel from '@onkernel/sdk';const kernel = new Kernel();// Create two proxy configurationsconst proxyA = await kernel.proxies.create({ type: 'isp', name: 'proxy-a', config: { country: 'US' },});const proxyB = await kernel.proxies.create({ type: 'residential', name: 'proxy-b', config: { country: 'DE' },});// Launch a browser with the first proxyconst browser = await kernel.browsers.create({ proxy_id: proxyA.id,});// Hot-swap to a different proxyawait kernel.browsers.update(browser.session_id, { proxy_id: proxyB.id,});// Remove the proxy entirely (route directly to the internet)await kernel.browsers.update(browser.session_id, { proxy_id: '',});
The update is synchronous — when the call returns, the proxy swap is fully applied and all new browser traffic routes through the updated proxy. The swap typically completes in 2–3 seconds.
If you swap the proxy on a browser acquired from a pool, the browser will be reset back to the pool’s default proxy configuration when it is released. Releasing the browser will be delayed by the swap duration (~2-3 seconds) while the proxy is restored to the pool default.