Skip to content

Commit

Permalink
#3: Add DNS servers
Browse files Browse the repository at this point in the history
  • Loading branch information
lika-vorobeva committed Sep 28, 2022
1 parent 3105805 commit 1ab2459
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// DNSServerType.swift
// SOLARdVPNCommunityCoreiOS
//
// Created by Lika Vorobeva on 28.09.2022.
//

import Foundation

enum DNSServerType: String, CaseIterable {
case handshake
case google
case cloudflare

var address: String {
switch self {
case .cloudflare:
return "1.1.1.1, 1.0.0.1"
case .google:
return "8.8.8.8, 8.8.4.4"
case .handshake:
return "103.196.38.38, 103.196.38.39"
}
}

static var `default`: DNSServerType {
return .handshake
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// StoresDNSServers.swift
// SOLARdVPNCommunityCoreiOS
//
// Created by Lika Vorobeva on 28.09.2022.
//

import Foundation

protocol StoresDNSServers {
func set(dns: DNSServerType)
var selectedDNS: DNSServerType { get }
}

0 comments on commit 1ab2459

Please sign in to comment.