For the complete documentation index, see llms.txt. This page is also available as Markdown.

选择国家

了解如何定位特定代理位置,以及如何使用轮换逻辑。

如果你想访问来自特定地点的 IP,你必须提供一个 国家 – 参数,并在用户名中使用两位字母的国家代码。以下是 国家 参数。例如,如果你想使用美国国家参数,请添加 country-US.

在下表中查看支持国家的完整列表。

Datacenter per IP 支持的国家列表
国家
国家代码

阿根廷

country-AR

澳大利亚

country-AU

奥地利

country-AT

比利时

country-BE

巴西

country-BR

加拿大

country-CA

智利

country-CL

中国

country-CN

哥伦比亚

country-CO

克罗地亚

country-HR

捷克共和国

country-CZ

丹麦

country-DK

芬兰

country-FI

法国

country-FR

德国

country-DE

印度

country-IN

印度尼西亚

country-ID

爱尔兰

country-IE

以色列

country-IL

意大利

country-IT

日本

country-JP

墨西哥

country-MX

荷兰

country-NL

秘鲁

country-PE

菲律宾

country-PH

波兰

country-PL

葡萄牙

country-PT

罗马尼亚

country-RO

沙特阿拉伯

country-SA

新加坡

country-SG

斯洛伐克

country-SK

西班牙

country-ES

瑞士

country-CH

泰国

country-TH

阿拉伯联合酋长国

country-AE

英国

country-GB

美国

country-US

Datacenter per traffic 支持的国家列表
国家
国家代码

阿根廷

country-AR

澳大利亚

country-AU

奥地利

country-AT

比利时

country-BE

巴西

country-BR

加拿大

country-CA

智利

country-CL

中国

country-CN

哥伦比亚

country-CO

克罗地亚

country-HR

丹麦

country-DK

爱沙尼亚

country-EE

芬兰

country-FI

法国

country-FR

德国

country-DE

希腊

country-GR

匈牙利

country-HU

印度

country-IN

印度尼西亚

country-ID

爱尔兰

country-IE

以色列

country-IL

意大利

country-IT

日本

country-JP

拉脱维亚

country-LV

立陶宛

country-LT

墨西哥

country-MX

荷兰

country-NL

新西兰

country-NZ

挪威

country-NO

秘鲁

country-PE

波兰

country-PL

葡萄牙

country-PT

罗马尼亚

country-RO

沙特阿拉伯

country-SA

新加坡

country-SG

斯洛伐克

country-SK

斯洛文尼亚

country-SI

韩国

country-KR

西班牙

country-ES

瑞典

country-SE

瑞士

country-CH

泰国

country-TH

英国

country-GB

美国

country-US

例如,如果你只想轮换美国代理池,请使用轮换端口 8000 并配合一个参数 country-US 在用户名中:

curl -x dc.oxylabs.io:8000 -U 'user-USERNAME-country-US:PASSWORD' https://ip.oxylabs.io/location

代码示例

curl -x dc.oxylabs.io:8000 -U 'user-USERNAME-country-COUNTRY:PASSWORD' https://ip.oxylabs.io/location
#pip install requests
import requests

username = 'USERNAME'
密码 = 'PASSWORD'
country = 'COUNTRY'
proxy = 'dc.oxylabs.io:8000'

代理 = {
   "https": ('https://user-%s-country-%s:%s@%s' % (username, country, password, proxy))
}

response=requests.get("https://ip.oxylabs.io/location", proxies=proxies)

print(response.content)
//npm install axios
const axios = require("axios");
const https = require("https");

const client = axios.create({
    httpsAgent: new https.Agent({
        rejectUnauthorized: false,
    }),
});
const username = 'USERNAME';
const country = 'COUNTRY'
const password = 'PASSWORD'

client
    .get("https://ip.oxylabs.io/location", {
        proxy: {
            protocol: "https",
            host: "dc.oxylabs.io",
            port: 8000,
            auth: {
                username: `user-${username}-country-${country}`,
                password: password,
            },
        },
    })
    .then((res) => {
        console.log(res.data);
    })
    .catch((err) => console.error(err));

订阅方式之间的差异

Datacenter per IP 提供轮换端口和 国家 参数的用户将收到一个 来自其 Proxy 列表中所选国家的随机 IP ,每次新请求都会更换。 Datacenter per traffic 提供轮换端口和 国家 参数将收到 来自整个代理池中所选国家的随机 IP。

我们使用 MaxMind GeoIP2 数据库来确定 IP 的位置。

最后更新于

这有帮助吗?