TLS ECH: Update ECH configuration parsing logic to be more robust (#6441)

https://github.com/XTLS/Xray-core/pull/6441#issuecomment-4903624643

---------

Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
This commit is contained in:
James Liu
2026-07-08 19:12:37 +08:00
committed by GitHub
parent 987290ba48
commit e4e7614c62
3 changed files with 19 additions and 20 deletions
+1 -1
View File
@@ -450,7 +450,7 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
for _, s := range tls.CipherSuites() {
id[s.Name] = s.ID
}
for _, n := range strings.Split(c.CipherSuites, ":") {
for n := range strings.SplitSeq(c.CipherSuites, ":") {
if id[n] != 0 {
config.CipherSuites = append(config.CipherSuites, id[n])
}