aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model/DNSServer.swift
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-12-21 15:16:09 -0600
committerEric Kuck <eric@bluelinelabs.com>2018-12-21 16:32:08 -0600
commit1fecd8eb6c5c2327d4bfd5044876be12876fc7e5 (patch)
tree45c7f4c552eb01bd15c54e58615c9122acc99e83 /WireGuard/Shared/Model/DNSServer.swift
parentDo not require NetworkExtension to know its own name (diff)
downloadwireguard-apple-1fecd8eb6c5c2327d4bfd5044876be12876fc7e5.tar.xz
wireguard-apple-1fecd8eb6c5c2327d4bfd5044876be12876fc7e5.zip
providerConfiguration is now a WgQuickConfig
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to 'WireGuard/Shared/Model/DNSServer.swift')
-rw-r--r--WireGuard/Shared/Model/DNSServer.swift24
1 files changed, 0 insertions, 24 deletions
diff --git a/WireGuard/Shared/Model/DNSServer.swift b/WireGuard/Shared/Model/DNSServer.swift
index 8703fbba..9078b598 100644
--- a/WireGuard/Shared/Model/DNSServer.swift
+++ b/WireGuard/Shared/Model/DNSServer.swift
@@ -12,30 +12,6 @@ struct DNSServer {
}
}
-extension DNSServer: Codable {
- public func encode(to encoder: Encoder) throws {
- var container = encoder.singleValueContainer()
- try container.encode(stringRepresentation)
- }
-
- public init(from decoder: Decoder) throws {
- let values = try decoder.singleValueContainer()
- let addressString = try values.decode(String.self)
-
- if let address = IPv4Address(addressString) {
- self.address = address
- } else if let address = IPv6Address(addressString) {
- self.address = address
- } else {
- throw DecodingError.invalidData
- }
- }
-
- enum DecodingError: Error {
- case invalidData
- }
-}
-
extension DNSServer {
var stringRepresentation: String {
return "\(address)"