removed unused comments and some styling

This commit is contained in:
Aliaksandr Dvoineu
2023-03-14 23:32:15 +03:00
parent 98b3518fef
commit 524f095904
33 changed files with 1 additions and 92 deletions

View File

@@ -391,5 +391,4 @@ class Client {
throw "Invalid URL Response received"
}
}
}

View File

@@ -197,5 +197,4 @@ class FirewallController: NSObject {
})
}
}
}

View File

@@ -423,56 +423,3 @@ func getLockdownBlockedDomains() -> LockdownDefaults {
}
return lockdownDefaults
}
// MARK: - Unused
//
//func getBlockedIPv4List(filename: String) -> Dictionary<String, IPRange> {
// var domains = [String : IPRange]()
// guard let path = Bundle.main.path(forResource: filename, ofType: "txt") else {
// return domains
// }
// do {
// let content = try String(contentsOfFile:path, encoding: String.Encoding.utf8)
// let lines = content.components(separatedBy: "\n")
// for line in lines {
// // CIDR
// if line.contains("/") {
// if let subnetBits = Int(line.split(separator: "/")[1]) {
// let d = String(line.split(separator: "/")[0])
// let mask = 0xffffffff ^ ((1 << (32 - subnetBits)) - 1)
// let subnetMask = String.init(format: "%d.%d.%d.%d", (mask & 0x00ff000000) >> 24, (mask & 0x00ff0000) >> 16, (mask & 0x0000ff00) >> 8, (mask & 0xff))
//
// domains[d] = IPRange.init(subnetMask: subnetMask, enabled: true, IPv6: false, subnetBits: subnetBits)
// }
// }
// // not CIDR, just feed the IP itself
// else {
// domains[line] = IPRange.init(subnetMask: "255.255.255.255", enabled: true, IPv6: false, subnetBits: 0)
// }
// }
// } catch _ as NSError {
// }
// return domains
//}
//
//func getBlockedIPv6List(filename: String) -> Dictionary<String, IPRange> {
// var domains = [String : IPRange]()
// guard let ipv6Path = Bundle.main.path(forResource: filename, ofType: "txt") else {
// return domains
// }
// do {
// let content = try String(contentsOfFile:ipv6Path, encoding: String.Encoding.utf8)
// let lines = content.components(separatedBy: "\n")
// for line in lines {
// if line.contains("/") {
// if let subnetBits = Int(line.split(separator: "/")[1]) {
// let d = String(line.split(separator: "/")[0])
// let subnetMask = "\(subnetBits)"
// domains[d] = IPRange.init(subnetMask: subnetMask, enabled: true, IPv6: true, subnetBits: subnetBits)
// }
// }
// }
// } catch _ as NSError {
// }
// return domains
//}

View File

@@ -66,5 +66,4 @@ class ContentBlockerRequestHandler: NSObject, NSExtensionRequestHandling {
context.completeRequest(returningItems: [item], completionHandler: nil)
}
}

View File

@@ -193,5 +193,4 @@ class FirewallTodayViewController: UIViewController, NCWidgetProviding {
@IBAction func openLockdown(sender: UIButton) {
openApp()
}
}

View File

@@ -81,5 +81,4 @@ class DNSCryptThread: Thread, DnscryptproxyCloakCallbackProtocol {
func logFatal(_ str: String) {
_dnsApp.logFatal(str)
}
}

View File

@@ -34,7 +34,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
}
override func cancelTunnelWithError(_ error: Error?) {
self.log("===== ERROR - cancelTunnelWithError \(error?.localizedDescription)")
self.log("===== ERROR - cancelTunnelWithError \(error?.localizedDescription ?? "")")
}
override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) {
@@ -73,7 +73,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
self.log("successfully stopped tunnel from reachability")
})
}
}
}
}

View File

@@ -76,6 +76,5 @@ struct CombinedProvider<Main: TimelineProvider, Supplemental: TimelineProvider>:
let timeline = Timeline<Entry>(entries: zippedEntries.map({ Entry.init(main: $0, supplemental: $1) }), policy: leftTimeline!.policy)
completion(timeline)
}
}
}

View File

@@ -38,7 +38,6 @@ struct StatusLabel: View {
.stroke(color, lineWidth: 4)
)
}
}
struct LoadingCircle: View {

View File

@@ -102,5 +102,4 @@ class EmailSignInViewController: BaseViewController, UITextFieldDelegate, Loadab
@IBAction func cancelTapped(_ sender: Any) {
self.dismiss(animated: true, completion: nil)
}
}

