Many fixes

This commit is contained in:
风扇滑翔翼 2024-09-26 14:51:48 +00:00 committed by GitHub
parent 72892dac2f
commit df370f0223
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 60 additions and 49 deletions

View file

@ -445,8 +445,15 @@ func (c *TLSConfig) Build() (proto.Message, error) {
}
}
if c.ECHConfig != "" {
ECHConfig, err := base64.StdEncoding.DecodeString(c.ECHConfig)
if err != nil {
return nil, errors.New("invalid ECH Config", c.ECHConfig)
}
config.EchConfig = ECHConfig
}
config.MasterKeyLog = c.MasterKeyLog
config.EchConfig = c.ECHConfig
config.Ech_DOHserver = c.ECHDOHServer
return config, nil