Skip to content

Commit c18b39e

Browse files
authored
TLS client: Support more cipherSuites for "unsafe" (golang) fingerprint for anti-NIN (#6450)
#6450 (comment)
1 parent e2ad0ac commit c18b39e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

transport/internet/tls/config.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,13 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
450450
for _, s := range tls.CipherSuites() {
451451
id[s.Name] = s.ID
452452
}
453+
for _, s := range tls.InsecureCipherSuites() {
454+
id[s.Name] = s.ID
455+
}
453456
for n := range strings.SplitSeq(c.CipherSuites, ":") {
454-
if id[n] != 0 {
455-
config.CipherSuites = append(config.CipherSuites, id[n])
457+
n = strings.TrimSpace(n)
458+
if v, ok := id[n]; ok {
459+
config.CipherSuites = append(config.CipherSuites, v)
456460
}
457461
}
458462
}

0 commit comments

Comments
 (0)