mirror of
https://github.com/netbirdio/netbird.git
synced 2025-04-10 18:58:27 +02:00
Use different initialize order for DNS resolver in android/nonandroid clients (#952)
This commit is contained in:
parent
ff267768f0
commit
042f124702
@ -199,7 +199,7 @@ func (e *Engine) Start() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if e.dnsServer == nil {
|
if e.dnsServer == nil && runtime.GOOS == "android" {
|
||||||
// todo fix custom address
|
// todo fix custom address
|
||||||
dnsServer, err := dns.NewDefaultServer(e.ctx, e.wgInterface, e.config.CustomDNSAddress, dnsCfg)
|
dnsServer, err := dns.NewDefaultServer(e.ctx, e.wgInterface, e.config.CustomDNSAddress, dnsCfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -259,6 +259,16 @@ func (e *Engine) Start() error {
|
|||||||
e.acl = acl
|
e.acl = acl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if e.dnsServer == nil && runtime.GOOS != "android" {
|
||||||
|
// todo fix custom address
|
||||||
|
dnsServer, err := dns.NewDefaultServer(e.ctx, e.wgInterface, e.config.CustomDNSAddress, dnsCfg)
|
||||||
|
if err != nil {
|
||||||
|
e.close()
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
e.dnsServer = dnsServer
|
||||||
|
}
|
||||||
|
|
||||||
e.receiveSignalEvents()
|
e.receiveSignalEvents()
|
||||||
e.receiveManagementEvents()
|
e.receiveManagementEvents()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user