fix(active): 主动匹配改走 neutron executer + transport-only 注入#28
Merged
M09Ic merged 2 commits intoJun 14, 2026
Merged
Conversation
…h transport-only injection
HTTPActiveMatch in both engines now runs the whole template via
ExecuteWithTransport instead of either a hand-rolled per-request
ExecuteWithResults loop (fingerprinthub) or ExecuteWithClient (both):
- Whole-template execution lets neutron maintain __request_index_offset, so
converted multi-request templates no longer collapse body_N to body_1 and
miss.
- Transport-only injection swaps just the RoundTripper, preserving the
template's compiled CheckRedirect/Jar/Timeout. ExecuteWithClient replaced the
whole client and dropped the redirect policy, so redirects:false fingerprints
asserting on the Location header were followed and missed.
xray.isRootPath now also accepts {{RootURL}}/ (newer neutron convert emits
RootURL rather than BaseURL for root probes); without it, passive WebMatch
skipped every converted root-path template.
go.mod: align neutron + govaluate with the executer API used above.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
将
fingerprinthub与xray的主动匹配(active-match)执行改走 neutron executer,并把注入方式从"整包 Client 替换"改为 transport-only(只换 Transport)。改动文件
fingerprinthub/fingerprinthub.go:主动匹配改走 neutron executerxray/xray.go:同步 transport-only 注入go.mod/go.sum:依赖更新为什么
CheckRedirect,导致模板跟跳策略失效redirects:false(默认不跟跳)在注入 Client 后被破坏,造成系统性漏检Transport),保住模板的CheckRedirect/ cookie 等逻辑,跟跳由模板自身决定基于上游 master(
f5c144e),零冲突。🤖 Generated with Claude Code