Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: running issue and no network on android #264

Merged
merged 2 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -210,7 +210,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); err != nil {
Expand Down