mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 00:36:38 +00:00
Feature/exit node Android (#1916)
Support exit node on Android. With the protect socket function, we mark every connection that should be used out of VPN.
This commit is contained in:
14
util/net/protectsocket_android.go
Normal file
14
util/net/protectsocket_android.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package net
|
||||
|
||||
import "sync"
|
||||
|
||||
var (
|
||||
androidProtectSocketLock sync.Mutex
|
||||
androidProtectSocket func(fd int32) bool
|
||||
)
|
||||
|
||||
func SetAndroidProtectSocketFn(f func(fd int32) bool) {
|
||||
androidProtectSocketLock.Lock()
|
||||
androidProtectSocket = f
|
||||
androidProtectSocketLock.Unlock()
|
||||
}
|
||||
Reference in New Issue
Block a user