Repository navigation
fix(dns): 泄漏探测改用真实 HTTPS 触发避免劫持环境假阴性 - #9
Merged
Merged
Conversation
透明代理 fake-ip 劫持会把 UDP/TCP 53 裸查询本地应答(198.18/15)而从不 递归,权威 NS 收不到记录,回读恒空,三态判定恒为「已加密」——而上游 「空列表 = 已加密」的前提是浏览器必然真实建连,对裸 DNS 查询不成立。 - 触发改为对 pixel.gif 的真实 HTTPS 请求(上游浏览器等价),直连与 代理环境都迫使解析链路完成递归;单轮时限沿用公网 8 秒红线。 - 新增 classify_readback 纯函数:触发全部失败且回读为空按探测失败处理, 不再误报「已加密」;有请求完成即进入三态判定,判定规则不变。 - 接口报告 §3.6 采用值与 §2.7 触发建议同步更新。 - CI test 作业补齐真实网络冒烟入口(probe_leak --ignored)。 Ref: #8
6 tasks
使用边界补充约定:报告的实施建议先在对应「LinkLens 采用值」段落 写明成立的环境前提(如解析链路可达、无透明劫持),前提不明的先 验证再采用,不得直接作为实现依据。先例是 §2.7 裸 DNS 查询建议在 fake-ip 劫持下产生假阴性。 Ref: #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
DNS 检测页在本机(透明代理 fake-ip 劫持环境)恒显示「未检测到 DNS 解析器出口 IP」,而 ip.net.coffee/dns 网页端总能检测到。诊断结论与完整证据见 #8:裸 DNS 查询(UDP/TCP 53)被路径上的劫持设备本地应答(应答落在 198.18/15)而从不递归,权威 NS 收不到记录,回读恒空;上游「空列表 = 已加密」的前提是浏览器必然真实建连,对裸 DNS 查询不成立。
变更轮廓
触发原语替换(三态判定规则不变):
回读分类(新增
classify_readback纯函数):test作业补齐真实网络冒烟入口(probe_leak --ignored,三平台执行)。验证
cargo fmt --check、cargo clippy --locked --all-targets -- -D warningscargo test --offline --libprobe_url_matches_official_pattern、classify_readback_distinguishes_failed_triggers_from_encrypted)cargo test --locked --lib probe_leak -- --ignored真实网络结果受运行环境影响;CI runner 无劫持环境,本机才是该 bug 的原始现场,故冒烟在本地已按真实环境执行,CI 侧作为常规入口保留。
风险与回滚
Ref: #8