> For the complete documentation index, see [llms.txt](https://docs.ipcheck.ing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipcheck.ing/knowledge-base/zh-tw/connection-tools/webrtc-test.md).

# WebRTC 測試

查看 WebRTC 連線會洩露哪個 IP 位址——即使在 VPN 或代理之後也一樣。

## 它的作用

WebRTC 是瀏覽器用於語音通話、視訊通話與螢幕分享的技術。要讓兩個人直接連線，它必須找出雙方各自可被連上的位址——而它通常會在你的正常代理設定之外、透過 UDP 來完成這件事。這表示瀏覽器可能會洩露一個原本應該由你的 VPN 隱藏的位址。完整說明請參見 [什麼是 WebRTC？](/knowledge-base/zh-tw/concepts/what-is-webrtc.md).

這個 **WebRTC 洩漏測試** 會準確顯示你的瀏覽器在該協商過程中揭露了哪個位址。

它會向四個公開的 STUN 伺服器——Google、BlackBerry、Twilio 和 Cloudflare——提出與 WebRTC 在真實通話中相同的問題：「你看到我是從哪個位址來的？」每個回應都會變成一張卡片。

## 如何執行

測試會在頁面載入時自動執行。點擊區塊標題中的重新整理按鈕（**重新整理 WebRTC 洩漏測試**）即可再次執行。每個伺服器大約有五秒鐘回應。

## 解讀結果

每張卡片會顯示 STUN 伺服器回報的位址，以及根據該位址查出的三項資訊：

* **NAT** — 你的連線似乎使用的網路位址轉換類型。
* **ISP** — 擁有該回報位址的組織。
* **地區** — 該位址對應的國家。

開啟 **SDP 記錄** 卡片底部以查看含時間戳記的原始連線事件。這是除錯檢視；除非你正在排除問題，否則可以忽略它。

### 結果狀態

| 你看到的內容       | 其含義                                                  |
| ------------ | ---------------------------------------------------- |
| 一個 IP 位址     | WebRTC 協商已完成並揭露了這個位址                                 |
| `測試中…`       | 仍在執行                                                 |
| `等待測試`       | 尚未開始 — WebRTC 已在以下位置關閉： **偏好設定 → 自動執行**。按下重新整理按鈕即可執行 |
| `連線錯誤`       | 該 STUN 伺服器未在時間內回應，或瀏覽器阻擋了交換的部分內容                     |
| `WebRTC 不可用` | 你的瀏覽器已完全關閉 WebRTC                                    |

`WebRTC 不可用` 故意以綠色顯示。對於洩漏測試來說，沒有 WebRTC 的瀏覽器是最安全的結果。

### 現在把它和你的公開 IP 比較

這正是測試的重點。先查看 WebRTC 卡片中的位址，再查看你的 [IP 資訊](/knowledge-base/zh-tw/connection-tools/ip-information.md) 卡片。

| 比較                           | 判定                                 |
| ---------------------------- | ---------------------------------- |
| 與你的公開 IP 相同，且你沒有使用 VPN       | 正常。沒有任何東西被隱藏，也沒有任何洩漏               |
| 與你的 VPN 出口 IP 相同             | 很好。你的 VPN 也涵蓋了 WebRTC              |
| 與你的 VPN 出口 IP 不同，且看起來像你的真實位址 | **這是洩漏。** 使用 WebRTC 的網站可以看到你想隱藏的位址 |

{% hint style="warning" %}
如果你使用 VPN 來保護隱私，這裡的洩漏最重要。你正在造訪的網站不需要你的配合就能進行這項操作——任何網頁都可以在背景做同樣的協商。請參見 [我的真實 IP 有洩漏嗎？](/knowledge-base/zh-tw/diagnose/am-i-leaking-my-real-ip.md)
{% endhint %}

### 關於 NAT 類型

這個 **NAT** 欄位是根據你的瀏覽器產生的連線候選類型所做的推測。正如應用程式所註明，NAT 類型偵測並非 100% 準確，僅供參考。可能的值包括 Full Cone、Port Restricted Cone、Port Restricted Cone or Symmetric、Symmetric，以及 Unknown Type。

對稱型 NAT 通常表示你位於電信等級 NAT（CGNAT）之後，這也會影響傳入連線與某些遊戲。請參見 [我是否位於 CGNAT 之後？](/knowledge-base/zh-tw/diagnose/am-i-behind-cgnat.md)

## 發生洩漏時該怎麼辦

{% stepper %}
{% step %}

### 檢查你的 VPN 本身設定

許多 VPN 用戶端都有「WebRTC 洩漏保護」或「封鎖 WebRTC」選項，而且預設是關閉的。請將其開啟並再次執行測試。
{% endstep %}

{% step %}

### 使用瀏覽器內建控制

Firefox：開啟 `about:config` 並將 `media.peerconnection.enabled` 設為 `false`。這會完全停用 WebRTC，也會使瀏覽器通話功能失效。

Chrome、Edge 和 Brave 沒有內建切換開關。Brave 的隱私設定中有 WebRTC IP 處理政策；Chrome 和 Edge 則需要擴充功能。
{% endstep %}

{% step %}

### 安裝可封鎖 WebRTC 的擴充功能

限制 WebRTC IP 處理的擴充功能會讓卡片顯示 `WebRTC 不可用` 或你的代理位址，而不是你的真實位址。
{% endstep %}

{% step %}

### 重新執行並確認

重新整理測試。卡片現在應該會與你的 VPN 出口位址相符，或顯示 `WebRTC 不可用`.
{% endstep %}
{% endstepper %}

## 接下來該做什麼

* 閱讀 [我的真實 IP 有洩漏嗎？](/knowledge-base/zh-tw/diagnose/am-i-leaking-my-real-ip.md) 以取得完整的洩漏檢查清單，包括 DNS。
* 執行 [DNS 洩漏測試](/knowledge-base/zh-tw/connection-tools/dns-leak-test.md) — WebRTC 只是兩種常見洩漏之一。
* 用以下項目確認其餘設定： [我的 VPN 或代理是否正常運作？](/knowledge-base/zh-tw/diagnose/is-my-vpn-working.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.ipcheck.ing/knowledge-base/zh-tw/connection-tools/webrtc-test.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.
