mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-31 02:34:07 +09:00
Add support for Split DNS (implements #179)
This commit is contained in:
1 parent
9e1253ada1
commit
18b00b5d8d
3 files changed
+51
-16
No files matched your search
@@ -113,7 +113,9 @@ func NewHeadscale(cfg Config) (*Headscale, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
h.cfg.DNSConfig.Routes = make(map[string][]dnstype.Resolver)
|
||||
if h.cfg.DNSConfig.Routes == nil { // we might have routes already from Split DNS
|
||||
h.cfg.DNSConfig.Routes = make(map[string][]dnstype.Resolver)
|
||||
}
|
||||
for _, d := range magicDNSDomains {
|
||||
h.cfg.DNSConfig.Routes[d.WithoutTrailingDot()] = nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user