mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
DNS DoH: Add h2c Remote mode (with TLS serverNameToVerify
)
https://github.com/XTLS/Xray-core/issues/4313#issuecomment-2609339864 Applies https://github.com/refraction-networking/utls/pull/161 Closes https://github.com/XTLS/Xray-core/issues/4313
This commit is contained in:
parent
a0822cb440
commit
2522cfd7be
7 changed files with 105 additions and 56 deletions
|
@ -134,12 +134,17 @@ func UClient(c net.Conn, config *tls.Config, fingerprint *utls.ClientHelloID) ne
|
|||
}
|
||||
|
||||
func copyConfig(c *tls.Config) *utls.Config {
|
||||
serverNameToVerify := ""
|
||||
if r, ok := c.Rand.(*RandCarrier); ok {
|
||||
serverNameToVerify = r.ServerNameToVerify
|
||||
}
|
||||
return &utls.Config{
|
||||
RootCAs: c.RootCAs,
|
||||
ServerName: c.ServerName,
|
||||
InsecureSkipVerify: c.InsecureSkipVerify,
|
||||
VerifyPeerCertificate: c.VerifyPeerCertificate,
|
||||
KeyLogWriter: c.KeyLogWriter,
|
||||
RootCAs: c.RootCAs,
|
||||
ServerName: c.ServerName,
|
||||
InsecureSkipVerify: c.InsecureSkipVerify,
|
||||
VerifyPeerCertificate: c.VerifyPeerCertificate,
|
||||
KeyLogWriter: c.KeyLogWriter,
|
||||
InsecureServerNameToVerify: serverNameToVerify,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue