Prefix top-level entities with OpenVPN*

This commit is contained in:
Davide De Rosa 2019-05-19 14:19:23 +02:00
parent 9c7ae47679
commit c4a84a5ade
11 changed files with 70 additions and 73 deletions

View File

@ -27,9 +27,9 @@ custom_categories:
- name: OpenVPN - name: OpenVPN
children: children:
- OpenVPN - OpenVPN
- SessionError - OpenVPNError
- SessionProxy - OpenVPNSession
- SessionProxyDelegate - OpenVPNSessionDelegate
- name: AppExtension - name: AppExtension
children: children:
- TunnelKitProvider - TunnelKitProvider

View File

@ -33,8 +33,8 @@
0E0B20412278A85C007A3CB9 /* RoutingTableEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E0B203E2278A85B007A3CB9 /* RoutingTableEntry.h */; }; 0E0B20412278A85C007A3CB9 /* RoutingTableEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E0B203E2278A85B007A3CB9 /* RoutingTableEntry.h */; };
0E0B20422278A85C007A3CB9 /* RoutingTableEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E0B203F2278A85B007A3CB9 /* RoutingTableEntry.m */; }; 0E0B20422278A85C007A3CB9 /* RoutingTableEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E0B203F2278A85B007A3CB9 /* RoutingTableEntry.m */; };
0E0B20432278A85C007A3CB9 /* RoutingTableEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E0B203F2278A85B007A3CB9 /* RoutingTableEntry.m */; }; 0E0B20432278A85C007A3CB9 /* RoutingTableEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E0B203F2278A85B007A3CB9 /* RoutingTableEntry.m */; };
0E0C2125212ED29D008AB282 /* SessionError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2123212ED29D008AB282 /* SessionError.swift */; }; 0E0C2125212ED29D008AB282 /* OpenVPNError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2123212ED29D008AB282 /* OpenVPNError.swift */; };
0E0C2126212ED29D008AB282 /* SessionError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2123212ED29D008AB282 /* SessionError.swift */; }; 0E0C2126212ED29D008AB282 /* OpenVPNError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2123212ED29D008AB282 /* OpenVPNError.swift */; };
0E0C2127212ED29D008AB282 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2124212ED29D008AB282 /* Configuration.swift */; }; 0E0C2127212ED29D008AB282 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2124212ED29D008AB282 /* Configuration.swift */; };
0E0C2128212ED29D008AB282 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2124212ED29D008AB282 /* Configuration.swift */; }; 0E0C2128212ED29D008AB282 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E0C2124212ED29D008AB282 /* Configuration.swift */; };
0E11089F1F77B9E800A92462 /* TunnelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E17D7F91F730D9F009EE129 /* TunnelKit.framework */; }; 0E11089F1F77B9E800A92462 /* TunnelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E17D7F91F730D9F009EE129 /* TunnelKit.framework */; };
@ -96,8 +96,8 @@
0E58BF5722411F3E006FB157 /* LZO.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E58BF5522411F37006FB157 /* LZO.h */; }; 0E58BF5722411F3E006FB157 /* LZO.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E58BF5522411F37006FB157 /* LZO.h */; };
0E58BF5922411FEF006FB157 /* LZO.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E58BF5822411FEF006FB157 /* LZO.m */; }; 0E58BF5922411FEF006FB157 /* LZO.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E58BF5822411FEF006FB157 /* LZO.m */; };
0E58BF5A22411FEF006FB157 /* LZO.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E58BF5822411FEF006FB157 /* LZO.m */; }; 0E58BF5A22411FEF006FB157 /* LZO.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E58BF5822411FEF006FB157 /* LZO.m */; };
0E749F5F2178885500BB2701 /* SessionProxy+PIA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E749F5E2178885500BB2701 /* SessionProxy+PIA.swift */; }; 0E749F5F2178885500BB2701 /* OpenVPNSession+PIA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E749F5E2178885500BB2701 /* OpenVPNSession+PIA.swift */; };
0E749F602178885500BB2701 /* SessionProxy+PIA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E749F5E2178885500BB2701 /* SessionProxy+PIA.swift */; }; 0E749F602178885500BB2701 /* OpenVPNSession+PIA.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E749F5E2178885500BB2701 /* OpenVPNSession+PIA.swift */; };
0E749F622178911D00BB2701 /* pia-2048.pem in Resources */ = {isa = PBXBuildFile; fileRef = 0E749F612178911C00BB2701 /* pia-2048.pem */; }; 0E749F622178911D00BB2701 /* pia-2048.pem in Resources */ = {isa = PBXBuildFile; fileRef = 0E749F612178911C00BB2701 /* pia-2048.pem */; };
0E9379C91F819A4300CE91B6 /* TunnelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E17D7F91F730D9F009EE129 /* TunnelKit.framework */; }; 0E9379C91F819A4300CE91B6 /* TunnelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E17D7F91F730D9F009EE129 /* TunnelKit.framework */; };
0EA82A282190B220007960EB /* TunnelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E3251C51F95770D00C108D9 /* TunnelKit.framework */; }; 0EA82A282190B220007960EB /* TunnelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E3251C51F95770D00C108D9 /* TunnelKit.framework */; };
@ -158,7 +158,7 @@
0EFEB4642006D3C800F81029 /* ReplayProtector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0EFEB4392006D3C800F81029 /* ReplayProtector.h */; }; 0EFEB4642006D3C800F81029 /* ReplayProtector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0EFEB4392006D3C800F81029 /* ReplayProtector.h */; };
0EFEB4652006D3C800F81029 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43A2006D3C800F81029 /* Authenticator.swift */; }; 0EFEB4652006D3C800F81029 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43A2006D3C800F81029 /* Authenticator.swift */; };
0EFEB4662006D3C800F81029 /* ZeroingData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43B2006D3C800F81029 /* ZeroingData.swift */; }; 0EFEB4662006D3C800F81029 /* ZeroingData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43B2006D3C800F81029 /* ZeroingData.swift */; };
0EFEB4672006D3C800F81029 /* SessionProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43C2006D3C800F81029 /* SessionProxy.swift */; }; 0EFEB4672006D3C800F81029 /* OpenVPNSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43C2006D3C800F81029 /* OpenVPNSession.swift */; };
0EFEB4682006D3C800F81029 /* MSS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43D2006D3C800F81029 /* MSS.m */; }; 0EFEB4682006D3C800F81029 /* MSS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43D2006D3C800F81029 /* MSS.m */; };
0EFEB4692006D3C800F81029 /* Packet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43E2006D3C800F81029 /* Packet.swift */; }; 0EFEB4692006D3C800F81029 /* Packet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43E2006D3C800F81029 /* Packet.swift */; };
0EFEB46B2006D3C800F81029 /* CryptoBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 0EFEB4402006D3C800F81029 /* CryptoBox.h */; }; 0EFEB46B2006D3C800F81029 /* CryptoBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 0EFEB4402006D3C800F81029 /* CryptoBox.h */; };
@ -182,7 +182,7 @@
0EFEB4962006D7F300F81029 /* ProtocolMacros.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB4382006D3C800F81029 /* ProtocolMacros.swift */; }; 0EFEB4962006D7F300F81029 /* ProtocolMacros.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB4382006D3C800F81029 /* ProtocolMacros.swift */; };
0EFEB4972006D7F300F81029 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43A2006D3C800F81029 /* Authenticator.swift */; }; 0EFEB4972006D7F300F81029 /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43A2006D3C800F81029 /* Authenticator.swift */; };
0EFEB4982006D7F300F81029 /* ZeroingData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43B2006D3C800F81029 /* ZeroingData.swift */; }; 0EFEB4982006D7F300F81029 /* ZeroingData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43B2006D3C800F81029 /* ZeroingData.swift */; };
0EFEB4992006D7F300F81029 /* SessionProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43C2006D3C800F81029 /* SessionProxy.swift */; }; 0EFEB4992006D7F300F81029 /* OpenVPNSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43C2006D3C800F81029 /* OpenVPNSession.swift */; };
0EFEB49A2006D7F300F81029 /* MSS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43D2006D3C800F81029 /* MSS.m */; }; 0EFEB49A2006D7F300F81029 /* MSS.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43D2006D3C800F81029 /* MSS.m */; };
0EFEB49B2006D7F300F81029 /* Packet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43E2006D3C800F81029 /* Packet.swift */; }; 0EFEB49B2006D7F300F81029 /* Packet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB43E2006D3C800F81029 /* Packet.swift */; };
0EFEB49C2006D7F300F81029 /* Data+Manipulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB4432006D3C800F81029 /* Data+Manipulation.swift */; }; 0EFEB49C2006D7F300F81029 /* Data+Manipulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFEB4432006D3C800F81029 /* Data+Manipulation.swift */; };
@ -244,7 +244,7 @@
0E07597D20F0060E00F38FD8 /* CryptoAEAD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CryptoAEAD.m; sourceTree = "<group>"; }; 0E07597D20F0060E00F38FD8 /* CryptoAEAD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CryptoAEAD.m; sourceTree = "<group>"; };
0E0B203E2278A85B007A3CB9 /* RoutingTableEntry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoutingTableEntry.h; sourceTree = "<group>"; }; 0E0B203E2278A85B007A3CB9 /* RoutingTableEntry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoutingTableEntry.h; sourceTree = "<group>"; };
0E0B203F2278A85B007A3CB9 /* RoutingTableEntry.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoutingTableEntry.m; sourceTree = "<group>"; }; 0E0B203F2278A85B007A3CB9 /* RoutingTableEntry.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoutingTableEntry.m; sourceTree = "<group>"; };
0E0C2123212ED29D008AB282 /* SessionError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionError.swift; sourceTree = "<group>"; }; 0E0C2123212ED29D008AB282 /* OpenVPNError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenVPNError.swift; sourceTree = "<group>"; };
0E0C2124212ED29D008AB282 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; }; 0E0C2124212ED29D008AB282 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; };
0E11089A1F77B9E800A92462 /* TunnelKitTests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TunnelKitTests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 0E11089A1F77B9E800A92462 /* TunnelKitTests-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TunnelKitTests-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
0E11089E1F77B9E800A92462 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 0E11089E1F77B9E800A92462 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -287,7 +287,7 @@
0E58BF5822411FEF006FB157 /* LZO.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LZO.m; sourceTree = "<group>"; }; 0E58BF5822411FEF006FB157 /* LZO.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LZO.m; sourceTree = "<group>"; };
0E6479DD212EAC96008E6888 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 0E6479DD212EAC96008E6888 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0E6479E0212EACD6008E6888 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 0E6479E0212EACD6008E6888 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0E749F5E2178885500BB2701 /* SessionProxy+PIA.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SessionProxy+PIA.swift"; sourceTree = "<group>"; }; 0E749F5E2178885500BB2701 /* OpenVPNSession+PIA.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OpenVPNSession+PIA.swift"; sourceTree = "<group>"; };
0E749F612178911C00BB2701 /* pia-2048.pem */ = {isa = PBXFileReference; lastKnownFileType = text; path = "pia-2048.pem"; sourceTree = "<group>"; }; 0E749F612178911C00BB2701 /* pia-2048.pem */ = {isa = PBXFileReference; lastKnownFileType = text; path = "pia-2048.pem"; sourceTree = "<group>"; };
0E85A25B202CCA3D0059E9F9 /* TunnelKitHost.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TunnelKitHost.entitlements; sourceTree = "<group>"; }; 0E85A25B202CCA3D0059E9F9 /* TunnelKitHost.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TunnelKitHost.entitlements; sourceTree = "<group>"; };
0EA82A232190B220007960EB /* TunnelKitTests-macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TunnelKitTests-macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 0EA82A232190B220007960EB /* TunnelKitTests-macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TunnelKitTests-macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -326,7 +326,7 @@
0EFEB4392006D3C800F81029 /* ReplayProtector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplayProtector.h; sourceTree = "<group>"; }; 0EFEB4392006D3C800F81029 /* ReplayProtector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReplayProtector.h; sourceTree = "<group>"; };
0EFEB43A2006D3C800F81029 /* Authenticator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Authenticator.swift; sourceTree = "<group>"; }; 0EFEB43A2006D3C800F81029 /* Authenticator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Authenticator.swift; sourceTree = "<group>"; };
0EFEB43B2006D3C800F81029 /* ZeroingData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZeroingData.swift; sourceTree = "<group>"; }; 0EFEB43B2006D3C800F81029 /* ZeroingData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZeroingData.swift; sourceTree = "<group>"; };
0EFEB43C2006D3C800F81029 /* SessionProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionProxy.swift; sourceTree = "<group>"; }; 0EFEB43C2006D3C800F81029 /* OpenVPNSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenVPNSession.swift; sourceTree = "<group>"; };
0EFEB43D2006D3C800F81029 /* MSS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSS.m; sourceTree = "<group>"; }; 0EFEB43D2006D3C800F81029 /* MSS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSS.m; sourceTree = "<group>"; };
0EFEB43E2006D3C800F81029 /* Packet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Packet.swift; sourceTree = "<group>"; }; 0EFEB43E2006D3C800F81029 /* Packet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Packet.swift; sourceTree = "<group>"; };
0EFEB4402006D3C800F81029 /* CryptoBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoBox.h; sourceTree = "<group>"; }; 0EFEB4402006D3C800F81029 /* CryptoBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoBox.h; sourceTree = "<group>"; };
@ -564,6 +564,9 @@
0EFEB42D2006D3C800F81029 /* MSS.h */, 0EFEB42D2006D3C800F81029 /* MSS.h */,
0EFEB43D2006D3C800F81029 /* MSS.m */, 0EFEB43D2006D3C800F81029 /* MSS.m */,
0EE2F97622916A5D00F56F49 /* OpenVPN.swift */, 0EE2F97622916A5D00F56F49 /* OpenVPN.swift */,
0E0C2123212ED29D008AB282 /* OpenVPNError.swift */,
0EFEB43C2006D3C800F81029 /* OpenVPNSession.swift */,
0E749F5E2178885500BB2701 /* OpenVPNSession+PIA.swift */,
0EFEB43E2006D3C800F81029 /* Packet.swift */, 0EFEB43E2006D3C800F81029 /* Packet.swift */,
0EE7A79420F61EDC00B42E6A /* PacketMacros.h */, 0EE7A79420F61EDC00B42E6A /* PacketMacros.h */,
0EE7A79720F6296F00B42E6A /* PacketMacros.m */, 0EE7A79720F6296F00B42E6A /* PacketMacros.m */,
@ -573,10 +576,7 @@
0E3E0F202108A8CC00B371C1 /* PushReply.swift */, 0E3E0F202108A8CC00B371C1 /* PushReply.swift */,
0EFEB4392006D3C800F81029 /* ReplayProtector.h */, 0EFEB4392006D3C800F81029 /* ReplayProtector.h */,
0EFEB4482006D3C800F81029 /* ReplayProtector.m */, 0EFEB4482006D3C800F81029 /* ReplayProtector.m */,
0E0C2123212ED29D008AB282 /* SessionError.swift */,
0EFEB42B2006D3C800F81029 /* SessionKey.swift */, 0EFEB42B2006D3C800F81029 /* SessionKey.swift */,
0EFEB43C2006D3C800F81029 /* SessionProxy.swift */,
0E749F5E2178885500BB2701 /* SessionProxy+PIA.swift */,
0EE3B3E321471C3A0027AB17 /* StaticKey.swift */, 0EE3B3E321471C3A0027AB17 /* StaticKey.swift */,
0EFEB4442006D3C800F81029 /* TLSBox.h */, 0EFEB4442006D3C800F81029 /* TLSBox.h */,
0EFEB4302006D3C800F81029 /* TLSBox.m */, 0EFEB4302006D3C800F81029 /* TLSBox.m */,
@ -1104,13 +1104,13 @@
0E0B20422278A85C007A3CB9 /* RoutingTableEntry.m in Sources */, 0E0B20422278A85C007A3CB9 /* RoutingTableEntry.m in Sources */,
0E58BF5922411FEF006FB157 /* LZO.m in Sources */, 0E58BF5922411FEF006FB157 /* LZO.m in Sources */,
0E12B29E21449ADB00B4BAE9 /* NSRegularExpression+Shortcuts.swift in Sources */, 0E12B29E21449ADB00B4BAE9 /* NSRegularExpression+Shortcuts.swift in Sources */,
0E749F5F2178885500BB2701 /* SessionProxy+PIA.swift in Sources */, 0E749F5F2178885500BB2701 /* OpenVPNSession+PIA.swift in Sources */,
0EE3B3E421471C3A0027AB17 /* StaticKey.swift in Sources */, 0EE3B3E421471C3A0027AB17 /* StaticKey.swift in Sources */,
0EFEB4622006D3C800F81029 /* SecureRandom.swift in Sources */, 0EFEB4622006D3C800F81029 /* SecureRandom.swift in Sources */,
0EFEB45D2006D3C800F81029 /* CryptoBox.m in Sources */, 0EFEB45D2006D3C800F81029 /* CryptoBox.m in Sources */,
0E3B15C92152B05E00984B17 /* CryptoCTR.m in Sources */, 0E3B15C92152B05E00984B17 /* CryptoCTR.m in Sources */,
0E011F7D2196D97200BA59EE /* EndpointProtocol.swift in Sources */, 0E011F7D2196D97200BA59EE /* EndpointProtocol.swift in Sources */,
0E0C2125212ED29D008AB282 /* SessionError.swift in Sources */, 0E0C2125212ED29D008AB282 /* OpenVPNError.swift in Sources */,
0E12B2A821456C0200B4BAE9 /* ControlChannel.swift in Sources */, 0E12B2A821456C0200B4BAE9 /* ControlChannel.swift in Sources */,
0EFEB4552006D3C800F81029 /* EncryptionBridge.swift in Sources */, 0EFEB4552006D3C800F81029 /* EncryptionBridge.swift in Sources */,
0EFEB45C2006D3C800F81029 /* ZeroingData.m in Sources */, 0EFEB45C2006D3C800F81029 /* ZeroingData.m in Sources */,
@ -1136,7 +1136,7 @@
0E58BF3922405410006FB157 /* minilzo.c in Sources */, 0E58BF3922405410006FB157 /* minilzo.c in Sources */,
0EFEB4702006D3C800F81029 /* Allocation.m in Sources */, 0EFEB4702006D3C800F81029 /* Allocation.m in Sources */,
0E041D092152E6FE0025FE3C /* TLSWrap.swift in Sources */, 0E041D092152E6FE0025FE3C /* TLSWrap.swift in Sources */,
0EFEB4672006D3C800F81029 /* SessionProxy.swift in Sources */, 0EFEB4672006D3C800F81029 /* OpenVPNSession.swift in Sources */,
0ED9C8642138139000621BA3 /* CompressionFraming.swift in Sources */, 0ED9C8642138139000621BA3 /* CompressionFraming.swift in Sources */,
0EFEB4722006D3C800F81029 /* ReplayProtector.m in Sources */, 0EFEB4722006D3C800F81029 /* ReplayProtector.m in Sources */,
0E3E0F212108A8CC00B371C1 /* PushReply.swift in Sources */, 0E3E0F212108A8CC00B371C1 /* PushReply.swift in Sources */,
@ -1165,13 +1165,13 @@
0E58BF5A22411FEF006FB157 /* LZO.m in Sources */, 0E58BF5A22411FEF006FB157 /* LZO.m in Sources */,
0E12B29F21449ADB00B4BAE9 /* NSRegularExpression+Shortcuts.swift in Sources */, 0E12B29F21449ADB00B4BAE9 /* NSRegularExpression+Shortcuts.swift in Sources */,
0EFEB4A02006D7F300F81029 /* ReplayProtector.m in Sources */, 0EFEB4A02006D7F300F81029 /* ReplayProtector.m in Sources */,
0E749F602178885500BB2701 /* SessionProxy+PIA.swift in Sources */, 0E749F602178885500BB2701 /* OpenVPNSession+PIA.swift in Sources */,
0EFEB4992006D7F300F81029 /* SessionProxy.swift in Sources */, 0EFEB4992006D7F300F81029 /* OpenVPNSession.swift in Sources */,
0EE3B3E521471C3A0027AB17 /* StaticKey.swift in Sources */, 0EE3B3E521471C3A0027AB17 /* StaticKey.swift in Sources */,
0EFEB4962006D7F300F81029 /* ProtocolMacros.swift in Sources */, 0EFEB4962006D7F300F81029 /* ProtocolMacros.swift in Sources */,
0E3B15CA2152B05E00984B17 /* CryptoCTR.m in Sources */, 0E3B15CA2152B05E00984B17 /* CryptoCTR.m in Sources */,
0E011F7E2196D97200BA59EE /* EndpointProtocol.swift in Sources */, 0E011F7E2196D97200BA59EE /* EndpointProtocol.swift in Sources */,
0E0C2126212ED29D008AB282 /* SessionError.swift in Sources */, 0E0C2126212ED29D008AB282 /* OpenVPNError.swift in Sources */,
0E12B2A921456C0200B4BAE9 /* ControlChannel.swift in Sources */, 0E12B2A921456C0200B4BAE9 /* ControlChannel.swift in Sources */,
0EFEB4982006D7F300F81029 /* ZeroingData.swift in Sources */, 0EFEB4982006D7F300F81029 /* ZeroingData.swift in Sources */,
0EFEB4A32006D7F300F81029 /* Errors.m in Sources */, 0EFEB4A32006D7F300F81029 /* Errors.m in Sources */,

