mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-27 00:58:52 +01:00
c590518e0c
Support exit node on Android. With the protect socket function, we mark every connection that should be used out of VPN.
15 lines
272 B
Go
15 lines
272 B
Go
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()
|
|
}
|