> 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/huo-qu-yu-pei-zhi-dai-li/nian-xing-ip.md).

# 粘性IP

粘性 IP 是指在一定时间内持续使用同一个 IP 地址。

👉 适用于需要保持会话一致性的场景（如登录、账号操作等）

***

### ⚙️ 账密认证中如何配置粘性IP

粘性 IP 在创建或配置代理时进行设置：

```
账密认证 → 选择「粘性 IP」 → 生成代理凭证
```

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

👉 与「轮换 IP」为二选一配置

***

### 🔒 使用方式

启用粘性 IP 后，可以通过参数控制 IP 保持行为：

* `sid` → 会话标识（用于固定 IP）
* `time` → IP 保持时间（单位：分钟）

***

#### 📌 示例

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

👉 在 `time` 有效期内，相同 `sid` 将使用同一个 IP

***

### ✅ 适用场景

* 登录 / 账号操作
* 会话保持（Session）
* 表单提交 / 支付流程
* 需要稳定 IP 的业务

***

### 💡 优点

* IP 稳定，不频繁变化
* 减少登录异常 / 验证触发
* 提高账号安全性

***

### ⚠️ 注意事项

* IP 会在 `time` 到期后自动更换
* 更换 `sid` 会分配新的 IP
* 不适合高并发、大规模采集

***

### ❗ 常见问题

#### 为什么 IP 没有变化？

👉 使用了相同 `sid`（正常现象）

***

#### 如何更换 IP？

👉 修改 `sid` 或等待 `time` 到期

***

#### 可以一直使用同一个 IP 吗？

👉 取决于 `time` 设置，超过时间会自动更换

***

### ⚖️ 与轮换 IP 对比

| 模式    | 特点         |
| ----- | ---------- |
| 轮换 IP | 每次请求更换 IP  |
| 粘性 IP | 一段时间内固定 IP |

***

### 👉 下一步

* 查看「[轮换 IP](/huo-qu-yu-pei-zhi-dai-li/lun-huan-ip.md)」→ 自动切换 IP
* 查看「[参数说明](/kai-fa-zhe-wen-dang/api-shi-yong-zhi-nan/dai-li-can-shu-shuo-ming.md)」→ 了解 sid / time
* 查看「[快速验证](/kai-fa-zhe-wen-dang/kuai-su-kai-shi/kuai-su-yan-zheng.md)

  <figure><img src="/files/1AsCYbya1gnEF4aZsrnR" alt=""><figcaption></figcaption></figure>

  」→ 测试代理效果

***

### 总结

粘性 IP 的核心特点：

* 在一定时间内保持同一个 IP
* 通过 `sid` 和 `time` 控制
* 适用于需要稳定连接的场景

👉 是账号类业务的推荐方案

***


---

# 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/huo-qu-yu-pei-zhi-dai-li/nian-xing-ip.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.
