Geo targeting
Geo targeting lets you route traffic through mobile IPs in specific countries.
Benefits
- Geographic IP diversity: Distribute requests across IPs from different countries to avoid concentration patterns that trigger blocks.
- Test localized experiences: Verify that your application behaves correctly for users in different countries.
Geo target IPs using the Aluvia client
Use updateTargetGeo() to change your target country at runtime:
await client.updateTargetGeo("us"); // Target United States
await client.updateTargetGeo("de"); // Switch to Germany
await client.updateTargetGeo(null); // Clear geo targeting
Changes take effect immediately—no restart required.
See Manage Connections for examples.
Geo target IPs using the -geo parameter
In instances where you cannot use the SDK or API (e.g., using a third-party proxy client), you can geo target IPs by adding the -geo parameter and a geography to your connection's username.
myusername-geo-de
This format works with any HTTP client that supports proxy authentication.
Available countries
| Code | Country |
|---|---|
af | Afghanistan |
al | Albania |
dz | Algeria |
ao | Angola |
ag | Antigua and Barbuda |
ar | Argentina |
am | Armenia |
au | Australia |
at | Austria |
az | Azerbaijan |
bs | Bahamas |
bh | Bahrain |
bd | Bangladesh |
bb | Barbados |
by | Belarus |
be | Belgium |
bz | Belize |
bj | Benin |
bt | Bhutan |
bo | Bolivia |
ba | Bosnia and Herzegovina |
bw | Botswana |
br | Brazil |
bg | Bulgaria |
bf | Burkina Faso |
kh | Cambodia |
cm | Cameroon |
ca | Canada |
ky | Cayman Islands |
td | Chad |
cl | Chile |
cn | China |
co | Colombia |
km | Comoros |
cg | Congo |
cd | DR Congo |
ck | Cook Islands |
cr | Costa Rica |
ci | Ivory Coast |
hr | Croatia |
cu | Cuba |
cw | Curaçao |
cy | Cyprus |
cz | Czechia |
dk | Denmark |
dj | Djibouti |
dm | Dominica |
do | Dominican Republic |
ec | Ecuador |
eg | Egypt |
sv | El Salvador |
ee | Estonia |
sz | Eswatini |
et | Ethiopia |
fj | Fiji |
fi | Finland |
fr | France |
pf | French Polynesia |
ga | Gabon |
gm | Gambia |
ge | Georgia |
de | Germany |
gh | Ghana |
gr | Greece |
gd | Grenada |
gp | Guadeloupe |
gt | Guatemala |
gn | Guinea |
gw | Guinea-Bissau |
gy | Guyana |
ht | Haiti |
hn | Honduras |
hk | Hong Kong |
hu | Hungary |
is | Iceland |
in | India |
id | Indonesia |
iq | Iraq |
ie | Ireland |
im | Isle of Man |
il | Israel |
it | Italy |
jm | Jamaica |
jp | Japan |
je | Jersey |
jo | Jordan |
kz | Kazakhstan |
ke | Kenya |
kr | South Korea |
kw | Kuwait |
kg | Kyrgyzstan |
la | Laos |
lv | Latvia |
lb | Lebanon |
ls | Lesotho |
ly | Libya |
lt | Lithuania |
lu | Luxembourg |
mo | Macau |
mg | Madagascar |
mw | Malawi |
my | Malaysia |
mv | Maldives |
ml | Mali |
mt | Malta |
mr | Mauritania |
mu | Mauritius |
mx | Mexico |
md | Moldova |
mn | Mongolia |
me | Montenegro |
ma | Morocco |
mz | Mozambique |
mm | Myanmar |
na | Namibia |
np | Nepal |
nl | Netherlands |
nz | New Zealand |
ni | Nicaragua |
ne | Niger |
ng | Nigeria |
mk | North Macedonia |
mp | Northern Mariana Islands |
no | Norway |
om | Oman |
pk | Pakistan |
ps | Palestine |
pa | Panama |
pg | Papua New Guinea |
py | Paraguay |
pe | Peru |
ph | Philippines |
pl | Poland |
pt | Portugal |
pr | Puerto Rico |
qa | Qatar |
ro | Romania |
ru | Russia |
rw | Rwanda |
vc | Saint Vincent and the Grenadines |
ws | Samoa |
sa | Saudi Arabia |
sn | Senegal |
rs | Serbia |
sc | Seychelles |
sl | Sierra Leone |
sg | Singapore |
sk | Slovakia |
si | Slovenia |
so | Somalia |
za | South Africa |
es | Spain |
lk | Sri Lanka |
sd | Sudan |
sr | Suriname |
se | Sweden |
ch | Switzerland |
sy | Syria |
tw | Taiwan |
tj | Tajikistan |
tz | Tanzania |
th | Thailand |
tg | Togo |
tt | Trinidad and Tobago |
tn | Tunisia |
tr | Turkey |
ug | Uganda |
ua | Ukraine |
ae | United Arab Emirates |
gb | United Kingdom |
us | United States |
uy | Uruguay |
uz | Uzbekistan |
ve | Venezuela |
vn | Vietnam |
vg | British Virgin Islands |
vi | U.S. Virgin Islands |
ye | Yemen |
zm | Zambia |
zw | Zimbabwe |
Get available countries programmatically
Use the API to get the current list of available countries:
import { AluviaApi } from "@aluvia/sdk";
const api = new AluviaApi({ apiKey: process.env.ALUVIA_API_KEY! });
const geos = await api.geos.list();
for (const geo of geos) {
console.log(`${geo.code}: ${geo.label}`);
}
Related
- Connections — Understand connection attributes including
target_geo