Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,11 @@ fun buildSingBoxOutboundTLS(bean: StandardV2RayBean): OutboundTLSOptions? {
ech = OutboundECHOptions().apply {
enabled = true
if (bean.echConfig.isNotBlank()) {
config = bean.echConfig.lines()
config = if (bean.echConfig.contains("BEGIN ECH CONFIGS")) {
bean.echConfig.lines()
} else {
listOf("-----BEGIN ECH CONFIGS-----", bean.echConfig.trim(), "-----END ECH CONFIGS-----")
}
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/moe/matsuri/nb4a/proxy/anytls/AnyTLSFmt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ fun buildSingBoxOutboundAnyTLSBean(bean: AnyTLSBean): SingBoxOptions.Outbound_An
// In new version, some complex options will be deprecated, so we just do this.
ech = SingBoxOptions.OutboundECHOptions().apply {
enabled = true
config = listOf(it)
config = if (it.contains("BEGIN ECH CONFIGS")) {
listOf(it)
} else {
listOf("-----BEGIN ECH CONFIGS-----", it.trim(), "-----END ECH CONFIGS-----")
}
}
}
}
Expand Down