> 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/ip-bu-sheng-xiao.md).

# IP 不生效

使用代理后，如果发现：

```
IP 仍然是本机公网 IP
```

通常表示：

```
请求没有真正经过代理
```

这是开发者与浏览器用户最常见的问题之一。

***

### 一、如何判断 IP 未生效？

访问：

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

如果显示：

* 本机 IP
* 本地运营商
* 中国地区

说明代理未成功生效。

***

### 二、常见原因

#### 1. 未正确配置代理

请检查：

* Host
* 端口
* 用户名
* 密码

***

#### 正确 cURL 示例

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

***

#### 2. 程序未走代理

很多开发者：

```
只配置了代理
但代码请求未使用代理
```

***

#### Python 正确示例

```python
proxies = {
    "http": "http://username_custom_zone_us:password@us.ipwo.net:7878",
    "https": "http://username_custom_zone_us:password@us.ipwo.net:7878"
}
```

***

#### 3. 浏览器插件未生效

常见情况：

* 插件未开启
* 规则模式错误
* 仅部分网站走代理

***

#### 4. HTTP / SOCKS5 配置错误

例如：

* SOCKS5 当 HTTP 使用
* 代理协议填写错误

***

#### 5. 本地网络缓存

浏览器可能缓存：

* DNS
* 连接
* Cookie

建议：

```
重启浏览器后重新测试
```

***

### 三、推荐排查方式

建议先使用 curl 测试：

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

如果 curl 已成功切换 IP：

```
说明代理本身正常
```

问题通常在：

* 浏览器
* 插件
* 代码配置

***

### 四、推荐检测网站

| 网站              | 用途        |
| --------------- | --------- |
| ipinfo.io       | 查看 IP 与地区 |
| api.ipify.org   | 获取纯 IP    |
| browserscan.net | 浏览器环境检测   |

***

### 五、推荐排查流程

```
1. curl 测试代理
↓
2. 检查 IP 是否变化
↓
3. 检查代码代理配置
↓
4. 检查浏览器插件
↓
5. 重启浏览器重新测试
```

***

### 六、相关文章

* [如何检测代理是否生效](/dai-li-jian-ce-yu-yin-si-an-quan/ru-he-jian-ce-dai-li-shi-fou-sheng-xiao.md)
* [如何检测 IP 地区](/dai-li-jian-ce-yu-yin-si-an-quan/ru-he-jian-ce-ip-di-qu.md)
* [代理连接失败](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dai-li-lian-jie-shi-bai.md)
* [407 Proxy Authentication Required](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/407-proxy-authentication-required.md)
* [HTTP 与 SOCKS5 区别](/dai-li-ji-chu-zhi-shi/http-yu-socks5-qu-bie.md)
* [浏览器检测失败](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/liu-lan-qi-jian-ce-shi-bai.md)
