aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-24 00:00:46 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-24 01:37:57 +0100
commit22625e8cc4792a71174af5fc69f0f63ba4b808d8 (patch)
tree2907ae3cde1b5d61acc831374058e9c4bde4b9f0 /WireGuard/Shared/Model
parentwireguard-go-bridge: allow querying internal settings (diff)
downloadwireguard-apple-22625e8cc4792a71174af5fc69f0f63ba4b808d8.tar.xz
wireguard-apple-22625e8cc4792a71174af5fc69f0f63ba4b808d8.zip
Tunnel: support getting runtime configuration
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'WireGuard/Shared/Model')
-rw-r--r--WireGuard/Shared/Model/PeerConfiguration.swift3
-rw-r--r--WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift2
2 files changed, 5 insertions, 0 deletions
diff --git a/WireGuard/Shared/Model/PeerConfiguration.swift b/WireGuard/Shared/Model/PeerConfiguration.swift
index 5271aa61..7fd3f87e 100644
--- a/WireGuard/Shared/Model/PeerConfiguration.swift
+++ b/WireGuard/Shared/Model/PeerConfiguration.swift
@@ -17,6 +17,9 @@ struct PeerConfiguration {
var allowedIPs = [IPAddressRange]()
var endpoint: Endpoint?
var persistentKeepAlive: UInt16?
+ var rxBytes: UInt64?
+ var txBytes: UInt64?
+ var lastHandshakeTime: Date?
init(publicKey: Data) {
self.publicKey = publicKey
diff --git a/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift b/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift
index 625c25d4..043914a4 100644
--- a/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift
+++ b/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift
@@ -28,6 +28,8 @@ extension TunnelConfiguration {
case peerHasInvalidAllowedIP(String)
case peerHasInvalidEndpoint(String)
case peerHasInvalidPersistentKeepAlive(String)
+ case peerHasInvalidTransferBytes(String)
+ case peerHasInvalidLastHandshakeTime(String)
case peerHasUnrecognizedKey(String)
case multiplePeersWithSamePublicKey
case multipleEntriesForKey(String)