View File

@ -172,7 +172,7 @@ extension OpenVPN {
let prefix = controlBuffer.withOffset(0, count: prefixLength) let prefix = controlBuffer.withOffset(0, count: prefixLength)
guard prefix.isEqual(to: ProtocolMacros.tlsPrefix) else { guard prefix.isEqual(to: ProtocolMacros.tlsPrefix) else {
throw SessionError.wrongControlDataPrefix throw OpenVPNError.wrongControlDataPrefix
} }
var offset = ProtocolMacros.tlsPrefix.count var offset = ProtocolMacros.tlsPrefix.count

View File

@ -167,7 +167,7 @@ extension OpenVPN {
static let compressionFraming: CompressionFraming = .disabled static let compressionFraming: CompressionFraming = .disabled
} }
/// The way to create a `Configuration` object for a `SessionProxy`. /// The way to create a `Configuration` object for a `OpenVPNSession`.
public struct ConfigurationBuilder { public struct ConfigurationBuilder {
// MARK: General // MARK: General
@ -232,10 +232,10 @@ extension OpenVPN {
// MARK: Routing // MARK: Routing
/// The settings for IPv4. `SessionProxy` only evaluates this server-side. /// The settings for IPv4. `OpenVPNSession` only evaluates this server-side.
public var ipv4: IPv4Settings? public var ipv4: IPv4Settings?
/// The settings for IPv6. `SessionProxy` only evaluates this server-side. /// The settings for IPv6. `OpenVPNSession` only evaluates this server-side.
public var ipv6: IPv6Settings? public var ipv6: IPv6Settings?
/// The DNS servers. /// The DNS servers.
@ -314,7 +314,7 @@ extension OpenVPN {
} }
} }
/// The immutable configuration for `SessionProxy`. /// The immutable configuration for `OpenVPNSession`.
public struct Configuration: Codable { public struct Configuration: Codable {
/// - Seealso: `ConfigurationBuilder.cipher` /// - Seealso: `ConfigurationBuilder.cipher`

View File

@ -266,7 +266,7 @@ extension OpenVPN {
isContinuation = ($0.first == "2") isContinuation = ($0.first == "2")
} }
guard !isContinuation else { guard !isContinuation else {
throw SessionError.continuationPushReply throw OpenVPNError.continuationPushReply
} }
// MARK: Inline content // MARK: Inline content

View File

@ -191,11 +191,11 @@ extension OpenVPN {
// Ruby: handle_acks // Ruby: handle_acks
private func readAcks(_ packetIds: [UInt32], acksRemoteSessionId: Data) throws { private func readAcks(_ packetIds: [UInt32], acksRemoteSessionId: Data) throws {
guard let sessionId = sessionId else { guard let sessionId = sessionId else {
throw SessionError.missingSessionId throw OpenVPNError.missingSessionId
} }
guard acksRemoteSessionId == sessionId else { guard acksRemoteSessionId == sessionId else {
log.error("Control: Ack session mismatch (\(acksRemoteSessionId.toHex()) != \(sessionId.toHex()))") log.error("Control: Ack session mismatch (\(acksRemoteSessionId.toHex()) != \(sessionId.toHex()))")
throw SessionError.sessionMismatch throw OpenVPNError.sessionMismatch
} }
// drop queued out packets if ack-ed // drop queued out packets if ack-ed
@ -213,7 +213,7 @@ extension OpenVPN {
func writeAcks(withKey key: UInt8, ackPacketIds: [UInt32], ackRemoteSessionId: Data) throws -> Data { func writeAcks(withKey key: UInt8, ackPacketIds: [UInt32], ackRemoteSessionId: Data) throws -> Data {
guard let sessionId = sessionId else { guard let sessionId = sessionId else {
throw SessionError.missingSessionId throw OpenVPNError.missingSessionId
} }
let packet = ControlPacket(key: key, sessionId: sessionId, ackIds: ackPacketIds as [NSNumber], ackRemoteSessionId: ackRemoteSessionId) let packet = ControlPacket(key: key, sessionId: sessionId, ackIds: ackPacketIds as [NSNumber], ackRemoteSessionId: ackRemoteSessionId)
log.debug("Control: Write ack packet \(packet)") log.debug("Control: Write ack packet \(packet)")

View File

@ -47,7 +47,7 @@ extension OpenVPN {
private let box: CryptoBox private let box: CryptoBox
/** /**
Initializes the PRNG. Must be issued before using `SessionProxy`. Initializes the PRNG. Must be issued before using `OpenVPNSession`.
- Parameter seedLength: The length in bytes of the pseudorandom seed that will feed the PRNG. - Parameter seedLength: The length in bytes of the pseudorandom seed that will feed the PRNG.
*/ */

View File

@ -1,5 +1,5 @@
// //
// SessionError.swift // OpenVPNError.swift
// TunnelKit // TunnelKit
// //
// Created by Davide De Rosa on 8/23/18. // Created by Davide De Rosa on 8/23/18.
@ -37,8 +37,8 @@
import Foundation import Foundation
import __TunnelKitCore import __TunnelKitCore
/// The possible errors raised/thrown during `SessionProxy` operation. /// The possible errors raised/thrown during `OpenVPNSession` operation.
public enum SessionError: String, Error { public enum OpenVPNError: String, Error {
/// The negotiation timed out. /// The negotiation timed out.
case negotiationTimeout case negotiationTimeout

View File

@ -1,5 +1,5 @@
// //
// SessionProxy+PIA.swift // OpenVPNSession+PIA.swift
// TunnelKit // TunnelKit
// //
// Created by Davide De Rosa on 10/18/18. // Created by Davide De Rosa on 10/18/18.
@ -36,7 +36,7 @@
import Foundation import Foundation
extension SessionProxy { extension OpenVPNSession {
struct PIAHardReset { struct PIAHardReset {
private static let obfuscationKeyLength = 3 private static let obfuscationKeyLength = 3

View File

@ -1,5 +1,5 @@
// //
// SessionProxy.swift // OpenVPNSession.swift
// TunnelKit // TunnelKit
// //
// Created by Davide De Rosa on 2/3/17. // Created by Davide De Rosa on 2/3/17.
@ -41,8 +41,8 @@ import __TunnelKitOpenVPN
private let log = SwiftyBeaver.self private let log = SwiftyBeaver.self
/// Observes major events notified by a `SessionProxy`. /// Observes major events notified by a `OpenVPNSession`.
public protocol SessionProxyDelegate: class { public protocol OpenVPNSessionDelegate: class {
/** /**
Called after starting a session. Called after starting a session.
@ -50,19 +50,19 @@ public protocol SessionProxyDelegate: class {
- Parameter remoteAddress: The address of the VPN server. - Parameter remoteAddress: The address of the VPN server.
- Parameter options: The pulled tunnel settings. - Parameter options: The pulled tunnel settings.
*/ */
func sessionDidStart(_: SessionProxy, remoteAddress: String, options: OpenVPN.PushReply) func sessionDidStart(_: OpenVPNSession, remoteAddress: String, options: OpenVPN.Configuration)
/** /**
Called after stopping a session. Called after stopping a session.
- Parameter shouldReconnect: When `true`, the session can/should be restarted. Usually because the stop reason was recoverable. - Parameter shouldReconnect: When `true`, the session can/should be restarted. Usually because the stop reason was recoverable.
- Seealso: `SessionProxy.reconnect(...)` - Seealso: `OpenVPNSession.reconnect(...)`
*/ */
func sessionDidStop(_: SessionProxy, shouldReconnect: Bool) func sessionDidStop(_: OpenVPNSession, shouldReconnect: Bool)
} }
/// Provides methods to set up and maintain an OpenVPN session. /// Provides methods to set up and maintain an OpenVPN session.
public class SessionProxy { public class OpenVPNSession {
private enum StopMethod { private enum StopMethod {
case shutdown case shutdown
@ -97,8 +97,8 @@ public class SessionProxy {
return interval return interval
} }
/// An optional `SessionProxyDelegate` for receiving session events. /// An optional `OpenVPNSessionDelegate` for receiving session events.
public weak var delegate: SessionProxyDelegate? public weak var delegate: OpenVPNSessionDelegate?
// MARK: State // MARK: State
@ -341,10 +341,10 @@ public class SessionProxy {
} }
/** /**
Shuts down the session with an optional `Error` reason and signals a reconnect flag to `SessionProxyDelegate.sessionDidStop(...)`. Does nothing if the session is already stopped or about to stop. Shuts down the session with an optional `Error` reason and signals a reconnect flag to `OpenVPNSessionDelegate.sessionDidStop(...)`. Does nothing if the session is already stopped or about to stop.
- Parameter error: An optional `Error` being the reason of the shutdown. - Parameter error: An optional `Error` being the reason of the shutdown.
- Seealso: `SessionProxyDelegate.sessionDidStop(...)` - Seealso: `OpenVPNSessionDelegate.sessionDidStop(...)`
*/ */
public func reconnect(error: Error?) { public func reconnect(error: Error?) {
guard !isStopping else { guard !isStopping else {
@ -402,11 +402,11 @@ public class SessionProxy {
} }
guard !negotiationKey.didHardResetTimeOut(link: link) else { guard !negotiationKey.didHardResetTimeOut(link: link) else {
doReconnect(error: SessionError.negotiationTimeout) doReconnect(error: OpenVPNError.negotiationTimeout)
return return
} }
guard !negotiationKey.didNegotiationTimeOut(link: link) else { guard !negotiationKey.didNegotiationTimeOut(link: link) else {
doShutdown(error: SessionError.negotiationTimeout) doShutdown(error: OpenVPNError.negotiationTimeout)
return return
} }
@ -499,7 +499,7 @@ public class SessionProxy {
let key = firstByte & 0b111 let key = firstByte & 0b111
guard let _ = keys[key] else { guard let _ = keys[key] else {
log.error("Key with id \(key) not found") log.error("Key with id \(key) not found")
deferStop(.shutdown, SessionError.badKey) deferStop(.shutdown, OpenVPNError.badKey)
return return
} }
@ -526,7 +526,7 @@ public class SessionProxy {
// return // return
} }
if (code == .hardResetServerV2) && (negotiationKey.controlState == .connected) { if (code == .hardResetServerV2) && (negotiationKey.controlState == .connected) {
deferStop(.shutdown, SessionError.staleSession) deferStop(.shutdown, OpenVPNError.staleSession)
return return
} else if (code == .softResetV1) && !negotiationKey.softReset { } else if (code == .softResetV1) && !negotiationKey.softReset {
softReset(isServerInitiated: true) softReset(isServerInitiated: true)
@ -567,7 +567,7 @@ public class SessionProxy {
let now = Date() let now = Date()
guard (now.timeIntervalSince(lastPing.inbound) <= CoreConfiguration.OpenVPN.pingTimeout) else { guard (now.timeIntervalSince(lastPing.inbound) <= CoreConfiguration.OpenVPN.pingTimeout) else {
deferStop(.shutdown, SessionError.pingTimeout) deferStop(.shutdown, OpenVPNError.pingTimeout)
return return
} }
@ -766,7 +766,7 @@ public class SessionProxy {
private func handleControlPacket(_ packet: ControlPacket) { private func handleControlPacket(_ packet: ControlPacket) {
guard packet.key == negotiationKey.id else { guard packet.key == negotiationKey.id else {
log.error("Bad key in control packet (\(packet.key) != \(negotiationKey.id))") log.error("Bad key in control packet (\(packet.key) != \(negotiationKey.id))")
// deferStop(.shutdown, SessionError.badKey) // deferStop(.shutdown, OpenVPNError.badKey)
return return
} }
@ -779,12 +779,12 @@ public class SessionProxy {
} }
guard let remoteSessionId = controlChannel.remoteSessionId else { guard let remoteSessionId = controlChannel.remoteSessionId else {
log.error("No remote sessionId (never set)") log.error("No remote sessionId (never set)")
deferStop(.shutdown, SessionError.missingSessionId) deferStop(.shutdown, OpenVPNError.missingSessionId)
return return
} }
guard packet.sessionId == remoteSessionId else { guard packet.sessionId == remoteSessionId else {
log.error("Packet session mismatch (\(packet.sessionId.toHex()) != \(remoteSessionId.toHex()))") log.error("Packet session mismatch (\(packet.sessionId.toHex()) != \(remoteSessionId.toHex()))")
deferStop(.shutdown, SessionError.sessionMismatch) deferStop(.shutdown, OpenVPNError.sessionMismatch)
return return
} }
@ -829,12 +829,12 @@ public class SessionProxy {
else if ((packet.code == .controlV1) && (negotiationKey.state == .tls)) { else if ((packet.code == .controlV1) && (negotiationKey.state == .tls)) {
guard let remoteSessionId = controlChannel.remoteSessionId else { guard let remoteSessionId = controlChannel.remoteSessionId else {
log.error("No remote sessionId found in packet (control packets before server HARD_RESET)") log.error("No remote sessionId found in packet (control packets before server HARD_RESET)")
deferStop(.shutdown, SessionError.missingSessionId) deferStop(.shutdown, OpenVPNError.missingSessionId)
return return
} }
guard packet.sessionId == remoteSessionId else { guard packet.sessionId == remoteSessionId else {
log.error("Packet session mismatch (\(packet.sessionId.toHex()) != \(remoteSessionId.toHex()))") log.error("Packet session mismatch (\(packet.sessionId.toHex()) != \(remoteSessionId.toHex()))")
deferStop(.shutdown, SessionError.sessionMismatch) deferStop(.shutdown, OpenVPNError.sessionMismatch)
return return
} }
@ -921,11 +921,11 @@ public class SessionProxy {
if authenticator?.withLocalOptions ?? false { if authenticator?.withLocalOptions ?? false {
log.warning("Authentication failure, retrying without local options") log.warning("Authentication failure, retrying without local options")
withLocalOptions = false withLocalOptions = false
deferStop(.reconnect, SessionError.badCredentials) deferStop(.reconnect, OpenVPNError.badCredentials)
return return
} }
deferStop(.shutdown, SessionError.badCredentials) deferStop(.shutdown, OpenVPNError.badCredentials)
return return
} }
@ -959,15 +959,15 @@ public class SessionProxy {
case .LZO: case .LZO:
if !LZOIsSupported() { if !LZOIsSupported() {
log.error("Server has LZO compression enabled and this was not built into the library (framing=\(framing))") log.error("Server has LZO compression enabled and this was not built into the library (framing=\(framing))")
throw SessionError.serverCompression throw OpenVPNError.serverCompression
} }
case .other: case .other:
log.error("Server has non-LZO compression enabled and this is currently unsupported (framing=\(framing))") log.error("Server has non-LZO compression enabled and this is currently unsupported (framing=\(framing))")
throw SessionError.serverCompression throw OpenVPNError.serverCompression
} }
} }
} catch SessionError.continuationPushReply { } catch OpenVPNError.continuationPushReply {
continuatedPushReplyMessage = completeMessage.replacingOccurrences(of: "push-continuation", with: "") continuatedPushReplyMessage = completeMessage.replacingOccurrences(of: "push-continuation", with: "")
// FIXME: strip "PUSH_REPLY" and "push-continuation 2" // FIXME: strip "PUSH_REPLY" and "push-continuation 2"
return return
@ -978,7 +978,7 @@ public class SessionProxy {
pushReply = reply pushReply = reply
guard reply.options.ipv4 != nil || reply.options.ipv6 != nil else { guard reply.options.ipv4 != nil || reply.options.ipv6 != nil else {
deferStop(.shutdown, SessionError.noRouting) deferStop(.shutdown, OpenVPNError.noRouting)
return return
} }
@ -987,7 +987,7 @@ public class SessionProxy {
guard let remoteAddress = link?.remoteAddress else { guard let remoteAddress = link?.remoteAddress else {
fatalError("Could not resolve link remote address") fatalError("Could not resolve link remote address")
} }
delegate?.sessionDidStart(self, remoteAddress: remoteAddress, options: reply) delegate?.sessionDidStart(self, remoteAddress: remoteAddress, options: reply.options)
scheduleNextPing() scheduleNextPing()
} }
@ -1039,7 +1039,7 @@ public class SessionProxy {
if let error = error { if let error = error {
self?.queue.sync { self?.queue.sync {
log.error("Failed LINK write during control flush: \(error)") log.error("Failed LINK write during control flush: \(error)")
self?.deferStop(.shutdown, SessionError.failedLinkWrite) self?.deferStop(.shutdown, OpenVPNError.failedLinkWrite)
} }
return return
} }
@ -1169,7 +1169,7 @@ public class SessionProxy {
self?.queue.sync { self?.queue.sync {
log.error("Data: Failed LINK write during send data: \(error)") log.error("Data: Failed LINK write during send data: \(error)")
self?.deferStop(.shutdown, SessionError.failedLinkWrite) self?.deferStop(.shutdown, OpenVPNError.failedLinkWrite)
} }
return return
} }
@ -1210,7 +1210,7 @@ public class SessionProxy {
if let error = error { if let error = error {
self?.queue.sync { self?.queue.sync {
log.error("Failed LINK write during send ack for packetId \(controlPacket.packetId): \(error)") log.error("Failed LINK write during send ack for packetId \(controlPacket.packetId): \(error)")
self?.deferStop(.shutdown, SessionError.failedLinkWrite) self?.deferStop(.shutdown, OpenVPNError.failedLinkWrite)
} }
return return
} }

View File

@ -37,15 +37,12 @@
import Foundation import Foundation
extension OpenVPN { extension OpenVPN {
struct PushReply: CustomStringConvertible {
/// Groups the parsed reply of a successfully started session.
public struct PushReply: CustomStringConvertible {
private static let prefix = "PUSH_REPLY," private static let prefix = "PUSH_REPLY,"
private let original: String private let original: String
/// The pushed options as a `Configuration` object. let options: Configuration
public let options: Configuration
init?(message: String) throws { init?(message: String) throws {
guard message.hasPrefix(PushReply.prefix) else { guard message.hasPrefix(PushReply.prefix) else {
@ -63,7 +60,7 @@ extension OpenVPN {
// MARK: CustomStringConvertible // MARK: CustomStringConvertible
/// :nodoc: /// :nodoc:
public var description: String { var description: String {
let stripped = NSMutableString(string: original) let stripped = NSMutableString(string: original)
ConfigurationParser.Regex.authToken.replaceMatches( ConfigurationParser.Regex.authToken.replaceMatches(
in: stripped, in: stripped,