mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-07 08:22:57 +03:00
Merge branch 'master' into 4990-custom-ciphers
This commit is contained in:
commit
a736f67205
109 changed files with 3936 additions and 2010 deletions
internal/home
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"crypto/tls"
|
||||
"io/fs"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/netip"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -39,7 +39,7 @@ type webConfig struct {
|
|||
clientFS fs.FS
|
||||
clientBetaFS fs.FS
|
||||
|
||||
BindHost net.IP
|
||||
BindHost netip.Addr
|
||||
BindPort int
|
||||
BetaBindPort int
|
||||
PortHTTPS int
|
||||
|
@ -137,8 +137,11 @@ func newWeb(conf *webConfig) (w *Web) {
|
|||
//
|
||||
// TODO(a.garipov): Adapt for HTTP/3.
|
||||
func webCheckPortAvailable(port int) (ok bool) {
|
||||
return Context.web.httpsServer.server != nil ||
|
||||
aghnet.CheckPort("tcp", config.BindHost, port) == nil
|
||||
if Context.web.httpsServer.server != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return aghnet.CheckPort("tcp", netip.AddrPortFrom(config.BindHost, uint16(port))) == nil
|
||||
}
|
||||
|
||||
// TLSConfigChanged updates the TLS configuration and restarts the HTTPS server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue