fix: parse ech-opts.config from Clash Meta YAML subscriptions#1173
Open
xtgm wants to merge 1 commit intoMatsuriDayo:mainfrom
Open
fix: parse ech-opts.config from Clash Meta YAML subscriptions#1173xtgm wants to merge 1 commit intoMatsuriDayo:mainfrom
xtgm wants to merge 1 commit intoMatsuriDayo:mainfrom
Conversation
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.
Summary
Fixes #1115, Fixes #1131
The Clash YAML parser in
RawUpdater.ktcurrently only readsech-opts.enablebut silently dropsech-opts.config. This causes ECH to be enabled without the actual ECH configuration data, making ECH non-functional for Clash Meta subscriptions.The fix adds a
"config"branch to thewhenblock, storing the value inbean.echConfig.The rest of the pipeline already works:
StandardV2RayBean.javahas theechConfigfieldV2RayFmt.kt(buildSingBoxOutboundTLS) already checksbean.echConfig.isNotBlank()and passes it to sing-box'sOutboundECHOptions.configOnly
RawUpdater.ktwas missing the parsing step.概要
修复 #1115、#1131
RawUpdater.kt中的 Clash YAML 解析器目前只读取ech-opts.enable,但丢弃了ech-opts.config。这导致 ECH 虽然被启用,但没有实际的 ECH 配置数据,使得通过 Clash Meta 订阅导入的节点 ECH 功能无法生效。修复方案:在
when块中添加"config"分支,将值写入bean.echConfig。数据链路的其余部分已经正常工作:
StandardV2RayBean.java已有echConfig字段V2RayFmt.kt(buildSingBoxOutboundTLS)已正确检查bean.echConfig.isNotBlank()并传递给 sing-box 的OutboundECHOptions.config唯一缺失的就是
RawUpdater.kt的解析步骤。Changes
"ech-opts" -> (opt.value as? Map<String, Any?>)?.also { for (echOpt in it) { when (echOpt.key) { "enable" -> bean.enableECH = echOpt.value.toString() == "true" + + "config" -> bean.echConfig = + echOpt.value?.toString() ?: "" } } }