mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-02 06:00:25 +03:00
changed based on review
1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks
This commit is contained in:
parent
15b19ff726
commit
7cac010573
4 changed files with 39 additions and 28 deletions
internal/home
|
@ -369,6 +369,11 @@ func initWeb(args options, clientBuildFS fs.FS) (web *Web, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
tlsCiphers, err := getTLSCiphers()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
webConf := webConfig{
|
||||
firstRun: Context.firstRun,
|
||||
BindHost: config.BindHost,
|
||||
|
@ -383,7 +388,7 @@ func initWeb(args options, clientBuildFS fs.FS) (web *Web, err error) {
|
|||
clientBetaFS: clientBetaFS,
|
||||
|
||||
serveHTTP3: config.DNS.ServeHTTP3,
|
||||
tlsCiphers: getTLSCiphers(),
|
||||
tlsCiphers: tlsCiphers,
|
||||
}
|
||||
|
||||
web = newWeb(&webConf)
|
||||
|
@ -889,15 +894,13 @@ type jsonError struct {
|
|||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// getTLSCiphers check for overriden tls ciphers, if the slice is
|
||||
// getTLSCiphers check for overridden tls ciphers, if the slice is
|
||||
// empty, then default safe ciphers are used
|
||||
func getTLSCiphers() []uint16 {
|
||||
var cipher []uint16
|
||||
|
||||
func getTLSCiphers() (cipherIds []uint16, err error) {
|
||||
if len(config.TLS.OverrideTLSCiphers) == 0 {
|
||||
cipher = aghtls.SaferCipherSuites()
|
||||
return aghtls.SaferCipherSuites(), nil
|
||||
} else {
|
||||
cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers)
|
||||
log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers)
|
||||
return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers)
|
||||
}
|
||||
return cipher
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue