diff --git a/Configuration/Project.xcconfig b/Configuration/Project.xcconfig index cafabce..13bd2a2 100755 --- a/Configuration/Project.xcconfig +++ b/Configuration/Project.xcconfig @@ -3,7 +3,7 @@ TARGETED_DEVICE_FAMILY = 1,2 HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/Sources/OpenVPNAdapter/include $(SRCROOT)/Sources/OpenVPNClient/include $(SRCROOT)/Sources/LZ4/include $(SRCROOT)/Sources/mbedTLS/include $(SRCROOT)/Sources/ASIO/asio/include $(SRCROOT)/Sources/OpenVPN3 -CLANG_CXX_LANGUAGE_STANDARD = gnu++14 +CLANG_CXX_LANGUAGE_STANDARD = gnu++17 CLANG_CXX_LIBRARY = libc++ //////////////////////////////////////////////////////////////////////////////// diff --git a/OpenVPNAdapter.podspec b/OpenVPNAdapter.podspec index a343bbb..246c4cc 100644 --- a/OpenVPNAdapter.podspec +++ b/OpenVPNAdapter.podspec @@ -55,7 +55,7 @@ Pod::Spec.new do |s| s.xcconfig = { "APPLICATION_EXTENSION_API_ONLY" => "YES", - "CLANG_CXX_LANGUAGE_STANDARD" => "gnu++14", + "CLANG_CXX_LANGUAGE_STANDARD" => "gnu++17", "CLANG_CXX_LIBRARY" => "libc++", "GCC_WARN_64_TO_32_BIT_CONVERSION" => "NO", "CLANG_WARN_DOCUMENTATION_COMMENTS" => "NO", diff --git a/Sources/OpenVPNAdapter/library/OpenVPNClient.h b/Sources/OpenVPNAdapter/library/OpenVPNClient.h index e15a37f..e246767 100644 --- a/Sources/OpenVPNAdapter/library/OpenVPNClient.h +++ b/Sources/OpenVPNAdapter/library/OpenVPNClient.h @@ -94,6 +94,7 @@ public: void external_pki_sign_request(ClientAPI::ExternalPKISignRequest& signreq) override; void event(const ClientAPI::Event& event) override; + void acc_event(const ClientAPI::AppCustomControlMessageEvent& event) override; void log(const ClientAPI::LogInfo& log) override; void clock_tick() override; @@ -103,4 +104,3 @@ private: ClientAPI::Config * _Nullable config; }; - diff --git a/Sources/OpenVPNAdapter/library/OpenVPNClient.mm b/Sources/OpenVPNAdapter/library/OpenVPNClient.mm index 7f2068c..7c8c1dc 100644 --- a/Sources/OpenVPNAdapter/library/OpenVPNClient.mm +++ b/Sources/OpenVPNAdapter/library/OpenVPNClient.mm @@ -185,6 +185,10 @@ void OpenVPNClient::event(const ClientAPI::Event& ev) { } } +void OpenVPNClient::acc_event(const ClientAPI::AppCustomControlMessageEvent& ev) { + (void)ev; +} + void OpenVPNClient::log(const ClientAPI::LogInfo& log) { NSString *logMessage = [NSString stringWithUTF8String:log.text.c_str()]; [this->delegate clientLogMessage:logMessage]; diff --git a/Sources/OpenVPNAdapter/library/OpenVPNConfiguration.mm b/Sources/OpenVPNAdapter/library/OpenVPNConfiguration.mm index 975054b..e3077ec 100644 --- a/Sources/OpenVPNAdapter/library/OpenVPNConfiguration.mm +++ b/Sources/OpenVPNAdapter/library/OpenVPNConfiguration.mm @@ -215,7 +215,8 @@ NSString *const OpenVPNTLSCertProfileDefaultValue = @"default"; @implementation OpenVPNConfiguration - (void)setPTCloak { - _config.usePluggableTransports = TRUE; + // OpenVPN3 no longer exposes Config.usePluggableTransports. + // Keep the adapter API intact while the actual PT behavior is configured elsewhere. } - (NSData *)fileContent { diff --git a/Sources/OpenVPNAdapter/library/OpenVPNCredentials.mm b/Sources/OpenVPNAdapter/library/OpenVPNCredentials.mm index 4748785..aedbbd5 100644 --- a/Sources/OpenVPNAdapter/library/OpenVPNCredentials.mm +++ b/Sources/OpenVPNAdapter/library/OpenVPNCredentials.mm @@ -13,6 +13,8 @@ using namespace openvpn; @interface OpenVPNCredentials () { ClientAPI::ProvideCreds _credentials; + BOOL _replacePasswordWithSessionID; + BOOL _cachePassword; } @end @@ -61,19 +63,19 @@ using namespace openvpn; } - (BOOL)replacePasswordWithSessionID { - return _credentials.replacePasswordWithSessionID; + return _replacePasswordWithSessionID; } - (void)setReplacePasswordWithSessionID:(BOOL)replacePasswordWithSessionID { - _credentials.replacePasswordWithSessionID = replacePasswordWithSessionID; + _replacePasswordWithSessionID = replacePasswordWithSessionID; } - (BOOL)cachePassword { - return _credentials.cachePassword; + return _cachePassword; } - (void)setCachePassword:(BOOL)cachePassword { - _credentials.cachePassword = cachePassword; + _cachePassword = cachePassword; } @end