> For the complete documentation index, see [llms.txt](https://docs.ipwo.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipwo.net/dai-li-ji-chu-zhi-shi/shen-me-shi-sui-dao-dai-li.md).

# 什么是隧道代理

## 什么是隧道代理？

隧道代理（Tunnel Proxy）是一种通过统一代理入口动态获取代理 IP 的代理服务方式。

简单来说：

👉 用户只需要连接一个固定的代理地址，即可通过不同参数获取不同 IP。

***

### 🌍 隧道代理的工作原理

传统代理通常是：

```
一个 IP
↓
一个代理地址
```

而隧道代理：

```
统一代理入口
↓
代理服务器动态分配 IP
↓
访问目标网站
```

👉 用户无需频繁更换代理地址。

***

### ⚙️ 隧道代理包含哪些内容？

通常包括：

* Host
* Port
* Username
* Password

***

### 🔄 为什么叫“隧道”？

因为请求会先进入：

```
代理隧道服务器
```

然后系统再自动：

* 分配 IP
* 选择国家地区
* 管理会话连接

就像通过“隧道”连接到不同网络出口。

***

### 🌐 隧道代理有什么特点？

隧道代理通常支持：

* 自动切换 IP
* 动态国家地区
* [粘性会话](/huo-qu-yu-pei-zhi-dai-li/nian-xing-ip.md)
* 用户名参数控制
* 一个入口管理多个 IP

***

### ⚡ 隧道代理示例

```bash
curl -x "us.ipwo.net:7878" -U "username:password" ipinfo.io
```

***

### 📌 为什么用户名中有很多参数？

例如：

```
username_custom_zone_US_sid_12345_time_10
```

这些属于：

👉 隧道代理参数。

***

### 🔍 常见参数说明

| 参数    | 作用    |
| ----- | ----- |
| zone  | 国家地区  |
| sid   | 会话 ID |
| time  | 粘性时间  |
| city  | 城市    |
| state | 州     |

***

### 🌍 如何切换国家地区？

例如：

```
username_custom_zone_US
```

表示：

👉 获取美国 IP。

***

#### 日本 IP 示例

```
username_custom_zone_JP
```

👉 获取日本 IP。

***

### 🔄 什么是[粘性会话](/huo-qu-yu-pei-zhi-dai-li/nian-xing-ip.md)？

例如：

```
sid_12345_time_30
```

表示：

* 使用固定会话 ID
* IP 保持 30 分钟不变

👉 适合账号运营场景。

***

### ⚡ 什么是[轮换 IP](/huo-qu-yu-pei-zhi-dai-li/lun-huan-ip.md)？

如果不固定会话：

👉 系统会自动轮换 IP。

适合：

* [数据采集](/ying-yong-chang-jing/shu-ju-cai-ji.md)
* [SEO 监控](/ying-yong-chang-jing/seo-jian-kong.md)
* 高频请求

***

### 🏠 隧道代理为什么适合住宅代理？

因为：

👉 可以通过统一入口动态分配大量住宅 IP。

用户无需：

* 手动维护 IP
* 频繁切换代理地址

***

### 💡 隧道代理的优势

相比传统代理：

| 传统代理        | 隧道代理        |
| ----------- | ----------- |
| 一个代理对应一个 IP | 一个入口对应多个 IP |
| 切换复杂        | 自动切换        |
| 管理麻烦        | 使用简单        |

***

### ⚙️ 常见应用场景

隧道代理广泛应用于：

* [数据采集](/ying-yong-chang-jing/shu-ju-cai-ji.md)
* [SEO监控](/ying-yong-chang-jing/seo-jian-kong.md)
* [社媒运营](/ying-yong-chang-jing/tiktok-yun-ying.md)
* [跨境电商](/ying-yong-chang-jing/amazon-dian-pu-guan-li.md)
* [多账号管理](/ying-yong-chang-jing/duo-zhang-hao-guan-li.md)
* [AI数据训练](/ying-yong-chang-jing/ai-shu-ju-xun-lian.md)

***

### ❗ 常见问题

#### 为什么只有一个 Host？

因为：

👉 IP 是由隧道服务器动态分配的。

***

#### 为什么切换参数后 IP 会变化？

因为：

👉 隧道代理会根据参数重新分配 IP。

***

#### 隧道代理一定会自动换 IP 吗？

不一定。

* 固定会话 → IP 保持不变
* 非固定会话 → 自动轮换 IP

***

### 🆘 遇到问题怎么办？

如果出现：

* [IP 不生效](/gu-zhang-pai-chu/ip-bu-sheng-xiao.md)
* 国家地区错误
* 无法切换 IP

建议优先检查：

* 用户名参数格式
* 会话参数
* 国家代码是否正确

***

### 总结

隧道代理的核心原理：

```
统一代理入口
↓
用户名参数控制
↓
动态分配代理 IP
```

👉 隧道代理能够让代理使用更加灵活、高效

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.ipwo.net/dai-li-ji-chu-zhi-shi/shen-me-shi-sui-dao-dai-li.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.
