summaryrefslogtreecommitdiffhomepage
path: root/ios/PacketTunnel/WireGuardAdapter
diff options
context:
space:
mode:
Diffstat (limited to 'ios/PacketTunnel/WireGuardAdapter')
-rw-r--r--ios/PacketTunnel/WireGuardAdapter/WgAdapter.swift4
-rw-r--r--ios/PacketTunnel/WireGuardAdapter/WireGuardAdapterError+Localization.swift8
2 files changed, 12 insertions, 0 deletions
diff --git a/ios/PacketTunnel/WireGuardAdapter/WgAdapter.swift b/ios/PacketTunnel/WireGuardAdapter/WgAdapter.swift
index cf52553a5e..dd2d562c2e 100644
--- a/ios/PacketTunnel/WireGuardAdapter/WgAdapter.swift
+++ b/ios/PacketTunnel/WireGuardAdapter/WgAdapter.swift
@@ -100,6 +100,10 @@ struct WgAdapter: TunnelAdapterProtocol {
let isUsingSameIP = (hasIPv4SameAddress || hasIPv6SameAddress) ? "" : "NOT "
logger.debug("Same IP is \(isUsingSameIP)being used")
}
+
+ public var icmpPingProvider: ICMPPingProvider {
+ adapter
+ }
}
extension WgAdapter: TunnelDeviceInfoProtocol {
diff --git a/ios/PacketTunnel/WireGuardAdapter/WireGuardAdapterError+Localization.swift b/ios/PacketTunnel/WireGuardAdapter/WireGuardAdapterError+Localization.swift
index 69806809d4..4ad6ffce0e 100644
--- a/ios/PacketTunnel/WireGuardAdapter/WireGuardAdapterError+Localization.swift
+++ b/ios/PacketTunnel/WireGuardAdapter/WireGuardAdapterError+Localization.swift
@@ -37,6 +37,14 @@ extension WireGuardAdapterError: LocalizedError {
return "Failure to start WireGuard backend (error code: \(code))."
case .noInterfaceIp:
return "Interface has no IP address specified."
+ case .noSuchTunnel:
+ return "No such WireGuard tunnel"
+ case .noTunnelVirtualInterface:
+ return "Tunnel has no virtual (IAN) interface"
+ case .icmpSocketNotOpen:
+ return "ICMP socket not open"
+ case let .internalError(code):
+ return "Internal error \(code)"
}
}
}