View File

@@ -169,5 +169,4 @@ class EmailSignUpViewController: BaseViewController, UITextFieldDelegate, Loadab
@IBAction func cancelTapped(_ sender: Any) {
self.dismiss(animated: true, completion: nil)
}
}

View File

@@ -72,5 +72,4 @@ class ForgotPasswordViewController: BaseViewController, UITextFieldDelegate, Loa
@IBAction func cancelTapped(_ sender: Any) {
self.dismiss(animated: true, completion: nil)
}
}

View File

@@ -94,5 +94,4 @@ class BlockListGroupViewController: BaseViewController, UITableViewDelegate, UIT
blockListVC?.reloadBlockLists()
self.navigationController?.popViewController(animated: true)
}
}

View File

@@ -11,5 +11,4 @@ class BlockLogCell: UITableViewCell {
@IBOutlet weak var logHost: UILabel?
@IBOutlet weak var time: UILabel!
}

View File

@@ -876,5 +876,4 @@ extension NEVPNStatus: CustomStringConvertible {
return "disconnecting"
}
}
}

View File

@@ -66,5 +66,4 @@ extension Loadable where Self: UIViewController {
}
}
}
}

View File

@@ -22,5 +22,4 @@ enum Mailto {
return mailtoURL
}
}

View File

@@ -12,5 +12,4 @@ class SetRegionCell: UITableViewCell {
@IBOutlet weak var regionFlag: UILabel!
@IBOutlet weak var regionName: UILabel!
@IBOutlet weak var regionSelected: UIButton!
}

View File

@@ -80,5 +80,4 @@ class SetRegionViewController: BaseViewController, UITableViewDataSource, UITabl
return cell
}
}

View File

@@ -76,13 +76,6 @@ final class StaticTableView: UITableView {
rows = []
}
// override func touchesShouldCancel(in view: UIView) -> Bool {
// if view is UIControl {
// return true
// }
// return super.touchesShouldCancel(in: view)
// }
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")

View File

@@ -78,5 +78,4 @@ class TitleViewController: BaseViewController {
@IBAction func whyTrustTapped(_ sender: Any) {
showWhyTrustPopup()
}
}

View File

@@ -153,5 +153,4 @@ class VPNController: NSObject {
})
})
}
}

View File

@@ -44,5 +44,4 @@ class WebViewViewController: BaseViewController, WKNavigationDelegate {
@IBAction func dismiss() {
self.dismiss(animated: true, completion: nil)
}
}

View File

@@ -193,6 +193,5 @@ class WhatIsVpnViewController: BaseViewController, AwesomeSpotlightViewDelegate
return bulletList
}
}

View File

@@ -20,5 +20,4 @@ class WhitelistAddCell: UITableViewCell {
}
@IBOutlet weak var addWhitelistDomain: UITextField!
}

View File

@@ -11,5 +11,4 @@ class WhitelistCell: UITableViewCell {
@IBOutlet weak var whitelistDomain: UILabel?
@IBOutlet weak var whitelistStatus: UILabel?
}

View File

@@ -235,5 +235,4 @@ class WhitelistViewController: BaseViewController, UITableViewDataSource, UITabl
let addDomainRow = tableView.numberOfRows(inSection: 0) - 1
self.tableView.scrollToRow(at: IndexPath.init(row: addDomainRow, section: 0), at: .middle, animated: true)
}
}

View File

@@ -42,5 +42,4 @@ class WhyTrustViewController: BaseViewController, UIScrollViewDelegate {
let pageIndex = round(scrollView.contentOffset.x/view.frame.width)
pageControl.currentPage = Int(pageIndex)
}
}

View File

@@ -324,5 +324,4 @@ extension PushNotifications {
return false
}
}
}

View File

@@ -130,7 +130,6 @@ extension PushNotifications.Authorization {
resolver.fulfill(.undetermined)
}
}
}
}
}

View File

@@ -70,5 +70,4 @@ public class SpeedTest: NSObject, URLSessionDelegate, URLSessionDataDelegate {
throw "Invalid URL string: \(urlString)"
}
}
}

View File

@@ -118,5 +118,4 @@ class VPNTodayViewController: UIViewController, NCWidgetProviding {
@IBAction func openLockdown(sender: UIButton) {
openApp()
}
}

View File

@@ -35,7 +35,6 @@ enum LatestKnowledge {
defaults.setValue(newValue, forKey: kLatestKnowledgeIsVPNEnabled)
}
}
}
func setUserWantsFirewallEnabled(_ enabled: Bool) {