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.
Proxy Types
Kernel supports four types of proxies:
Datacenter - Traffic routed through commercial data centers
ISP - Traffic routed through data centers, using residential IP addresses leased from from internet service providers
Residential - Traffic routed through real residential IP addresses
Custom - Your own proxy servers
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.
1. Create a proxy
Create a proxy configuration from the types above that can be reused across browser sessions:
Typescript/Javascript
Python
import Kernel from '@onkernel/sdk' ;
const kernel = new Kernel ();
const proxy = await kernel . proxies . create ({ type: 'datacenter' });
console . log ( proxy . id );
2. List your proxies
View all proxy configurations in your organization:
Typescript/Javascript
Python
import Kernel from '@onkernel/sdk' ;
const kernel = new Kernel ();
const proxies = await kernel . proxies . list ();
console . log ( proxies );
3. Use with browsers
Once created, you can attach a proxy to any browser session using the proxy_id parameter:
Typescript/Javascript
Python
import Kernel from '@onkernel/sdk' ;
const kernel = new Kernel ();
const proxy = await kernel . proxies . create ({
type: 'residential' ,
name: 'my-us-residential' ,
config: {
country: 'US' ,
},
});
const browser = await kernel . browsers . create ({
proxy_id: proxy . id ,
});
4. Delete a proxy
When no longer needed, delete the proxy configuration:
Typescript/Javascript
Python
import Kernel from '@onkernel/sdk' ;
const kernel = new Kernel ();
await kernel . proxies . delete ( 'id' );
Deleting a proxy immediately reconfigures associated browsers to route directly to the internet.