mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-06 12:18:42 +00:00
Add server support
This commit is contained in:
parent
9723ed9ecd
commit
c10e5f6c78
6 changed files with 87 additions and 40 deletions
|
@ -414,6 +414,7 @@ type TLSConfig struct {
|
|||
VerifyPeerCertInNames []string `json:"verifyPeerCertInNames"`
|
||||
ECHConfig string `json:"echConfig"`
|
||||
ECHDOHServer string `json:"echDohServer"`
|
||||
EchKeySets string `json:"echKeySets"`
|
||||
}
|
||||
|
||||
// Build implements Buildable.
|
||||
|
@ -492,6 +493,13 @@ func (c *TLSConfig) Build() (proto.Message, error) {
|
|||
}
|
||||
config.EchConfig = ECHConfig
|
||||
}
|
||||
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
|
||||
}
|
||||
config.Ech_DOHserver = c.ECHDOHServer
|
||||
|
||||
return config, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue