Show default gateway policy in configuration UI
This commit is contained in:
parent
e85c91ed79
commit
b3a509fbea
|
@ -87,6 +87,7 @@ class ConfigurationViewController: UIViewController, TableModelHost {
|
|||
} else {
|
||||
networkRows = []
|
||||
}
|
||||
networkRows.insert(.defaultGateway, at: 0)
|
||||
networkRows.append(.dnsDomain)
|
||||
networkRows.append(.httpProxy)
|
||||
networkRows.append(.httpsProxy)
|
||||
|
@ -197,6 +198,8 @@ extension ConfigurationViewController: UITableViewDataSource, UITableViewDelegat
|
|||
|
||||
case compressionAlgorithm
|
||||
|
||||
case defaultGateway
|
||||
|
||||
case dnsServer
|
||||
|
||||
case dnsDomain
|
||||
|
@ -304,12 +307,22 @@ extension ConfigurationViewController: UITableViewDataSource, UITableViewDelegat
|
|||
cell.accessoryType = .none
|
||||
cell.isTappable = false
|
||||
|
||||
case .defaultGateway:
|
||||
cell.leftText = L10n.Configuration.Cells.DefaultGateway.caption
|
||||
if let policies = configuration.routingPolicies {
|
||||
cell.rightText = policies.map { $0.rawValue }.joined(separator: " / ")
|
||||
} else {
|
||||
cell.rightText = V.All.Value.none
|
||||
}
|
||||
cell.accessoryType = .none
|
||||
cell.isTappable = false
|
||||
|
||||
case .dnsServer:
|
||||
guard let dnsServers = configuration.dnsServers else {
|
||||
fatalError("Showing DNS section without any custom server")
|
||||
}
|
||||
cell.leftText = L10n.Configuration.Cells.DnsServer.caption
|
||||
cell.rightText = dnsServers[indexPath.row]
|
||||
cell.rightText = dnsServers[indexPath.row - 1]
|
||||
cell.accessoryType = .none
|
||||
cell.isTappable = false
|
||||
|
||||
|
|
|
@ -181,6 +181,7 @@
|
|||
"configuration.cells.tls_wrapping.value.auth" = "Authentication";
|
||||
"configuration.cells.tls_wrapping.value.crypt" = "Encryption";
|
||||
"configuration.cells.eku.caption" = "Extended verification";
|
||||
"configuration.cells.default_gateway.caption" = "Default gateway";
|
||||
"configuration.cells.dns_server.caption" = "DNS";
|
||||
"configuration.cells.dns_domain.caption" = "Domain";
|
||||
"configuration.cells.proxy_http.caption" = "Proxy";
|
||||
|
|
|
@ -168,6 +168,10 @@ public enum L10n {
|
|||
public static let lzo = L10n.tr("Localizable", "configuration.cells.compression_framing.value.lzo")
|
||||
}
|
||||
}
|
||||
public enum DefaultGateway {
|
||||
/// Default gateway
|
||||
public static let caption = L10n.tr("Localizable", "configuration.cells.default_gateway.caption")
|
||||
}
|
||||
public enum Digest {
|
||||
/// Authentication
|
||||
public static let caption = L10n.tr("Localizable", "configuration.cells.digest.caption")
|
||||
|
|
Loading…
Reference in New Issue