> 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/network-tests/proxy-rule-test.md).

# 代理規則測試

使用八個 ptest 測試網域，驗證你的代理或 VPN 用戶端是否會將每個規則群組送到你預期的位置。

## 它的作用

大多數代理與 VPN 用戶端會依照 **規則**：這個網域直接連線，那個走日本節點，另一個走工作伺服器。這通常稱為分流路由或基於規則的路由。

問題在於規則是沉默的。沒有人會告訴你某條規則是否真的匹配了，或是流量是否悄悄落回你的預設策略。

**規則測試** — 列為 *代理規則測試* 在本手冊中——解決了這個問題。它提供你 **8 個測試網域**:

```
ptest-1.ipcheck.ing
ptest-2.ipcheck.ing
...
ptest-8.ipcheck.ing
```

你在用戶端中將每個網域指向不同的規則群組。接著 MyIP 會一次打開全部八個，並顯示每個請求實際出去的出口 IP。每個網域一張卡片，共八張卡片。

{% hint style="info" %}
這個工具是給使用帶有規則檔的代理或 VPN 用戶端的人。如果你只是使用一個只有開/關切換的簡單 VPN App，你不需要它——請看 [我的 VPN 或代理有在運作嗎？](/knowledge-base/zh-tw/diagnose/is-my-vpn-working.md) 。
{% endhint %}

## 如何設定

{% stepper %}
{% step %}

### 將規則加入你的用戶端

開啟你用戶端的設定，並為每個測試網域新增一條規則，各自指向不同的策略或代理群組。具體語法取決於你的用戶端；常見格式如下 `DOMAIN,ptest-3.ipcheck.ing,POLICY`.

{% code title="代理規則" overflow="wrap" %}

```ini
# 規則測試
DOMAIN,ptest-1.ipcheck.ing,Proxy1
DOMAIN,ptest-2.ipcheck.ing,Proxy2
DOMAIN,ptest-3.ipcheck.ing,Proxy3
DOMAIN,ptest-4.ipcheck.ing,Proxy4
DOMAIN,ptest-5.ipcheck.ing,Proxy5
DOMAIN,ptest-6.ipcheck.ing,Proxy6
DOMAIN,ptest-7.ipcheck.ing,Proxy7
DOMAIN,ptest-8.ipcheck.ing,Proxy8
```

{% endcode %}

替換 `Proxy1` … `Proxy8` 為你實際想測試的策略或群組名稱。你不必使用全部八個。
{% endstep %}

{% step %}

### 重新載入設定

規則只有在你的用戶端重新載入後才會生效。請重新啟動用戶端，或使用其重新載入按鈕。
{% endstep %}

{% step %}

### 開啟工具

開啟 **規則測試** 於進階工具中。它一打開就會開始檢查這八個網域。請使用 **全部重新整理** 在更改規則後再次執行。
{% endstep %}
{% endstepper %}

<details>

<summary>主儀表板的加值規則</summary>

此專案也建議這些規則，這樣儀表板就能並排顯示你的真實 IP 與代理後的 IP：

```ini
# IP 測試
IP-CIDR,1.0.0.2/32,Proxy,no-resolve
IP-CIDR6,2606:4700:4700::1111/128,Proxy,no-resolve
DOMAIN,4.ipcheck.ing,DIRECT
DOMAIN,6.ipcheck.ing,DIRECT
```

</details>

## 閱讀你的結果

每張卡片顯示一個欄位：

| 欄位          | 它告訴你什麼                      |
| ----------- | --------------------------- |
| `#1` … `#8` | 這張卡片屬於哪個測試網域                |
| 網域          | `ptest-N.ipcheck.ing`，請求的位址 |
| IP          | 請求實際來自的出口 IP                |
| ISP         | 擁有該 IP 的公司                  |
| 代理區域        | 出口所在的國家                     |

現在比較這些卡片：

* **卡片之間的 IP 不同** — 每條規則都走到了不同的出口。你的分流路由正常運作。
* **兩張卡片的 IP 相同** — 兩條規則都到了同一個出口。要麼這兩個策略指向同一個節點，要麼其中一條規則根本沒有匹配，最後落到了和另一條相同的預設策略。
* **一張卡片顯示你的家用 ISP 和你所在的國家** — 這個欄位直接連線，沒有經過代理。如果這正是你想要的，那就是正確；如果不是，那就是錯誤。
* **一張卡片顯示了預料之外的國家** — 那條規則匹配到的群組和你想的不一樣。請檢查規則順序：多數用戶端會套用 *第一個* 符合的規則，因此上方較寬鬆的規則可能會吞掉下方較精確的規則。

### 狀態標籤

| 標籤   | 含義      |
| ---- | ------- |
| 測試中… | 檢查仍在進行中 |
| 等待測試 | 檢查尚未開始  |
| 測試錯誤 | 無法連上該網域 |

某張卡片持續出錯，通常表示它所對應的策略已離線、無法連線，或正在封鎖該請求。若每張卡片都出錯，問題在你的用戶端或連線，不在規則。

## 需要記住的事項

* 這些是 **網域** 規則。如果你的設定是依 IP 範圍、GeoIP 或應用程式來分流，這裡就不會套用那些規則。
* 你的用戶端可能會快取 DNS 回應或連線。如果變更沒有顯示出來，請重新載入用戶端並按下 **全部重新整理**.
* 顯示的國家是出口節點看起來所在的位置，但不一定是伺服器實際所在的地方。請參閱 [GeoIP：IP 地理位置如何運作](/knowledge-base/zh-tw/concepts/geoip-explained.md).

## 接下來要做什麼

* 確認代理已套用到一般瀏覽 → [我的 VPN 或代理有在運作嗎？](/knowledge-base/zh-tw/diagnose/is-my-vpn-working.md)
* 網站看到了一個你沒預期到的 IP → [為什麼網站看到不同的 IP？](/knowledge-base/zh-tw/diagnose/why-do-sites-see-a-different-ip.md)
* 確認 DNS 走的是相同路由 → [DNS 洩漏測試](/knowledge-base/zh-tw/connection-tools/dns-leak-test.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/network-tests/proxy-rule-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.
