mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-27 05:34:15 +00:00
Merge 3a47c4ac4e
into b80e319655
This commit is contained in:
commit
50ba2567e4
9 changed files with 426 additions and 53 deletions
|
@ -412,6 +412,8 @@ type TLSConfig struct {
|
|||
MasterKeyLog string `json:"masterKeyLog"`
|
||||
ServerNameToVerify string `json:"serverNameToVerify"`
|
||||
VerifyPeerCertInNames []string `json:"verifyPeerCertInNames"`
|
||||
ECHConfigList string `json:"echConfigList"`
|
||||
EchKeySets string `json:"echKeySets"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
|
@ -483,6 +485,16 @@ func (c *TLSConfig) Build() (proto.Message, error) {
|
|||
}
|
||||
config.VerifyPeerCertInNames = c.VerifyPeerCertInNames
|
||||
|
||||
config.EchConfigList = c.ECHConfigList
|
||||
|
||||
if c.EchKeySets != "" {
|
||||
EchPrivateKey, err := base64.StdEncoding.DecodeString(c.EchKeySets)
|
||||
if err != nil {
|
||||
return nil, errors.New("invalid ECH Config", c.EchKeySets)
|
||||
}
|
||||
config.EchKeySets = EchPrivateKey
|
||||
}
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue