fix: xray redirect 默认跟随 / matcher DSL 快路径 / favicon 探测修复 / tinygo 兼容#33
Open
wuchulonly wants to merge 4 commits into
Open
fix: xray redirect 默认跟随 / matcher DSL 快路径 / favicon 探测修复 / tinygo 兼容#33wuchulonly wants to merge 4 commits into
wuchulonly wants to merge 4 commits into
Conversation
对齐 xray 默认行为(省略 == true),避免 30x 后的产品签名 (GeoServer Wicket /web/?0、Druid console、Spring Boot whitelabel)被静默丢失。 FollowRedirects 改 *bool 以区分"省略"与"false",显式 false 仍保持不跟随。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
仅含 {{...}}/§...§ 运行时标记的表达式才走 resolve+recompile,其余直接复用
已编译结果(common.Evaluate 对无标记表达式原样返回)。避免每条响应对上万
指纹模板重复解析+编译,缓解组内串行求值的 CPU 瓶颈。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- fetchFavicon 改用 r.Context() 而非页面请求 context,避免继承页面请求已耗尽的 时间预算,导致慢站点的 xray 风格 favicon 规则误判为不命中 - discoverIconURLs 用相对 "favicon.ico" 基于 base 解析 - attrRE / attrValue 支持未加引号的 link 属性(如 rel=icon href=/path) 补充 fetchFavicon 独立 context 与未加引号属性解析的单元测试。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
标准构建走 cookiejar.New;tinygo 下 cookiejar 不可用,newCookieJar 返回 nil, 使 xrayconv 等 tinygo 构建目标可编译通过。 Co-Authored-By: Claude Opus 4.8 <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.
基于当前 master(
1a0a5a8)干净 cherry-pick 的 4 个修复,go build ./convert/ ./operators/ ./protocols/http/通过。convert: xray follow_redirects 省略时默认跟随
xray 省略
follow_redirects时默认跟随(== true),仅显式false才关闭。FollowRedirects改*bool区分"省略"与"false",省略映射为 true,避免 30x 后的产品签名(GeoServer Wicket/web/?0、Druid console、Spring Boot whitelabel)被静默丢失。operators/matcher: 无模板标记表达式跳过重复 resolve+recompile
仅含
{{...}}/§...§运行时标记的表达式才走 resolve+recompile,其余复用已编译对象。避免每条响应对上万模板重复解析+编译,缓解组内串行求值的 CPU 瓶颈。http: favicon 探测修复
fetchFavicon用r.Context()而非页面请求 context,避免继承页面请求已耗尽的时间预算,导致慢站点 favicon 规则假阴性discoverIconURLs用相对favicon.ico基于 base 解析attrRE/attrValue支持未加引号的 link 属性(如rel=icon href=/path)http(client): 抽出 newCookieJar 适配 tinygo 构建
标准构建走
cookiejar.New;tinygo 下cookiejar不可用,newCookieJar返回 nil,使 tinygo 构建目标可编译。🤖 Generated with Claude Code