You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proxies/overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ When no longer needed, delete the proxy configuration:
84
84
<DeleteProxySnippet />
85
85
86
86
<Info>
87
-
Deleting a proxy does not affect existing browser sessions that are currently using it. The configuration is only removed from your organization so it can't be used in future browser sessions.
87
+
Deleting a proxy immediately reconfigures associated browsers to route directly to the internet.
-**`state`** - Two-letter state code. Only supported for US.
55
53
-**`city`** - City name (lowercase, no spaces, e.g., `sanfrancisco`, `newyork`).
56
54
-**`zip`** - US ZIP code (5 digits). Conflicts with city and state.
57
-
-**`asn`** - Autonomous System Number. Conflicts with city and state.
55
+
-**`asn`** - Autonomous System Number. Conflicts with city and state.
56
+
57
+
## Advanced Targeting Examples
58
+
59
+
Kernel recommends using the least-specific targeting configuration that works for your use case. The more specific a configuration, the less available IPs there are, increasing the chance of a slow connection or no available connection (`no_peer` connection error).
60
+
61
+
### Target by City
62
+
63
+
Route traffic through a specific city:
64
+
65
+
<CodeGroup>
66
+
67
+
```typescript Typescript/Javascript
68
+
const proxy =awaitkernel.proxies.create({
69
+
type: 'residential',
70
+
name: 'la-residential',
71
+
config: {
72
+
country: 'US',
73
+
state: 'CA',
74
+
city: 'los_angeles'
75
+
}
76
+
});
77
+
```
78
+
79
+
```Python Python
80
+
proxy = client.proxies.create(
81
+
type='residential',
82
+
name='la-residential',
83
+
config={
84
+
'country': 'US',
85
+
'state': 'CA',
86
+
'city': 'los_angeles'
87
+
}
88
+
)
89
+
```
90
+
91
+
</CodeGroup>
92
+
93
+
<Note>
94
+
If the city name is not matched, the API will return the best 10 city names from the state to help you find the correct city identifier.
95
+
</Note>
96
+
97
+
### Target by State
98
+
99
+
Route traffic through a specific state:
100
+
101
+
<CodeGroup>
102
+
103
+
```typescript Typescript/Javascript
104
+
const proxy =awaitkernel.proxies.create({
105
+
type: 'residential',
106
+
name: 'ny-residential',
107
+
config: {
108
+
country: 'US',
109
+
state: 'NY'
110
+
}
111
+
});
112
+
```
113
+
114
+
```Python Python
115
+
proxy = client.proxies.create(
116
+
type='residential',
117
+
name='ny-residential',
118
+
config={
119
+
'country': 'US',
120
+
'state': 'NY'
121
+
}
122
+
)
123
+
```
124
+
125
+
</CodeGroup>
126
+
127
+
<Note>
128
+
If the state name is not matched, the API will return the most-available 10 states.
129
+
</Note>
130
+
131
+
### Target by ASN
132
+
133
+
Route traffic through a specific Autonomous System Number (ISP):
134
+
135
+
<CodeGroup>
136
+
137
+
```typescript Typescript/Javascript
138
+
const proxy =awaitkernel.proxies.create({
139
+
type: 'residential',
140
+
name: 'comcast-residential',
141
+
config: {
142
+
country: 'US',
143
+
asn: 'AS7922'
144
+
}
145
+
});
146
+
```
147
+
148
+
```Python Python
149
+
proxy = client.proxies.create(
150
+
type='residential',
151
+
name='comcast-residential',
152
+
config={
153
+
'country': 'US',
154
+
'asn': 'AS7922'
155
+
}
156
+
)
157
+
```
158
+
159
+
</CodeGroup>
160
+
161
+
<Note>
162
+
If the ASN is not matched, the API will return the most-available 10 examples.
0 commit comments