Merge branch 'main' into configurable-mtls

This commit is contained in:
Kristoffer Dalby 2022-01-31 12:28:00 +00:00 committed by GitHub
commit 168b1bd579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 955 additions and 543 deletions

6
app.go
View file

@ -73,7 +73,7 @@ type Config struct {
ServerURL string
Addr string
EphemeralNodeInactivityTimeout time.Duration
IPPrefix netaddr.IPPrefix
IPPrefixes []netaddr.IPPrefix
PrivateKeyPath string
BaseDomain string
@ -204,9 +204,7 @@ func NewHeadscale(cfg Config) (*Headscale, error) {
}
if app.cfg.DNSConfig != nil && app.cfg.DNSConfig.Proxied { // if MagicDNS
magicDNSDomains := generateMagicDNSRootDomains(
app.cfg.IPPrefix,
)
magicDNSDomains := generateMagicDNSRootDomains(app.cfg.IPPrefixes)
// we might have routes already from Split DNS
if app.cfg.DNSConfig.Routes == nil {
app.cfg.DNSConfig.Routes = make(map[string][]dnstype.Resolver)