Android support for getting network addresses and interfaces (#1056)
* Replace unsupported network functions for android * Refactor default/android net addresses processing * Add default connection values, Refactor netenv * Fix compilation error * Combine network change default/android functions
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"context"
|
||||
"crypto/sha1"
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/safing/portbase/log"
|
||||
@@ -61,7 +60,7 @@ serviceLoop:
|
||||
// check network for changes
|
||||
// create hashsum of current network config
|
||||
hasher := sha1.New() //nolint:gosec // not used for security
|
||||
interfaces, err := net.Interfaces()
|
||||
interfaces, err := osGetNetworkInterfaces()
|
||||
if err != nil {
|
||||
log.Warningf("netenv: failed to get interfaces: %s", err)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user