mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 19:39:35 +03: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:
@ -410,6 +410,7 @@ type TLSConfig struct {
|
||||
PinnedPeerCertificatePublicKeySha256 *[]string `json:"pinnedPeerCertificatePublicKeySha256"`
|
||||
CurvePreferences *StringList `json:"curvePreferences"`
|
||||
MasterKeyLog string `json:"masterKeyLog"`
|
||||
ServerNameToVerify string `json:"serverNameToVerify"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
@ -468,6 +469,10 @@ func (c *TLSConfig) Build() (proto.Message, error) {
|
||||
}
|
||||
|
||||
config.MasterKeyLog = c.MasterKeyLog
|
||||
config.ServerNameToVerify = c.ServerNameToVerify
|
||||
if config.ServerNameToVerify != "" && config.Fingerprint == "unsafe" {
|
||||
return nil, errors.New(`serverNameToVerify only works with uTLS for now`)
|
||||
}
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user