城市
我们支持将IP精准至城市级定位,只需要使用city参数。例如:country-US-city-houston表示来自美国休斯顿的IP。
以下是一些城市参数的有效示例:
国家-城市
国家-城市参数
德国-慕尼黑
country-DE-city-munich
印度-新德里
country-IN-city-delhi
泰国-曼谷
country-TH-city-bangkok
韩国-首尔
country-KR-city-seoul
日本-东京
country-JP-city-tokyo
代码示例:
使用来自美国休斯顿的随机IP地址对ipinfo.ipidea.com执行查询
curl -x "https://td-customer-USERNAME-country-US-city-houston:[email protected]:9999" "https://ipinfo.ipidea.cosusing System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class csharp_http_region
{
static void Main(string[] args)
{
Task t = new Task(DownloadPageAsync);
t.Start();
Console.ReadLine();
}
static async void DownloadPageAsync()
{
string page = "https://ipinfo.ipidea.com";
String username = "username";
String password = "password";
String country = "us";
String city = "houston";
String proxyUserName = $"td-customer-{username}-country-{country}-city-{city}";
var proxy = new WebProxy("http://t.ipidea.online:9999")
{
UseDefaultCredentials = false,
Credentials = new NetworkCredential(
userName: proxyUserName,
password: password)
};
var httpClientHandler = new HttpClientHandler()
{
Proxy = proxy,
};
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();
}
}
}点击下方文件查看完整的城市列表:
最后更新于