aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/Tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-08 17:05:58 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-08 17:07:28 +0100
commit0e2556544e617088d830dfb6d5ca53164a0d4c7c (patch)
treec79567fa3bb9e13f198982e0b55519c69f53e4b5 /WireGuard/WireGuard/Tunnel
parentwireguard-go-bridge: get rid of nopie warning (diff)
downloadwireguard-apple-0e2556544e617088d830dfb6d5ca53164a0d4c7c.tar.xz
wireguard-apple-0e2556544e617088d830dfb6d5ca53164a0d4c7c.zip
Global: fix swiftlint issues
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuard/WireGuard/Tunnel')
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift2
-rw-r--r--WireGuard/WireGuard/Tunnel/TunnelsManager.swift2
2 files changed, 1 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift b/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift
index b72223d5..38f1e6f4 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift
@@ -4,7 +4,6 @@
import Foundation
extension TunnelConfiguration {
- //swiftlint:disable:next function_body_length cyclomatic_complexity
convenience init(fromUapiConfig uapiConfig: String, basedOn base: TunnelConfiguration? = nil) throws {
var interfaceConfiguration: InterfaceConfiguration?
var peerConfigurations = [PeerConfiguration]()
@@ -103,7 +102,6 @@ extension TunnelConfiguration {
return interface
}
- //swiftlint:disable:next cyclomatic_complexity
private static func collate(peerAttributes attributes: [String: String]) throws -> PeerConfiguration {
guard let publicKeyString = attributes["public_key"] else {
throw ParseError.peerHasNoPublicKey
diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
index a7909ff3..8718ccf6 100644
--- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
+++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift
@@ -446,7 +446,6 @@ class TunnelContainer: NSObject {
isActivateOnDemandEnabled = tunnelProvider.isOnDemandEnabled
}
- //swiftlint:disable:next function_body_length
fileprivate func startActivation(recursionCount: UInt = 0, lastError: Error? = nil, activationDelegate: TunnelsManagerActivationDelegate?) {
if recursionCount >= 8 {
wg_log(.error, message: "startActivation: Failed after 8 attempts. Giving up with \(lastError!)")
@@ -532,6 +531,7 @@ extension NETunnelProviderManager {
}
return config
}
+
func setTunnelConfiguration(_ tunnelConfiguration: TunnelConfiguration) {
protocolConfiguration = NETunnelProviderProtocol(tunnelConfiguration: tunnelConfiguration, previouslyFrom: protocolConfiguration)
localizedDescription = tunnelConfiguration.name