mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-23 01:04:40 +07:00
fix: running issue and no network on android (#264)
This commit is contained in:
parent
5360893c3d
commit
e466295096
@ -59,10 +59,6 @@ func tryUpdateSystemDnsElapse(k time.Duration) (err error) {
|
|||||||
|
|
||||||
func tryUpdateSystemDns() (err error) {
|
func tryUpdateSystemDns() (err error) {
|
||||||
dnsConf := dnsReadConfig("/etc/resolv.conf")
|
dnsConf := dnsReadConfig("/etc/resolv.conf")
|
||||||
if len(dnsConf.servers) == 0 {
|
|
||||||
err = fmt.Errorf("no valid dns server in /etc/resolv.conf")
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
systemDns = netip.AddrPort{}
|
systemDns = netip.AddrPort{}
|
||||||
for _, s := range dnsConf.servers {
|
for _, s := range dnsConf.servers {
|
||||||
ipPort := netip.MustParseAddrPort(s)
|
ipPort := netip.MustParseAddrPort(s)
|
||||||
|
@ -141,7 +141,10 @@ func (s *Dns) InitUpstreams() {
|
|||||||
for _, upstream := range s.upstream {
|
for _, upstream := range s.upstream {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func(upstream *UpstreamResolver) {
|
go func(upstream *UpstreamResolver) {
|
||||||
upstream.GetUpstream()
|
_, err := upstream.GetUpstream()
|
||||||
|
if err != nil {
|
||||||
|
s.log.WithError(err).Debugln("Dns.GetUpstream")
|
||||||
|
}
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(upstream)
|
}(upstream)
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ func NewControlPlane(
|
|||||||
// Bind to WAN
|
// Bind to WAN
|
||||||
if len(global.WanInterface) > 0 {
|
if len(global.WanInterface) > 0 {
|
||||||
if err = core.setupSkPidMonitor(); err != nil {
|
if err = core.setupSkPidMonitor(); err != nil {
|
||||||
return nil, err
|
log.WithError(err).Warnln("cgroup2 is not enabled; pname routing cannot be used")
|
||||||
}
|
}
|
||||||
for _, ifname := range global.WanInterface {
|
for _, ifname := range global.WanInterface {
|
||||||
if err = core.bindWan(ifname, global.AutoConfigKernelParameter); err != nil {
|
if err = core.bindWan(ifname, global.AutoConfigKernelParameter); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user