国家/地区
IPIDEA支持用户在代理路由中设置country参数,指定国家/地区的住宅IP进行传输。参数值采用3166-1 alpha-2双字母国家代码(不区分大小写),例如:US美国代理、GB英国代理、VN越南代理。更多信息请参考下方示例。
点击此处查看支持的国家/地区列表
以下是几个国家参数的示例:
国家/地区
国家/地区参数
德国
country-DE
印度
country-IN
泰国
country-TH
韩国
country-KR
日本
country-JP
代码示例:
使用来自美国的随机IP地址执行对ipinfo.ipidea.com的查询:
curl -x "https://td-customer-USERNAME-country-us:[email protected]:9999" "https://ipinfo.ipidea.comusing System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
class csharp_https
{
static void Main(string[] args)
{
Task t = new Task(DownloadPageAsync);
t.Start();
Console.ReadLine();
}
static async void DownloadPageAsync()
{
string page = "https://ipinfo.ipidea.com";
var proxy = new WebProxy("https://t.ipidea.online:9999")
{
UseDefaultCredentials = false,
Credentials = new NetworkCredential(
userName: "td-customer-USERNAME-country-us",
password: "PASSWORD")
};
var httpClientHandler = new HttpClientHandler()
{
Proxy = proxy,
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
var client = new HttpClient(handler: httpClientHandler, disposeHandler: true);
var response = await client.GetAsync(page);
using (HttpContent content = response.Content)
{
string result = await content.ReadAsStringAsync();
Console.WriteLine(result);
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}点击下方文件查看国家完整列表:
最后更新于