0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00
openvpn3/javacli/ovpncli.i

56 lines
2.0 KiB
OpenEdge ABL
Raw Normal View History

2012-02-11 15:02:51 +01:00
// SWIG interface file for OpenVPN client
// enable director feature for OpenVPNClientBase virtual method callbacks
2012-02-11 15:02:51 +01:00
%module(directors="1") ovpncli
%feature("director") OpenVPNClient;
2012-02-11 15:02:51 +01:00
%include "std_string.i" // for std::string typemaps
%include "std_vector.i"
2012-02-11 15:02:51 +01:00
// top-level C++ implementation file
%{
#include "ovpncli.hpp"
2012-02-11 15:02:51 +01:00
%}
// ignore these ClientAPI::OpenVPNClient bases
%ignore openvpn::ClientAPI::LogReceiver;
%ignore openvpn::ExternalTun::Factory;
%ignore openvpn::ExternalTransport::Factory;
// modify exported C++ class names to incorporate their enclosing namespace
%rename(ClientAPI_OpenVPNClient) OpenVPNClient;
%rename(ClientAPI_TunBuilderBase) TunBuilderBase;
%rename(ClientAPI_ExternalPKIBase) ExternalPKIBase;
%rename(ClientAPI_ServerEntry) ServerEntry;
%rename(ClientAPI_EvalConfig) EvalConfig;
%rename(ClientAPI_ProvideCreds) ProvideCreds;
%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;
%rename(ClientAPI_Config) Config;
%rename(ClientAPI_Event) Event;
%rename(ClientAPI_ConnectionInfo) ConnectionInfo;
%rename(ClientAPI_Status) Status;
%rename(ClientAPI_LogInfo) LogInfo;
%rename(ClientAPI_InterfaceStats) InterfaceStats;
%rename(ClientAPI_TransportStats) TransportStats;
%rename(ClientAPI_MergeConfig) MergeConfig;
2012-03-06 07:06:54 +01:00
%rename(ClientAPI_ExternalPKIRequestBase) ExternalPKIRequestBase;
%rename(ClientAPI_ExternalPKICertRequest) ExternalPKICertRequest;
%rename(ClientAPI_ExternalPKISignRequest) ExternalPKISignRequest;
%rename(ClientAPI_RemoteOverride) RemoteOverride;
// declare vectors
namespace std {
%template(ClientAPI_ServerEntryVector) vector<openvpn::ClientAPI::ServerEntry>;
%template(ClientAPI_LLVector) vector<long long>;
%template(ClientAPI_StringVec) vector<string>;
};
// interface to be bridged between C++ and target language
2012-03-06 07:06:54 +01:00
%include "openvpn/pki/epkibase.hpp"
%include "openvpn/tun/builder/base.hpp"
%import "openvpn/tun/extern/fw.hpp" // ignored
%import "openvpn/transport/client/extern/fw.hpp" // ignored
2012-02-11 15:02:51 +01:00
%include "ovpncli.hpp"