# 发送请求

### 测试指令请求

专享数据中心代理

```
curl -x IP:端口号 -U "USERNAME:PASSWORD" "https://ipinfo.thordata.com"
```

共享数据中心代理

```
curl -x "https://td-customer-USERNAME:PASSWORD@host:端口号" "https://ipinfo.thordata.com"
```

回显

<figure><img src="/files/63zbFSY20PgeBjIr9sqC" alt=""><figcaption></figcaption></figure>

### 浏览器请求（以 Chrome 为例）

1. 打开 Chrome 设置 → 系统 → 点击 “打开您计算机的代理设置”。
2. 在系统网络设置中，启用手动代理配置。
3. 输入代理服务器的 IP 地址 和 端口。
4. 当浏览器弹出认证窗口时，输入您的代理 用户名 和 密码。

配置完成后，访问 [https://ipinfo.thordata.com](https://ipinfo.thordata.com/) 验证当前IP是否已变为代理IP。

如需要更多三方集成工具的教程可进入 [集成教程](/doc/zh/proxies/ji-cheng-jiao-cheng/shu-ju-zhong-xin-dai-li-ji-cheng.md)

回显

<figure><img src="/files/eAntk59RZpvY2tfeYO53" alt=""><figcaption></figcaption></figure>

### 代码请求

以python为例，用户输入{username}:{password}{proxy\_server}即可使用

```
import requests

username = "账号-continent-大洲参数-country-国家/地区参数-state-州参数-city-城市参数"
password = "密码"
proxy_server = "host:端口号"


proxies = {"http": f"http://{username}:{password}@{proxy_server}"}
response = requests.get("http://ipinfo.thordata.com", proxies=proxies)
print(response.text)
```

回显

<figure><img src="/files/w03o1l9Xah7pSUmJ4FLH" alt=""><figcaption></figcaption></figure>

### 共享代理特定参数（URL拼接）

仅共享代理支持在连接字符串中通过`参数`指定详细位置和会话规则。

代码示例：

```
curl -x "host:端口号" -U "td-customer-USERNAME-continent-大洲参数-country-国家/地区参数-state-州参数-city-城市参数-asn-运营商参数-sessid-粘性IP-sesstime-会话时长PASSWORD" "https://ipinfo.thordata.com"
```

| 查询参数      | 说明                                 |
| --------- | ---------------------------------- |
| username  | 代理帐户用户名                            |
| host      | 主机名                                |
| continent | 大洲，随机地区无此参数                        |
| country   | 国家 / 地区，随机地区无此参数（使用 2 个字母的国家代码）    |
| state     | 州，随机地区无此参数                         |
| city      | 您要指定的城市，可不带 “state” 参数使用           |
| session   | 粘性 IP 和 IP 所需，用于在固定 IP 或切换时查找特定 IP |
| sessTime  | 与会话一起使用来设置 IP 持续时间，最长为 90 分钟       |
| password  | 代理账户密码                             |
| asn       | 指定国家的 ISP 运营商，随机无此参数               |


---

# 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/shu-ju-zhong-xin-dai-li/fa-song-qing-qiu.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.
