mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +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
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue