> 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-jian-ce-yu-yin-si-an-quan/dns-xie-lou-jian-ce.md).

# DNS泄露检测

在使用代理时，很多用户会误以为：

```
IP 变了 = 已经安全
```

但实际上还可能存在一个隐蔽问题：

👉 DNS 请求没有走代理（DNS 泄露）

***

## 🌍 一、什么是 DNS 泄露？

DNS 的作用是：

👉 将域名解析成 IP 地址

例如：

```
google.com → 142.250.xx.xx
```

***

### ⚠️ 正常代理流程

```
你的设备 → 代理 → 目标网站
DNS 请求 → 代理网络解析
```

***

### ❌ DNS 泄露情况

```
你的设备 → 目标网站
DNS 请求 → 本机/国内运营商
```

👉 即使 IP 使用了代理，也会暴露真实网络环境

***

## ⚠️ 二、DNS 泄露的风险

如果发生 DNS 泄露：

| 风险   | 说明               |
| ---- | ---------------- |
| 地区暴露 | 平台识别真实国家         |
| 账号风控 | TikTok / FB 触发异常 |
| IP污染 | 代理效果被削弱          |
| 关联风险 | 多账号可能被关联         |

***

## 🧪 三、如何检测 DNS 是否泄露？

***

### ✔ 方法1：在线检测（推荐）

访问：

```
https://www.dnsleaktest.com
```

或：

```
https://browserleaks.com/dns
```

***

### ✔ 标准检测步骤：

1. 打开检测网站
2. 点击 “Start Test / Extended Test”
3. 查看 DNS 服务器列表

***

### ✔ 正常结果（安全）

```
显示：
- 美国 / 日本 / 香港 DNS
- 代理网络 DNS
```

👉 与代理国家一致

***

### ❌ 异常结果（泄露）

```
显示：
- China Telecom / China Unicom
- 本地 ISP DNS
```

👉 表示 DNS 泄露

***

## 🌐 四、如何判断是否安全？

| 检测项       | 正常情况   |
| --------- | ------ |
| DNS 国家    | 与代理一致  |
| DNS 提供商   | 海外 ISP |
| 是否出现本地运营商 | ❌ 不应出现 |

***

## 🖥 五、浏览器检测方法

推荐使用：

```
https://browserleaks.com/dns
```

重点查看：

* DNS Servers
* DNS Location
* Resolver IP

***

## ⚙️ 六、如何防止 DNS 泄露？

***

### ✔ 方法1：使用系统代理（推荐）

确保：

```
所有流量（包括 DNS）走代理
```

***

### ✔ 方法2：使用 SOCKS5 代理

SOCKS5 通常：

👉 能更好隔离 DNS 请求

***

### ✔ 方法3：关闭系统默认 DNS

建议设置：

* Cloudflare DNS（1.1.1.1）
* Google DNS（8.8.8.8）

避免使用：

```
国内运营商 DNS
```

***

### ✔ 方法4：使用指纹浏览器

例如：

* [AdsPower](/ji-cheng-jiao-cheng/zhi-wen-liu-lan-qi/adspower-liu-lan-qi-ji-cheng-zhi-nan.md)
* [MoreLogin](/ji-cheng-jiao-cheng/zhi-wen-liu-lan-qi/morelogin-liu-lan-qi-ji-cheng-zhi-nan.md)
* [Dolphin](/ji-cheng-jiao-cheng/zhi-wen-liu-lan-qi/dolphinanty-liu-lan-qi-ji-cheng-zhi-nan.md)

👉 可强制 DNS 走代理环境

***

## 🔒 七、如何确认 DNS 已安全？

重新测试：

```
https://browserleaks.com/dns
```

确认：

* DNS 国家 = 代理国家
* 无本地 ISP DNS
* 无中国运营商记录

***

## 🧭 八、推荐检测流程（非常重要）

建议按顺序排查：

```
1. curl 测试代理是否生效
↓
2. IP 地区检测
↓
3. WebRTC 泄露检测
↓
4. DNS 泄露检测
↓
5. 正式业务使用
```

***

## 🚀 九、快速判断口诀

```
IP变了 ≠ 安全
DNS对了 = 真正安全
```

***

## 📚 相关文章 / 相关阅读

* [如何检测代理是否生效](/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)
* [WebRTC 泄露检测](/dai-li-jian-ce-yu-yin-si-an-quan/webrtc-xie-lou-jian-ce.md)
* [什么是公网 IP](/dai-li-ji-chu-zhi-shi/shen-me-shi-gong-wang-ip.md)
* [什么是浏览器指纹](/dai-li-jian-ce-yu-yin-si-an-quan/liu-lan-qi-zhi-wen-jian-ce.md)
* [如何降低封禁风险](/dai-li-ji-chu-zhi-shi/ru-he-jiang-di-feng-jin-feng-xian.md)
* [为什么需要海外网络环境](/dai-li-ji-chu-zhi-shi/wei-shen-me-xu-yao-hai-wai-wang-luo-huan-jing.md)
* [IP 不生效](/gu-zhang-pai-chu/ip-bu-sheng-xiao.md)
* [代理连接失败](/gu-zhang-pai-chu/dai-li-lian-jie-shi-bai.md)
* [浏览器检测失败](/gu-zhang-pai-chu/liu-lan-qi-jian-ce-shi-bai.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/dai-li-jian-ce-yu-yin-si-an-quan/dns-xie-lou-jian-ce.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.
