mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
//
|
|
// OpenVPNClient.m
|
|
// OpenVPN iOS Client
|
|
//
|
|
// Created by Sergey Abramchuk on 11.02.17.
|
|
//
|
|
//
|
|
|
|
#import <sstream>
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "OpenVPNAdapter+Internal.h"
|
|
#import "OpenVPNClient.h"
|
|
|
|
OpenVPNClient::OpenVPNClient(void* adapter) : ClientAPI::OpenVPNClient() {
|
|
this->adapter = adapter;
|
|
}
|
|
|
|
TunClientFactory* OpenVPNClient::new_tun_factory(const ExternalTun::Config& conf, const OptionList& opt) {
|
|
return this;
|
|
}
|
|
|
|
TunClient::Ptr OpenVPNClient::new_tun_client_obj(openvpn_io::io_context& io_context, TunClientParent& parent, TransportClient* transcli) {
|
|
return nullptr;
|
|
}
|
|
|
|
bool OpenVPNClient::socket_protect(int socket) {
|
|
return true;
|
|
}
|
|
|
|
bool OpenVPNClient::pause_on_connection_timeout() {
|
|
return false;
|
|
}
|
|
|
|
// TODO: Provide interfacing with an OS-layer Keychain
|
|
void OpenVPNClient::external_pki_cert_request(ClientAPI::ExternalPKICertRequest& certreq) { }
|
|
void OpenVPNClient::external_pki_sign_request(ClientAPI::ExternalPKISignRequest& signreq) { }
|
|
|
|
void OpenVPNClient::event(const ClientAPI::Event& ev) {
|
|
[(__bridge OpenVPNAdapter* )adapter handleEvent:&ev];
|
|
}
|
|
|
|
void OpenVPNClient::log(const ClientAPI::LogInfo& log) {
|
|
[(__bridge OpenVPNAdapter* )adapter handleLog:&log];
|
|
}
|