> 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/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/bai-ming-dan-bu-sheng-xiao.md).

# 白名单不生效

如果已经添加 IP 白名单，但代理仍然无法连接，通常表示：

```
当前公网 IP 与白名单 IP 不一致
```

这是国内开发者最常见的问题之一。

***

### 一、如何判断白名单未生效？

常见现象：

* [代理无法连接](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dai-li-lian-jie-shi-bai.md)
* [出现 407 错误](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/407-proxy-authentication-required.md)
* 浏览器无法打开网页
* curl 请求失败

***

### 二、最常见原因

#### 1. 添加了错误的公网 IP

很多用户：

```
误把本地局域网 IP 当成公网 IP
```

例如：

```
192.168.x.x
10.x.x.x
172.x.x.x
```

这些都不是公网 IP。

***

#### 正确方式

访问：

```
http://ipinfo.io
```

查看真实公网 IP。

***

### 三、动态公网 IP 变化

部分网络环境：

```
公网 IP 会自动变化
```

例如：

* 家庭宽带
* 手机热点
* 部分云服务器

可能导致：

```
之前添加的白名单失效
```

***

### 四、服务器出口 IP 不一致

很多开发者：

```
本地查看的 IP
与服务器实际出口 IP 不一致
```

尤其：

* Docker
* 云服务器
* Kubernetes
* 多层代理环境

建议：

```bash
curl http://ipinfo.io
```

在实际运行服务器中检查公网 IP。

***

### 五、白名单未生效怎么办？

建议：

```
重新获取公网 IP 后重新添加白名单
```

并等待：

```
1~5 分钟
```

让配置同步。

***

### 六、推荐排查流程

```
1. 检查公网 IP
↓
2. 确认服务器真实出口 IP
↓
3. 重新添加白名单
↓
4. 等待配置同步
↓
5. curl 测试代理
```

***

### 七、推荐测试命令

```bash
curl -x http://us.ipwo.net:7878 http://ipinfo.io
```

如果能正常返回 IP 信息，说明白名单已经生效。

***

### 八、相关文章

* [如何检测本机公网 IP](/huan-jing-zhun-bei/ru-he-jian-ce-ben-ji-gong-wang-ip.md)
* [白名单与本机 IP 说明](/huan-jing-zhun-bei/bai-ming-dan-yu-ben-ji-ip-shuo-ming.md)
* [407 Proxy Authentication Required](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/407-proxy-authentication-required.md)
* [代理连接失败](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dai-li-lian-jie-shi-bai.md)
* [如何检测代理是否生效](/dai-li-jian-ce-yu-yin-si-an-quan/ru-he-jian-ce-dai-li-shi-fou-sheng-xiao.md)
* [为什么需要海外网络环境](/dai-li-ji-chu-zhi-shi/wei-shen-me-xu-yao-hai-wai-wang-luo-huan-jing.md)


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.ipwo.net/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/bai-ming-dan-bu-sheng-xiao.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
