Reorganize project structure

This commit is contained in:
Sergey Abramchuk
2018-07-18 15:33:11 +03:00
parent 5440663b12
commit a1c153d2ed
1750 changed files with 96 additions and 923 deletions
+32
View File
@@ -0,0 +1,32 @@
//
// ProfileLoader.swift
// OpenVPN Adapter
//
// Created by Sergey Abramchuk on 22.04.17.
//
//
import Foundation
enum ProfileType: String {
case localVPNServer = "local_vpn_server"
case remoteVPNServer = "remote_vpn_server"
}
struct ProfileLoader {
static func getVPNProfile(type: ProfileType) -> Data {
let fileName = type.rawValue
guard
let path = Bundle.current.url(forResource: fileName, withExtension: "ovpn"),
let profile = try? Data(contentsOf: path)
else {
fatalError("Failed to retrieve OpenVPN profile")
}
return profile
}
}