cloud-dns-ios/dns/BlocklistOption.swift

69 lines
1.4 KiB
Swift

//
// BlocklistOption.swift
// dns
//
// Created by Benjamin Erhart on 14.04.26.
//
import Foundation
enum BlocklistOption: String, CaseIterable, Identifiable {
case secure = "Secure"
case securePlusAdblock = "Secure + Adblock"
var id: String { rawValue }
var enabled: Bool {
switch self {
case .secure:
return true
case .securePlusAdblock:
return false
}
}
var description: String {
switch self {
case .secure:
return "Malware and phishing protection"
case .securePlusAdblock:
return "Security plus ad and tracker blocking"
}
}
var icon: String {
switch self {
case .secure:
return "shield"
case .securePlusAdblock:
return "shield.righthalf.filled"
}
}
var server: String {
switch self {
case .secure:
return "dns.sr2.uk"
case .securePlusAdblock:
return "dnsplus.sr2.uk"
}
}
var ipv4: String {
switch self {
case .secure:
return "144.76.160.194"
case .securePlusAdblock:
return "192.0.2.1"
}
}
var ipv6: String {
switch self {
case .secure:
return "2a01:4f8:2210:23ea::4"
case .securePlusAdblock:
return "2001:db8::1"
}
}
}