Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions proxies/custom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,62 @@ browser = kernel.browsers.create(proxy_id=proxy.id)
- **`port`** (required) - Proxy server port (1-65535)
- **`username`** - Username for proxy authentication
- **`password`** - Password for proxy authentication (minimum 5 characters)
- **`bypass_hosts`** (optional) - Array of hostnames that bypass the proxy and connect directly (max 100 entries)

<Info>
When creating a proxy with authentication, provide the password. The API response will only indicate if a password exists (`has_password: true`) but won't return the actual password for security reasons.
</Info>

## Bypass hosts

Configure specific hostnames to bypass your custom proxy:

<CodeGroup>
```typescript Typescript/Javascript
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const proxy = await kernel.proxies.create({
type: 'custom',
name: 'custom-with-bypass',
protocol: 'https',
config: {
host: 'proxy.example.com',
port: 443,
username: 'user123',
password: 'secure_password',
},
bypass_hosts: [
'localhost',
'internal.service.local',
'*.trusted-domain.com',
],
});
```

```python Python
from kernel import Kernel

kernel = Kernel()

proxy = kernel.proxies.create(
type="custom",
name="custom-with-bypass",
protocol="https",
config={
"host": "proxy.example.com",
"port": 443,
"username": "user123",
"password": "secure_password",
},
bypass_hosts=[
"localhost",
"internal.service.local",
"*.trusted-domain.com",
]
)
```
</CodeGroup>

This is useful for accessing internal services or metadata endpoints without routing through your proxy. See the [overview](/proxies/overview#bypass-hosts) for full bypass host rules.
47 changes: 47 additions & 0 deletions proxies/datacenter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,50 @@ browser = kernel.browsers.create(proxy_id=proxy.id)
## Configuration Parameters

- **`country`** (optional) - ISO 3166 country code (e.g., `US`, `GB`, `FR`) or `EU` for European Union exit nodes
- **`bypass_hosts`** (optional) - Array of hostnames that bypass the proxy and connect directly (max 100 entries)

## Bypass hosts

Configure specific hostnames to bypass the proxy:

<CodeGroup>
```typescript Typescript/Javascript
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const proxy = await kernel.proxies.create({
type: 'datacenter',
name: 'datacenter-with-bypass',
config: {
country: 'US',
},
bypass_hosts: [
'localhost',
'internal.service.local',
'*.amazonaws.com',
],
});
```

```python Python
from kernel import Kernel

kernel = Kernel()

proxy = kernel.proxies.create(
type="datacenter",
name="datacenter-with-bypass",
config={
"country": "US",
},
bypass_hosts=[
"localhost",
"internal.service.local",
"*.amazonaws.com",
]
)
```
</CodeGroup>

Bypass hosts support exact hostnames and wildcard subdomains (`*.example.com`). See the [overview](/proxies/overview#bypass-hosts) for full details.
46 changes: 45 additions & 1 deletion proxies/isp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,48 @@ proxy = kernel.proxies.create(

browser = kernel.browsers.create(proxy_id=proxy.id)
```
</CodeGroup>
</CodeGroup>

## Configuration Parameters

- **`bypass_hosts`** (optional) - Array of hostnames that bypass the proxy and connect directly (max 100 entries)

## Bypass hosts

Configure specific hostnames to bypass the proxy:

<CodeGroup>
```typescript Typescript/Javascript
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const proxy = await kernel.proxies.create({
type: 'isp',
name: 'isp-with-bypass',
bypass_hosts: [
'localhost',
'internal.service.local',
'*.amazonaws.com',
],
});
```

```python Python
from kernel import Kernel

kernel = Kernel()

proxy = kernel.proxies.create(
type="isp",
name="isp-with-bypass",
bypass_hosts=[
"localhost",
"internal.service.local",
"*.amazonaws.com",
]
)
```
</CodeGroup>

See the [overview](/proxies/overview#bypass-hosts) for full bypass host rules and examples.
62 changes: 61 additions & 1 deletion proxies/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,67 @@ browser = kernel.browsers.create(proxy_id=proxy.id)
```
</CodeGroup>

## 4. Delete a proxy
## 4. Bypass hosts

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.

<CodeGroup>
```typescript Typescript/Javascript
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const proxy = await kernel.proxies.create({
type: 'datacenter',
name: 'proxy-with-bypass',
config: {
country: 'US',
},
bypass_hosts: [
'localhost',
'internal.company.local',
'metadata.google.internal',
'*.amazonaws.com',
],
});
```

```python Python
from kernel import Kernel

kernel = Kernel()

proxy = kernel.proxies.create(
type="datacenter",
name="proxy-with-bypass",
config={
"country": "US",
},
bypass_hosts=[
"localhost",
"internal.company.local",
"metadata.google.internal",
"*.amazonaws.com",
]
)
```
</CodeGroup>

### Bypass host rules

- **Exact hostnames**: `example.com`, `api.service.local`
- **Wildcard subdomains**: `*.example.com` matches `api.example.com`, `cdn.example.com`, etc.
- **Maximum 100 entries** per proxy
- **Maximum 253 characters** per hostname
- Hostnames are case-insensitive and automatically normalized
- Ports, paths, and URL schemes are not allowed
- IP addresses are not supported—use hostnames only

<Info>
Bypass hosts is available on Start-Up and Enterprise plans.
</Info>

## 5. Delete a proxy

When no longer needed, delete the proxy configuration:

Expand Down
39 changes: 39 additions & 0 deletions proxies/residential.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ browser = kernel.browsers.create(proxy_id=proxy.id)
- **`city`** - City name (lowercase, no spaces, e.g., `sanfrancisco`, `newyork`).
- **`zip`** - US ZIP code (5 digits). Conflicts with city and state.
- **`asn`** - Autonomous System Number. Conflicts with city and state.
- **`bypass_hosts`** (optional) - Array of hostnames that bypass the proxy and connect directly (max 100 entries)

## Advanced Targeting Examples

Expand Down Expand Up @@ -159,3 +160,41 @@ proxy = kernel.proxies.create(
<Note>
If the ASN is not matched, the API will return the most-available 10 examples.
</Note>

## Bypass hosts

Configure specific hostnames to bypass the proxy and connect directly:

<CodeGroup>
```typescript Typescript/Javascript
const proxy = await kernel.proxies.create({
type: 'residential',
name: 'residential-with-bypass',
config: {
country: 'US',
},
bypass_hosts: [
'localhost',
'metadata.google.internal',
'*.internal.company.com',
],
});
```

```python Python
proxy = kernel.proxies.create(
type='residential',
name='residential-with-bypass',
config={
'country': 'US',
},
bypass_hosts=[
'localhost',
'metadata.google.internal',
'*.internal.company.com',
]
)
```
</CodeGroup>

See the [overview](/proxies/overview#bypass-hosts) for full bypass host rules and examples.
1 change: 1 addition & 0 deletions reference/cli/browsers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ Create a new proxy configuration.
| `--port <port>` | Proxy port (custom; required). |
| `--username <username>` | Proxy username (custom). |
| `--password <password>` | Proxy password (custom). |
| `--bypass-host <hostname>` | Hostname to bypass proxy (repeatable; max 100). |
| `--output json`, `-o json` | Output raw JSON object. |

### `kernel proxies delete <id>`
Expand Down