# IP 地理位置不匹配

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

## 1. 地理库延迟

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

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

```
X-Helodata-Exit-IP: 198.51.100.42
X-Helodata-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-Helodata-Exit-Geo` 一致说明目标在用旧数据——等等或换 IP。若**不一致**说明该 IP 地理近期变化、我们的库尚未刷新。

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

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

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

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

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

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

发生时响应会标记：

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

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

## 程序化验证

```python
import requests

USER = "helo_s1a2b3c4d5e-type-res-region-de"
proxy = f"http://{USER}:PASSWORD@gate.helodata.io: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-helodata-exit-geo")

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

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

## VPN / 托管标记

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

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

## 仍不匹配

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
