Skip to content

Commit 4bc5ca8

Browse files
authored
Document mobile proxies (#378)
* Document mobile proxies * Apply suggestion from @sjmiller609 * Document mobile proxies --------- Co-authored-by: sjmiller609 <7516283+sjmiller609@users.noreply.github.com>
1 parent 0356c9b commit 4bc5ca8

4 files changed

Lines changed: 173 additions & 10 deletions

File tree

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@
139139
"proxies/overview",
140140
"proxies/custom",
141141
"proxies/residential",
142+
"proxies/mobile",
142143
"proxies/isp",
143144
"proxies/datacenter"
144145
]

proxies/mobile.mdx

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
---
2+
title: "Mobile Proxies"
3+
---
4+
5+
Mobile proxies route traffic through mobile carrier networks. Only recommended in advanced stealth use cases.
6+
7+
<Info>
8+
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.
9+
</Info>
10+
11+
## Configuration
12+
13+
Create a mobile proxy with a target country:
14+
15+
<CodeGroup>
16+
```typescript Typescript/Javascript
17+
import Kernel from '@onkernel/sdk';
18+
19+
const kernel = new Kernel();
20+
21+
const proxy = await kernel.proxies.create({
22+
type: 'mobile',
23+
name: 'my-us-mobile',
24+
config: {
25+
country: 'US'
26+
}
27+
});
28+
29+
const browser = await kernel.browsers.create({
30+
proxy_id: proxy.id,
31+
});
32+
```
33+
34+
```python Python
35+
from kernel import Kernel
36+
37+
kernel = Kernel()
38+
39+
proxy = kernel.proxies.create(
40+
type='mobile',
41+
name='my-us-mobile',
42+
config={
43+
'country': 'US'
44+
}
45+
)
46+
47+
browser = kernel.browsers.create(proxy_id=proxy.id)
48+
```
49+
</CodeGroup>
50+
51+
## Configuration parameters
52+
53+
- **`country`** - ISO 3166 country code. Must be provided when providing other targeting options.
54+
- **`state`** - US-only two-letter state code. Best-effort for mobile proxies.
55+
- **`city`** - Provider city alias, such as `brooklyn` or `chicago`. Best-effort for mobile proxies.
56+
- **`bypass_hosts`** (optional) - Array of hostnames that bypass the proxy and connect directly (max 100 entries)
57+
58+
## Advanced targeting examples
59+
60+
### Target by city
61+
62+
Route traffic through a specific city:
63+
64+
<CodeGroup>
65+
66+
```typescript Typescript/Javascript
67+
const proxy = await kernel.proxies.create({
68+
type: 'mobile',
69+
name: 'brooklyn-mobile',
70+
config: {
71+
country: 'US',
72+
state: 'NY',
73+
city: 'brooklyn'
74+
}
75+
});
76+
```
77+
78+
```Python Python
79+
proxy = kernel.proxies.create(
80+
type='mobile',
81+
name='brooklyn-mobile',
82+
config={
83+
'country': 'US',
84+
'state': 'NY',
85+
'city': 'brooklyn'
86+
}
87+
)
88+
```
89+
90+
</CodeGroup>
91+
92+
<Note>
93+
If the city alias is not matched, the API returns examples from the target state to help you find the correct value.
94+
</Note>
95+
96+
### Target by state
97+
98+
Route traffic through a US state:
99+
100+
<CodeGroup>
101+
102+
```typescript Typescript/Javascript
103+
const proxy = await kernel.proxies.create({
104+
type: 'mobile',
105+
name: 'ny-mobile',
106+
config: {
107+
country: 'US',
108+
state: 'NY'
109+
}
110+
});
111+
```
112+
113+
```Python Python
114+
proxy = kernel.proxies.create(
115+
type='mobile',
116+
name='ny-mobile',
117+
config={
118+
'country': 'US',
119+
'state': 'NY'
120+
}
121+
)
122+
```
123+
124+
</CodeGroup>
125+
126+
## Bypass hosts
127+
128+
Configure specific hostnames to bypass the proxy:
129+
130+
<CodeGroup>
131+
```typescript Typescript/Javascript
132+
const proxy = await kernel.proxies.create({
133+
type: 'mobile',
134+
name: 'mobile-with-bypass',
135+
config: {
136+
country: 'US',
137+
},
138+
bypass_hosts: [
139+
'localhost',
140+
'metadata.google.internal',
141+
'*.internal.company.com',
142+
],
143+
});
144+
```
145+
146+
```python Python
147+
proxy = kernel.proxies.create(
148+
type='mobile',
149+
name='mobile-with-bypass',
150+
config={
151+
'country': 'US',
152+
},
153+
bypass_hosts=[
154+
'localhost',
155+
'metadata.google.internal',
156+
'*.internal.company.com',
157+
]
158+
)
159+
```
160+
</CodeGroup>
161+
162+
See the [overview](/proxies/overview#bypass-hosts) for full bypass host rules and examples.

proxies/overview.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@ Kernel proxies enable you to route browser traffic through different types of pr
66

77
## Proxy Types
88

9-
Kernel supports four types of proxies:
9+
Kernel supports five types of proxies:
1010

1111
1. [**Datacenter**](/proxies/datacenter) - Traffic routed through commercial data centers
1212
2. [**ISP**](/proxies/isp) - Traffic routed through data centers, using residential IP addresses leased from from internet service providers
1313
3. [**Residential**](/proxies/residential) - Traffic routed through real residential IP addresses
14-
4. [**Custom**](/proxies/custom) - Your own proxy servers
14+
4. [**Mobile**](/proxies/mobile) - Traffic routed through mobile carrier networks
15+
5. [**Custom**](/proxies/custom) - Your own proxy servers
1516

16-
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.
17+
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.
1718

1819
<Info>
1920
ISP proxies provide a **static exit IP that persists across sessions** — every browser session attached to the proxy exits through the same IP, and it only changes in rare ISP-initiated replacement events. This makes them suitable for IP allowlists or [managed auth](/auth/overview) health checks that must egress from a single IP.
2021

2122
Datacenter proxies use **rotating exit IPs** — a new exit IP is assigned per request, so different requests within the same browser session can exit through different IPs. For a stable IP across requests and sessions, use an ISP proxy or a [custom (BYO) proxy](/proxies/custom) pointed at infrastructure you control.
2223

23-
Residential proxies use **rotating exit IPs** that may change per connection — see [Residential Proxies](/proxies/residential#ip-rotation-behavior) for details.
24+
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.
2425
</Info>
2526

2627
## Create a proxy

reference/cli/proxies.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ Create a new proxy configuration. Proxy quality for bot detection avoidance, bes
2727
| `--name <name>` | Proxy configuration name. |
2828
| `--protocol <protocol>` | Protocol to use (`http` or `https`; default: `https`). |
2929
| `--country <code>` | ISO 3166 country code or `EU`. |
30-
| `--city <name>` | City name without spaces (e.g. `sanfrancisco`). Requires `--country`. |
31-
| `--state <code>` | Two-letter state code. |
32-
| `--zip <zip>` | US ZIP code. |
33-
| `--asn <asn>` | Autonomous system number (e.g. `AS15169`). |
34-
| `--os <os>` | Operating system (`windows`, `macos`, `android`). |
35-
| `--carrier <carrier>` | Mobile carrier. |
30+
| `--city <name>` | City name or provider alias. Residential and mobile; requires `--country`. |
31+
| `--state <code>` | State/region code. Residential, or US-only for mobile. |
32+
| `--zip <zip>` | ZIP/postal code. Residential only. |
33+
| `--asn <asn>` | Autonomous system number (e.g. `AS15169`). Residential only. |
34+
| `--os <os>` | Operating system (`windows`, `macos`, `android`). Residential only. |
3635
| `--host <host>` | Proxy host address or IP (`custom` type). |
3736
| `--port <port>` | Proxy port (`custom` type). |
3837
| `--username <username>` | Username for proxy authentication (`custom` type). |

0 commit comments

Comments
 (0)