Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Lazarus VPN/PacketTunnelProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {

override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) {
DDLog.removeAllLoggers()
DDLog.add(DDASLLogger.sharedInstance, with: DDLogLevel.info)
DDLog.add(DDOSLogger.sharedInstance, with: DDLogLevel.info)
ObserverFactory.currentFactory = DebugObserverFactory()
NSLog("-------------")

Expand Down Expand Up @@ -89,8 +89,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let raw_dom = dom.string!
let index = raw_dom.index(raw_dom.startIndex, offsetBy: 1)
let index2 = raw_dom.index(raw_dom.startIndex, offsetBy: 2)
let typeStr = raw_dom.substring(to: index)
let url = raw_dom.substring(from: index2)
let typeStr = String(raw_dom[..<index])
let url = String(raw_dom[index2...])

if typeStr == "s"{
rule_array.append(DomainListRule.MatchCriterion.suffix(url))
Expand Down Expand Up @@ -142,7 +142,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {

]
}
networkSettings.iPv4Settings = ipv4Settings
networkSettings.ipv4Settings = ipv4Settings

let proxySettings = NEProxySettings()
proxySettings.httpEnabled = true
Expand Down
22 changes: 14 additions & 8 deletions Lazarus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0810;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Fluid, LLC.";
TargetAttributes = {
09549ABE1DDF3B49000F198C = {
CreatedOnToolsVersion = 8.1;
DevelopmentTeam = 6578A826QL;
LastSwiftMigration = 0810;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.VPNLite = {
Expand All @@ -399,7 +399,7 @@
353C0FD71DDF393F00A46EBD = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 6578A826QL;
LastSwiftMigration = 0810;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.VPNLite = {
Expand All @@ -411,7 +411,7 @@
};
buildConfigurationList = 353C0FD31DDF393F00A46EBD /* Build configuration list for PBXProject "Lazarus" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -569,7 +569,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -596,7 +596,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -613,12 +613,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -650,6 +652,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -667,12 +670,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand All @@ -697,6 +702,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -716,7 +722,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -733,7 +739,7 @@
PRODUCT_BUNDLE_IDENTIFIER = fun.ignition.Lazarus;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Lazarus/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
24 changes: 0 additions & 24 deletions Lazarus/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,30 +149,6 @@
"idiom" : "ios-marketing",
"filename" : "ItunesArtwork@2x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "iphone",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@3x.png",
"scale" : "3x"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions Lazarus/Model/VPNManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class VPNManager {
self.vpnStatus = .disconnecting
case .disconnected, .invalid:
self.vpnStatus = .off
@unknown default:
fatalError()
}
print(self.vpnStatus)
}
Expand Down
10 changes: 5 additions & 5 deletions Lazarus/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ class ViewController: UIViewController {
self.status = VPNManager.shared.vpnStatus
}

func onVPNStatusChanged(){
@objc func onVPNStatusChanged(){
self.status = VPNManager.shared.vpnStatus
}

func updateConnectButton(){
switch status {
case .connecting:
connectButton.setTitle("Starting", for: UIControlState())
connectButton.setTitle("Starting", for: UIControl.State())
// statusLabel.text = "Starting"
case .disconnecting:
connectButton.setTitle("Disconnecting", for: UIControlState())
connectButton.setTitle("Disconnecting", for: UIControl.State())
// statusLabel.text = "Disconnecting"
case .on:
connectButton.setTitle("Protecting", for: UIControlState())
connectButton.setTitle("Protecting", for: UIControl.State())
// statusLabel.text = "Protecting"
case .off:
connectButton.setTitle("Start Protecting", for: UIControlState())
connectButton.setTitle("Start Protecting", for: UIControl.State())
// statusLabel.text = "Start Protecting"

}
Expand Down