> For the complete documentation index, see [llms.txt](https://docs.ipdunar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipdunar.com/zh/gu-zhang-pai-cha/ip-location-mismatch.md).

# IP 地理位置不匹配

你请求了 `region-de`，网关给了德国 IP，结果目标说"不向你的国家提供服务"。可能由以下三种原因之一造成，按顺序排查：

## 1. 地理库延迟

目标站点使用第三方地理库（MaxMind、IPinfo、内部库），它们与 ipdunar 刷新节奏不同。今天我们已经把 IP 归到"法兰克福住宅"，旧版 MaxMind 还可能列为"阿姆斯特丹数据中心"。

**诊断** — 确认我们路由给你的 IP：

```
X-Ipdunar-Exit-IP: 198.51.100.42
X-Ipdunar-Exit-Geo: de/he/frankfurt
```

再在目标可能使用的地理源查询：

* MaxMind demo：<https://www.maxmind.com/en/geoip2-precision-demo>
* IPinfo：<https://ipinfo.io/{ip}>
* Whoer：<https://whoer.net/>

它们与 `X-Ipdunar-Exit-Geo` 一致说明目标在用旧数据——等等或换 IP。若**不一致**说明该 IP 地理近期变化、我们的库尚未刷新。

## 2. 行为型 geo（不是 IP geo）

部分目标查的不止是 IP，能覆盖 IP geo 的信号：

* `Accept-Language` 头
* JavaScript 取到的时区（`Intl.DateTimeFormat().resolvedOptions().timeZone`）
* 上次访问的货币或 locale cookie
* 用户已登录、账号绑定的地区

**修复** — 清 cookie、把头对齐 IP 国家、用反检测浏览器（多数会自动按代理 geo 对齐时区，见 [Multilogin](https://docs.ipdunar.com/zh/ji-cheng-zhi-nan/fan-jian-ce-liu-lan-qi/multilogin.md)、[AdsPower](https://docs.ipdunar.com/zh/ji-cheng-zhi-nan/fan-jian-ce-liu-lan-qi/adspower.md)）。

## 3. 真路由错（罕见）

网关挑了一个 IP，**其实时 geo**与请求筛选不符。我们每日刷新地理库，但设备级移动（住宅订户跨国旅行、手机 SIM 出境）会在刷新间隔内造成偏差。

发生时响应会标记：

```
X-Ipdunar-Exit-Geo-Confidence: low
```

**修复** — 换 IP（去掉 session），网关会跳过该可疑 IP。`Exit-Geo-Confidence: low` 比例 > 5% 时开工单。

## 程序化验证

```python
import requests

USER = "ipdunar_s1a2b3c4d5e-type-res-region-de"
proxy = f"http://{USER}:PASSWORD@gate.ipdunar.com:7777"

r = requests.get("https://ipinfo.io/json",
                 proxies={"http": proxy, "https": proxy}, timeout=30)
exit_info = r.json()
exit_geo = r.headers.get("x-ipdunar-exit-geo")

# 比较 ipdunar vs 第三方地理库
print("ipdunar:", exit_geo)              # 例：de/he/frankfurt
print("ipinfo:",   exit_info["country"])  # 例：DE
```

不一致就是失配点——目标多半用了类似 ipinfo 的源。

## VPN / 托管标记

有些目标无视国家、只要标"VPN"或"hosting"就拒。ipdunar 住宅 IP **不**被标为 hosting（它们是真消费者 ISP）。若目标按此标记屏蔽：

* 改用 ISP——主流数据库会标为住宅
* 改用移动——通常标为"移动运营商"，多数目标接受
* 必须用住宅又持续被标，多半是 IP 发放后被重新分类——轮换 IP

## 仍不匹配

邮件 <support@ipdunar.com> 附一个 `X-Ipdunar-Request-Id`、目标 URL、目标反馈的 geo。我们会追溯问题在我们的池、第三方地理库还是目标。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ipdunar.com/zh/gu-zhang-pai-cha/ip-location-mismatch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
