Skip to content

Commit

Permalink
fix: running issue and no network on android (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 authored Jan 1, 2024
1 parent 5360893 commit e466295
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 0 additions & 4 deletions common/netutils/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ func tryUpdateSystemDnsElapse(k time.Duration) (err error) {

func tryUpdateSystemDns() (err error) {
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{}
for _, s := range dnsConf.servers {
ipPort := netip.MustParseAddrPort(s)
Expand Down
5 changes: 4 additions & 1 deletion component/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ func (s *Dns) InitUpstreams() {
for _, upstream := range s.upstream {
wg.Add(1)
go func(upstream *UpstreamResolver) {
upstream.GetUpstream()
_, err := upstream.GetUpstream()
if err != nil {
s.log.WithError(err).Debugln("Dns.GetUpstream")
}
wg.Done()
}(upstream)
}
Expand Down
2 changes: 1 addition & 1 deletion control/control_plane.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func NewControlPlane(
// Bind to WAN
if len(global.WanInterface) > 0 {
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 {
if err = core.bindWan(ifname, global.AutoConfigKernelParameter); err != nil {
Expand Down

0 comments on commit e466295

Please sign in to comment.