2012-02-11 15:02:51 +01:00
|
|
|
// SWIG interface file for OpenVPN client
|
|
|
|
|
2012-02-14 18:47:01 +01:00
|
|
|
// enable director feature for OpenVPNClientBase virtual method callbacks
|
2012-02-11 15:02:51 +01:00
|
|
|
%module(directors="1") ovpncli
|
2012-03-01 09:11:00 +01:00
|
|
|
%feature("director") OpenVPNClient;
|
2012-02-11 15:02:51 +01:00
|
|
|
|
|
|
|
%include "std_string.i" // for std::string typemaps
|
2012-03-01 09:11:00 +01:00
|
|
|
%include "std_vector.i"
|
2012-02-11 15:02:51 +01:00
|
|
|
|
|
|
|
// top-level C++ implementation file
|
|
|
|
%{
|
2012-03-24 21:22:24 +01:00
|
|
|
#include "ovpncli.hpp"
|
2012-02-11 15:02:51 +01:00
|
|
|
%}
|
|
|
|
|
2017-04-13 21:28:34 +02:00
|
|
|
// ignore these ClientAPI::OpenVPNClient bases
|
2016-05-07 23:17:54 +02:00
|
|
|
%ignore openvpn::ClientAPI::LogReceiver;
|
2017-04-13 21:28:34 +02:00
|
|
|
%ignore openvpn::ExternalTun::Factory;
|
2017-10-09 15:59:46 +02:00
|
|
|
%ignore openvpn::ExternalTransport::Factory;
|
2016-05-07 23:17:54 +02:00
|
|
|
|
2012-03-01 09:11:00 +01:00
|
|
|
// modify exported C++ class names to incorporate their enclosing namespace
|
|
|
|
%rename(ClientAPI_OpenVPNClient) OpenVPNClient;
|
|
|
|
%rename(ClientAPI_TunBuilderBase) TunBuilderBase;
|
2012-08-25 07:05:35 +02:00
|
|
|
%rename(ClientAPI_ExternalPKIBase) ExternalPKIBase;
|
2012-03-01 09:11:00 +01:00
|
|
|
%rename(ClientAPI_ServerEntry) ServerEntry;
|
|
|
|
%rename(ClientAPI_EvalConfig) EvalConfig;
|
|
|
|
%rename(ClientAPI_ProvideCreds) ProvideCreds;
|
2012-08-25 07:05:35 +02:00
|
|
|
%rename(ClientAPI_SessionToken) SessionToken;
|
|
|
|
%rename(ClientAPI_DynamicChallenge) DynamicChallenge;
|
Initial Apple VPN-On-Demand implementation:
* VoD profiles can be defined using the iPhone Configuration utility:
1. Connection Type should be set to Custom SSL
2. Identifier should be set to net.openvpn.OpenVPN-Connect.vpnplugin
3. Server can be set to a hostname, or "DEFAULT" to use the
hostname(s) from the OpenVPN configuration.
4. User Authentication should be set to Certificate, and the client
certificate+key should be attached as a PKCS#12 file.
5. VPN On Demand should be enabled and match entries should be
defined.
In addition, the OpenVPN client configuration file may be defined
via key/value pairs:
1. VoD requires an autologin profile.
2. Define each OpenVPN directive as a key, with arguments
specified as the value.
3. For Access server meta-directives such as
OVPN_ACCESS_SERVER_USERNAME, remove the "OVPN_ACCESS_SERVER_"
prefix, giving USERNAME as the directive.
4. If no arguments are present, use "NOARGS" as the value.
5. If multiple instances of the same directive are present,
number the directives in the order they should be processed by
appending .<n> to the directive, where n is an integer,
such as remote.1 or remote.2
6. For multi-line directives such as <ca> and <tls-auth>, you must
convert the multi-line argument to a single line by specifying
line breaks as \n -- also note that because of
this escaping model, you must use \\ to pass backslash itself.
* VoD profiles are recognized and listed by the app.
* The app can disconnect but not connect a VoD profile.
* Most app-level functionality such as logging and preferences
work correctly for VoD profiles.
Core changes:
* Added support for key-direction parameter in core.
2012-11-06 18:50:30 +01:00
|
|
|
%rename(ClientAPI_KeyValue) KeyValue;
|
2012-03-01 09:11:00 +01:00
|
|
|
%rename(ClientAPI_Config) Config;
|
|
|
|
%rename(ClientAPI_Event) Event;
|
2012-08-25 07:05:35 +02:00
|
|
|
%rename(ClientAPI_ConnectionInfo) ConnectionInfo;
|
2012-03-01 09:11:00 +01:00
|
|
|
%rename(ClientAPI_Status) Status;
|
|
|
|
%rename(ClientAPI_LogInfo) LogInfo;
|
2012-08-25 07:05:35 +02:00
|
|
|
%rename(ClientAPI_InterfaceStats) InterfaceStats;
|
|
|
|
%rename(ClientAPI_TransportStats) TransportStats;
|
2012-10-18 14:24:14 +02:00
|
|
|
%rename(ClientAPI_MergeConfig) MergeConfig;
|
2012-03-06 07:06:54 +01:00
|
|
|
%rename(ClientAPI_ExternalPKIRequestBase) ExternalPKIRequestBase;
|
|
|
|
%rename(ClientAPI_ExternalPKICertRequest) ExternalPKICertRequest;
|
|
|
|
%rename(ClientAPI_ExternalPKISignRequest) ExternalPKISignRequest;
|
2016-08-18 07:03:02 +02:00
|
|
|
%rename(ClientAPI_RemoteOverride) RemoteOverride;
|
2012-03-01 09:11:00 +01:00
|
|
|
|
|
|
|
// declare vectors
|
|
|
|
namespace std {
|
|
|
|
%template(ClientAPI_ServerEntryVector) vector<openvpn::ClientAPI::ServerEntry>;
|
2012-03-07 12:21:09 +01:00
|
|
|
%template(ClientAPI_LLVector) vector<long long>;
|
2018-07-16 16:05:35 +02:00
|
|
|
%template(ClientAPI_StringVec) vector<string>;
|
2012-03-01 09:11:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
// interface to be bridged between C++ and target language
|
2012-03-06 07:06:54 +01:00
|
|
|
%include "openvpn/pki/epkibase.hpp"
|
2012-02-19 18:43:42 +01:00
|
|
|
%include "openvpn/tun/builder/base.hpp"
|
2017-04-13 21:28:34 +02:00
|
|
|
%import "openvpn/tun/extern/fw.hpp" // ignored
|
2017-10-09 15:59:46 +02:00
|
|
|
%import "openvpn/transport/client/extern/fw.hpp" // ignored
|
2012-02-11 15:02:51 +01:00
|
|
|
%include "ovpncli.hpp"
|