Repository navigation
Conversation
两条模块的精确 snssdk 主机 REJECT、诊断脚本和 MITM 都不匹配 /service/2/device_register。不新增 DIRECT,因为规则策略不能跳过 URL Rewrite。静态测试锁定查询串、末尾斜杠和相邻遥测规则。 Co-authored-by: laincat <laincat@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
变更
HongGuo.sgmodule与HongGuo.Diagnostic.sgmodule在四条精确snssdk主机 REJECT 后增加同一条说明:log.snssdk.com/service/2/device_register不在这些主机内,两条模块都不对它做 REJECT、URL Rewrite、脚本或 MITM。45 条规则和顺序未改,其它广告/遥测 REJECT 仍在。核对结果:
[Rule]里与snssdk有关的只有DOMAIN,i.snssdk.com、i-lq.snssdk.com、is.snssdk.com、is-lq.snssdk.com。Surge 的DOMAIN是主机名精确匹配,不匹配log.snssdk.com。[URL Rewrite]、[Header Rewrite]、[Body Rewrite]、[Map Local]、[Script]、[MITM]。log.snssdk.com或*.snssdk.com。脚本未挂到该 URL。没有新增
DIRECT或URL-REGEX。HTTP 引擎里 Header Rewrite、URL Rewrite、Body Rewrite、脚本先于规则策略;HTTPS 上的 Rewrite 还要该主机启用 MITM。DIRECT不能取消这些层。当前没有命中该路径的 Rewrite/脚本/MITM,加DIRECT只会把原本落到后续配置的请求改成强制直连。覆盖边界
只针对主机
log.snssdk.com、路径/service/2/device_register:[redacted]当作真实参数。device_register_extra、其它主机,也不放行整个snssdk.com。i.snssdk.com、is.snssdk.com、i-lq.snssdk.com、is-lq.snssdk.com,以及log*-applog.fqnovel.com、ads*-normal.zijieapi.com等既有 REJECT 保持不变。/service/2/app_log/)本来就不被这两条模块命中,这次也没有改成放行或新增拦截。这是离线模型,不是 Surge 内核、合并配置或真机结果。不能据此说明弹窗里的 EOF 由模块引起。
验证
python3 -m unittest discover -s tools/tests -p 'test_hongguo_modules.py' -v python3 -m unittest tools.tests.test_surge_rules -v结果:两组均为 OK(HongGuo 8 项,其中含
test_device_register_path_is_not_intercepted;Surge 规则 8 项)。HongGuo 用例会再跑node tools/tests/hongguo_diagnostic.test.cjs。未向该注册地址发起请求,也未在手机上验证。