WireGuardKitGo: update to latest wireguard-go tag
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
1 parent
9d5b376dcf
commit
27b32e60b2
5 files changed
+48
-38
No files matched your search
@@ -152,10 +152,6 @@ public class WireGuardAdapter {
|
||||
return
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
wgEnableRoaming(true)
|
||||
#endif
|
||||
|
||||
let networkMonitor = NWPathMonitor()
|
||||
networkMonitor.pathUpdateHandler = { [weak self] path in
|
||||
self?.didReceivePathUpdate(path: path)
|
||||
@@ -238,6 +234,9 @@ public class WireGuardAdapter {
|
||||
self.logEndpointResolutionResults(resolutionResults)
|
||||
|
||||
wgSetConfig(handle, wgConfig)
|
||||
#if os(iOS)
|
||||
wgDisableSomeRoamingForBrokenMobileSemantics(handle)
|
||||
#endif
|
||||
|
||||
self.state = .started(handle, settingsGenerator)
|
||||
|
||||
@@ -346,11 +345,13 @@ public class WireGuardAdapter {
|
||||
}
|
||||
|
||||
let handle = wgTurnOn(wgConfig, tunnelFileDescriptor)
|
||||
if handle >= 0 {
|
||||
return handle
|
||||
} else {
|
||||
if handle < 0 {
|
||||
throw WireGuardAdapterError.startWireGuardBackend(handle)
|
||||
}
|
||||
#if os(iOS)
|
||||
wgDisableSomeRoamingForBrokenMobileSemantics(handle)
|
||||
#endif
|
||||
return handle
|
||||
}
|
||||
|
||||
/// Resolves the hostnames in the given tunnel configuration and return settings generator.
|
||||
@@ -398,6 +399,7 @@ public class WireGuardAdapter {
|
||||
self.logEndpointResolutionResults(resolutionResults)
|
||||
|
||||
wgSetConfig(handle, wgConfig)
|
||||
wgDisableSomeRoamingForBrokenMobileSemantics(handle)
|
||||
wgBumpSockets(handle)
|
||||
} else {
|
||||
self.logHandler(.info, "Connectivity offline, pausing backend.")
|
||||
|
||||
Reference in new issue
Block a user