> 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/ru-he-kuai-su-ding-wei-wen-ti.md).

# 如何快速定位问题

当代理使用出现异常时（如[无法连接](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dai-li-lian-jie-shi-bai.md)、[IP不生效](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/ip-bu-sheng-xiao.md)、报错等），不要直接改配置，建议按固定顺序排查，可以快速定位问题在哪一层。

***

### 一、问题定位总流程（推荐）

```
1. 网络是否可用
↓
2. 代理是否连通
↓
3. 认证是否成功
↓
4. IP是否生效
↓
5. 目标网站是否拦截
```

***

#### 第一步：确认网络环境

先确认本机是否能正常访问外网：

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

如果无法访问：

```
说明不是代理问题，是本地网络问题
```

***

#### 第二步：测试代理是否连通（关键）

使用标准 curl 测试：

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

***

**✔ 正常情况**

返回：

```json
{
  "ip": "xx.xx.xx.xx",
  "country": "US"
}
```

说明：

```
代理已正常生效
```

***

**❌ 如果失败**

进入下一步排查。

***

#### 第三步：判断错误类型

根据报错快速定位：

| 错误                | 含义      |
| ----------------- | ------- |
| 407               | 账号认证错误  |
| Timeout           | 网络/节点问题 |
| Connection reset  | 连接被中断   |
| Could not connect | 网络无法访问  |
| DNS error         | 域名解析失败  |

***

#### 第四步：检查账号信息

重点检查：

* 用户名是否完整
* password 是否正确
* zone/session 是否正确拼接

***

#### 示例

```
username_custom_zone_us
```

***

#### 第五步：检查 IP 是否生效

如果 curl 成功，但浏览器不生效：

```
说明问题在浏览器/代码层
```

常见原因：

* 浏览器未走代理
* 插件未启用
* 代码未使用 proxy 参数

***

#### 第六步：目标网站拦截

如果代理正常但 API 返回异常：

```
可能是目标网站风控
```

表现：

* 返回空数据
* 返回验证码
* 返回 403 / 429

***

### 二、快速定位口诀（非常重要）

```
连不上 → 网络问题
407 → 账号问题
Timeout → 节点/网络问题
IP不变 → 没走代理
空返回 → 目标站风控
```

***

### 三、推荐调试工具

| 工具               | 用途         |
| ---------------- | ---------- |
| curl             | 代理基础测试     |
| ipinfo.io        | IP 检测      |
| browserscan.net  | 环境检测       |
| browserleaks.com | DNS/WebRTC |

***

### 四、推荐排查顺序（最佳实践）

```
1. curl 测试代理
↓
2. 检查 IP 是否变化
↓
3. 检查报错类型
↓
4. 检查账号配置
↓
5. 检查网络环境
↓
6. 检查目标网站限制
```

***

### 五、开发建议

建议：

* 永远先用 curl 验证
* 不要直接排查代码
* 先排除网络层问题
* 再看业务逻辑问题

***

### 六、相关文章

* [代理连接失败](/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)
* [超时 Timeout](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/chao-shi-timeout.md)
* [IP 不生效](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/ip-bu-sheng-xiao.md)
* [DNS 解析失败](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dns-jie-xi-shi-bai.md)
* [API 返回为空](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/api-fan-hui-wei-kong.md)
* [如何检测代理是否生效](/dai-li-jian-ce-yu-yin-si-an-quan/ru-he-jian-ce-dai-li-shi-fou-sheng-xiao.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/ru-he-kuai-su-ding-wei-wen-ti.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.
