# 入门指南

### **简介**

**Thordata 高带宽代理**服务整合全球**70**多个地区的真实住宅 IP 资源。提供1**00+Gbps**带宽的大规模视频抓取服务，无缝处理各大视频平台海量数据，性能稳定可靠。

要使用我们的高带宽代理进行音视频数据抓取，请联系**销售团队：**&#x83B7;取您的专属代理端点。我们将为每位客户分配一个根据实际需求定制的独立代理节点，确保服务高效稳定

### 端点配置

在账户管理团队向您提供端点后，您将获得：

* 一个专用的代理端点
* 您的用户名和密码
* 端口号

### **认证方式**

动态住宅代理支持两种**认证方式**：

* [<mark style="color:blue;">**账密认证**</mark>](/doc/zh/proxies/gao-dai-kuan-dai-li/zhang-mi-ren-zheng.md)
* [<mark style="color:blue;">**白名单IP**</mark>](/doc/zh/proxies/gao-dai-kuan-dai-li/bai-ming-dan-ip.md)

### 为每次下载设置会话

为确保最佳成功率，高带宽代理在每次会话期间会自动进行负载均衡。只需在用户名后添加 `sessid-[自定义会话标识]+sesstime-[持续时间]` 参数，系统便会生成一个随机数作为会话 ID，并为每次下载自动分配不同的 IP 地址。

{% tabs %}
{% tab title="cURL" %}

```sh
curl -x "https://td-customer-USERNAME-country-us-sessid-a123123-sesstime-10:PASSWORD@t.thordata.online:9999" "https://ipinfo.thordata.com"
```

{% endtab %}

{% tab title="C#" %}

```csharp
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://t.thordata.online:9999")
        {
            UseDefaultCredentials = false,
            Credentials = new NetworkCredential(
                userName: "td-customer-USERNAME-country-us-sessid-a123123-sesstime-10",
                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();
        }
    }
}
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
)

const (
	resourceUrl = "https://ipinfo.thordata.com"
	proxyHost   = "t.thordata.online:9999"
	username    = "td-customer-USERNAME-country-us-sessid-a123123-sesstime-10"
	password    = "PASSWORD"
)

func main() {
	proxyUrl := &url.URL{
		Scheme: "https",
		User:   url.UserPassword(username, password),
		Host:   proxyHost,
	}

	client := http.Client{
		Transport: &http.Transport{
			Proxy: http.ProxyURL(proxyUrl),
		},
	}

	resp, err := client.Get(resourceUrl)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}

	bodyString := string(body)
	fmt.Println(bodyString)
}
```

{% endtab %}

{% tab title="Java" %}

```java
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
import org.apache.http.util.EntityUtils;

import java.io.IOException;

public class JavaHttps {
    public static final String username = "td-customer-USERNAME-country-us-sessid-a123123-sesstime-10";
    public static final String password = "PASSWORD";
    public static final int port = 9999;
    public static final String proxyHost = "t.thordata.online";
    public CloseableHttpClient client;

    public JavaHttps() {
        HttpHost proxy = new HttpHost(proxyHost, port, "https");
        CredentialsProvider cred_provider = new BasicCredentialsProvider();
        cred_provider.setCredentials(new AuthScope(proxy),
                new UsernamePasswordCredentials(username, password));
        client = HttpClients.custom()
                .setConnectionManager(new BasicHttpClientConnectionManager())
                .setProxy(proxy)
                .setDefaultCredentialsProvider(cred_provider)
                .build();
    }

    public String request(String url) throws IOException {
        HttpGet request = new HttpGet(url);
        CloseableHttpResponse response = client.execute(request);
        try {
            return EntityUtils.toString(response.getEntity());
        } finally { response.close(); }
    }

    public void close() throws IOException { client.close(); }

    public static void main(String[] args) throws IOException {
        JavaHttps client = new JavaHttps();
        try {
            System.out.println(client.request("https://ipinfo.thordata.com"));
        } finally { client.close(); }
    }
}

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
  $url = 'https://ipinfo.thordata.com';
  $proxy = 't.thordata.online';
  $port = 9999;
  $user = 'td-customer-USERNAME-country-us-sessid-a123123-sesstime-10';
  $psw = 'PASSWORD';

  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  curl_setopt($ch, CURLOPT_PROXY, "$proxy:$port");
  curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$user:$psw");
  $result = curl_exec($ch);
  curl_close($ch);

  if ($result)
  {
      echo $result . PHP_EOL;
  }
?>
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

username = "td-customer-USERNAME-country-us-sessid-a123123-sesstime-10"
password = "PASSWORD"
proxy_server = "t.thordata.online:9999"

proxies = {"https": f"https://{username}:{password}@{proxy_server}"}

response = requests.get("https://ipinfo.thordata.com", proxies=proxies)
print(response.text)
```

{% endtab %}

{% tab title="Node.js" %}

```
const rp = require('request-promise');

const username = "td-customer-USERNAME-country-us-sessid-a123123-sesstime-10";
const password = "PASSWORD";
const proxyServer = "t.thordata.online:9999";

rp({
    url: 'https://ipinfo.thordata.com',
    proxy: `https://${username}:${password}@${proxyServer}`,
})
.then(function(data) {
    console.log(data);
})
.catch(function(err) {
    console.error(err);
});
```

{% endtab %}

{% tab title="Untitled" %}

```ruby
require "uri"
require 'net/http'
require 'openssl'

proxy_host = 't.thordata.online'
proxy_port = 9999
proxy_user = 'td-customer-USERNAME-country-us-sessid-a123123-sesstime-10'
proxy_pass = 'PASSWORD'

uri = URI.parse('https://ipinfo.thordata.com')

proxy = Net::HTTP::Proxy(proxy_host, proxy_port, proxy_user, proxy_pass)

req = Net::HTTP::Get.new(uri)

result = proxy.start(uri.host, uri.port, use_ssl: true, ssl_version: :TLSv1_2) do |http|
  http.request(req)
end

puts result.body
```

{% endtab %}
{% endtabs %}

如需将代理直接集成到 yt-dlp 等工具中，请参阅以下页面：

**需要帮助？**

如果您需要进一步说明或位置定位方面的帮助，请随时通过以下方式与我们联系：

**Email**: <mark style="color:blue;">**<support@thordata.com>**</mark>

**Live Chat**:Thordata 在 [<mark style="color:blue;">**官网**</mark>](https://www.thordata.com/) 提供24/7 Live Chat


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.thordata.com/doc/zh/proxies/gao-dai-kuan-dai-li/ru-men-zhi-nan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
