Skip to content
Draft
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
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
"proxies/overview",
"proxies/custom",
"proxies/residential",
"proxies/mobile",
"proxies/isp",
"proxies/datacenter"
]
Expand Down
162 changes: 162 additions & 0 deletions proxies/mobile.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
---
title: "Mobile Proxies"
---

Mobile proxies route traffic through mobile carrier networks. Only recommended in advanced stealth use cases.

<Info>
Mobile carrier IPs often route through shared regional gateways. Country targeting is the most reliable option; city and US state targeting are best-effort and may not match every third-party geolocation database.
</Info>

## Configuration

Create a mobile proxy with a target country:

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

const kernel = new Kernel();

const proxy = await kernel.proxies.create({
type: 'mobile',
name: 'my-us-mobile',
config: {
country: 'US'
}
});

const browser = await kernel.browsers.create({
proxy_id: proxy.id,
});
```

```python Python
from kernel import Kernel

kernel = Kernel()

proxy = kernel.proxies.create(
type='mobile',
name='my-us-mobile',
config={
'country': 'US'
}
)

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

## Configuration parameters

- **`country`** - ISO 3166 country code. Must be provided when providing other targeting options.
- **`state`** - US-only two-letter state code. Best-effort for mobile proxies.
- **`city`** - Provider city alias, such as `brooklyn` or `chicago`. Best-effort for mobile proxies.
- **`bypass_hosts`** (optional) - Array of hostnames that bypass the proxy and connect directly (max 100 entries)

## Advanced targeting examples

### Target by city

Route traffic through a specific city:

<CodeGroup>

```typescript Typescript/Javascript
const proxy = await kernel.proxies.create({
type: 'mobile',
name: 'brooklyn-mobile',
config: {
country: 'US',
state: 'NY',
city: 'brooklyn'
}
});
```

```Python Python
proxy = kernel.proxies.create(
type='mobile',
name='brooklyn-mobile',
config={
'country': 'US',
'state': 'NY',
'city': 'brooklyn'
}
)
```

</CodeGroup>

<Note>
If the city alias is not matched, the API returns examples from the target state to help you find the correct value.
</Note>

### Target by state

Route traffic through a US state:

<CodeGroup>

```typescript Typescript/Javascript
const proxy = await kernel.proxies.create({
type: 'mobile',
name: 'ny-mobile',
config: {
country: 'US',
state: 'NY'
}
});
```

```Python Python
proxy = kernel.proxies.create(
type='mobile',
name='ny-mobile',
config={
'country': 'US',
'state': 'NY'
}
)
```

</CodeGroup>

## Bypass hosts

Configure specific hostnames to bypass the proxy:

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

```python Python
proxy = kernel.proxies.create(
type='mobile',
name='mobile-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.
9 changes: 5 additions & 4 deletions proxies/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ Kernel proxies enable you to route browser traffic through different types of pr

## Proxy Types

Kernel supports four types of proxies:
Kernel supports five types of proxies:

1. [**Datacenter**](/proxies/datacenter) - Traffic routed through commercial data centers
2. [**ISP**](/proxies/isp) - Traffic routed through data centers, using residential IP addresses leased from from internet service providers
3. [**Residential**](/proxies/residential) - Traffic routed through real residential IP addresses
4. [**Custom**](/proxies/custom) - Your own proxy servers
4. [**Mobile**](/proxies/mobile) - Traffic routed through mobile carrier networks
5. [**Custom**](/proxies/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.
Datacenter has the fastest speed, while residential and mobile are least detectable. ISP is a balance between the options, with less-flexible geotargeting. Kernel recommends using the first option in the list that works for your use case.

<Info>
Datacenter and ISP proxies provide a **stable exit IP within a single browser session** — the IP does not rotate mid-session. Across separate sessions, however, Kernel does not guarantee the same exit IP. If you need a truly static IP that persists across every session (for example, an IP allowlist or a [managed auth](/auth/overview) connection whose health checks must egress from a single IP), use a [custom (BYO) proxy](/proxies/custom) pointed at infrastructure you control.

Residential proxies use **rotating exit IPs** that may change per connection — see [Residential Proxies](/proxies/residential#ip-rotation-behavior) for details.
Residential and mobile proxies use **rotating exit IPs** that may change per connection — see [Residential Proxies](/proxies/residential#ip-rotation-behavior) and [Mobile Proxies](/proxies/mobile) for details.
</Info>

## Create a proxy
Expand Down
7 changes: 3 additions & 4 deletions reference/cli/browsers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,10 @@ Create a new proxy configuration.
| `--protocol <protocol>` | Protocol to use (`http` or `https`; default: `https`). |
| `--country <code>` | ISO 3166 country code or `EU`. |
| `--city <name>` | City (residential, mobile; requires `--country`). |
| `--state <code>` | State/region code (residential, mobile). |
| `--zip <zip>` | ZIP/postal code (residential, mobile). |
| `--asn <asn>` | Autonomous system number (residential, mobile). |
| `--state <code>` | State/region code (residential; US-only for mobile). |
| `--zip <zip>` | ZIP/postal code (residential). |
| `--asn <asn>` | Autonomous system number (residential). |
| `--os <os>` | Operating system (`windows`, `macos`, `android`; residential). |
| `--carrier <carrier>` | Mobile carrier (mobile). |
| `--host <host>` | Proxy host (custom; required). |
| `--port <port>` | Proxy port (custom; required). |
| `--username <username>` | Proxy username (custom). |
Expand Down
Loading