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

发送请求

使用 IP、端口、用户名和密码设置,通过 Thordata 静态 ISP 代理发送 HTTP 或 HTTPS 请求,并参考 cURL 和常用编程语言示例。

使用您列表中的静态ISP代理向 https://ipinfo.thordata.com发起请求。请将 USERNAME 和 PASSWORD 替换为您的代理用户凭据。

Make a request to https://ipinfo.thordata.com using static ISP proxies from your list. Replace USERNAME and PASSWORD with your proxy user credentials.

curl -x IP:6666 -U "USERNAME:PASSWORD" "https://ipinfo.thordata.com"

使用 ipinfo.thordata.com检查您的 IP 参数——参数包括 IP 地址、城市、地区、国家、经纬度、组织名称、邮政编码、ASN、时区

请注意,必须严格遵循上述示例中的用户名字符串构建格式才能成功发起请求。务必保持语法结构完全一致,并注意用户名和密码区分大小写。

代码示例

curl -x ip:6666 -U "USERNAME:PASSWORD" "https://ipinfo.thordata.com"
using 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.thordata.com";

        var proxy = new WebProxy("https://ip:6666")
        {
            UseDefaultCredentials = false,
            Credentials = new NetworkCredential(
                userName: "USERNAME",
                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();
        }
    }
}

Last updated