Merge pull request #41 from amnezia-vpn/feature/android-openvpn-protocol
Feature/android openvpn protocol
This commit is contained in:
commit
dd148b92c6
71 changed files with 3821 additions and 350 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,6 +9,7 @@ deploy/build_32/*
|
|||
deploy/build_64/*
|
||||
winbuild*.bat
|
||||
|
||||
|
||||
# Qt-es
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
|
|
BIN
client/3rd/OpenSSL/lib/android/arm/libcrypto.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/arm/libcrypto.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/arm/libssl.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/arm/libssl.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/arm64/libcrypto.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/arm64/libcrypto.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/arm64/libssl.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/arm64/libssl.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/x86/libcrypto.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/x86/libcrypto.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/x86/libssl.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/x86/libssl.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/x86_64/libcrypto.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/x86_64/libcrypto.a
Normal file
Binary file not shown.
BIN
client/3rd/OpenSSL/lib/android/x86_64/libssl.a
Normal file
BIN
client/3rd/OpenSSL/lib/android/x86_64/libssl.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -14,8 +14,17 @@
|
|||
<!-- %%INSERT_FEATURES -->
|
||||
|
||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:extractNativeLibs="true">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="unspecified" android:launchMode="singleTop">
|
||||
<application
|
||||
android:hardwareAccelerated="true"
|
||||
android:name="org.qtproject.qt5.android.bindings.QtApplication"
|
||||
android:label="-- %%INSERT_APP_NAME%% --"
|
||||
android:extractNativeLibs="true">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
|
||||
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
||||
|
||||
android:label="-- %%INSERT_APP_NAME%% --"
|
||||
android:screenOrientation="unspecified"
|
||||
android:launchMode="singleTop">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
@ -83,13 +92,14 @@
|
|||
</activity>
|
||||
|
||||
<service android:name=".VPNService"
|
||||
|
||||
android:permission="android.permission.BIND_VPN_SERVICE">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.VpnService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.amnezia.vpn.qt.VPNPermissionHelper"
|
||||
android:process=":QtOnlyProcess"
|
||||
|
||||
android:permission="android.permission.BIND_VPN_SERVICE">
|
||||
</service>
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ android {
|
|||
|
||||
compileSdkVersion androidCompileSdkVersion.toInteger()
|
||||
|
||||
buildToolsVersion '28.0.3'
|
||||
//buildToolsVersion '28.0.3'
|
||||
|
||||
dexOptions {
|
||||
javaMaxHeapSize "3g"
|
||||
|
@ -134,4 +134,13 @@ android {
|
|||
// path 'wireguard/CMakeLists.txt'
|
||||
// }
|
||||
// }
|
||||
|
||||
// externalNativeBuild {
|
||||
// cmake {
|
||||
// path 'openvpn/src/main/cpp/CMakeLists.txt'
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
BIN
client/android/lib/openvpn/arm64-v8a/libjbcrypto.so
Normal file
BIN
client/android/lib/openvpn/arm64-v8a/libjbcrypto.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/arm64-v8a/libopenvpn.so
Normal file
BIN
client/android/lib/openvpn/arm64-v8a/libopenvpn.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/arm64-v8a/libopvpnutil.so
Normal file
BIN
client/android/lib/openvpn/arm64-v8a/libopvpnutil.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/arm64-v8a/libovpn3.so
Normal file
BIN
client/android/lib/openvpn/arm64-v8a/libovpn3.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/arm64-v8a/libovpnexec.so
Normal file
BIN
client/android/lib/openvpn/arm64-v8a/libovpnexec.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/armeabi-v7a/libjbcrypto.so
Normal file
BIN
client/android/lib/openvpn/armeabi-v7a/libjbcrypto.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/armeabi-v7a/libopenvpn.so
Normal file
BIN
client/android/lib/openvpn/armeabi-v7a/libopenvpn.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/armeabi-v7a/libopvpnutil.so
Normal file
BIN
client/android/lib/openvpn/armeabi-v7a/libopvpnutil.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/armeabi-v7a/libovpn3.so
Normal file
BIN
client/android/lib/openvpn/armeabi-v7a/libovpn3.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/armeabi-v7a/libovpnexec.so
Normal file
BIN
client/android/lib/openvpn/armeabi-v7a/libovpnexec.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86/libjbcrypto.so
Normal file
BIN
client/android/lib/openvpn/x86/libjbcrypto.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86/libopenvpn.so
Normal file
BIN
client/android/lib/openvpn/x86/libopenvpn.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86/libopvpnutil.so
Normal file
BIN
client/android/lib/openvpn/x86/libopvpnutil.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86/libovpn3.so
Normal file
BIN
client/android/lib/openvpn/x86/libovpn3.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86/libovpnexec.so
Normal file
BIN
client/android/lib/openvpn/x86/libovpnexec.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86_64/libjbcrypto.so
Normal file
BIN
client/android/lib/openvpn/x86_64/libjbcrypto.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86_64/libopenvpn.so
Normal file
BIN
client/android/lib/openvpn/x86_64/libopenvpn.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86_64/libopvpnutil.so
Normal file
BIN
client/android/lib/openvpn/x86_64/libopvpnutil.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86_64/libovpn3.so
Normal file
BIN
client/android/lib/openvpn/x86_64/libovpn3.so
Normal file
Binary file not shown.
BIN
client/android/lib/openvpn/x86_64/libovpnexec.so
Normal file
BIN
client/android/lib/openvpn/x86_64/libovpnexec.so
Normal file
Binary file not shown.
BIN
client/android/openvpn.tar.gz
Normal file
BIN
client/android/openvpn.tar.gz
Normal file
Binary file not shown.
381
client/android/src/net/openvpn/ovpn3/ClientAPI_Config.java
Normal file
381
client/android/src/net/openvpn/ovpn3/ClientAPI_Config.java
Normal file
|
@ -0,0 +1,381 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_Config {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_Config(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_Config obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_Config(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setContent(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_content_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return ovpncliJNI.ClientAPI_Config_content_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setContentList(SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t value) {
|
||||
ovpncliJNI.ClientAPI_Config_contentList_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t getContentList() {
|
||||
long cPtr = ovpncliJNI.ClientAPI_Config_contentList_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setGuiVersion(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_guiVersion_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getGuiVersion() {
|
||||
return ovpncliJNI.ClientAPI_Config_guiVersion_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSsoMethods(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_ssoMethods_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getSsoMethods() {
|
||||
return ovpncliJNI.ClientAPI_Config_ssoMethods_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setHwAddrOverride(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_hwAddrOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getHwAddrOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_hwAddrOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPlatformVersion(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_platformVersion_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getPlatformVersion() {
|
||||
return ovpncliJNI.ClientAPI_Config_platformVersion_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setServerOverride(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_serverOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getServerOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_serverOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPortOverride(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_portOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getPortOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_portOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProtoOverride(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_protoOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProtoOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_protoOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProtoVersionOverride(int value) {
|
||||
ovpncliJNI.ClientAPI_Config_protoVersionOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getProtoVersionOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_protoVersionOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setIpv6(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_ipv6_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getIpv6() {
|
||||
return ovpncliJNI.ClientAPI_Config_ipv6_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setConnTimeout(int value) {
|
||||
ovpncliJNI.ClientAPI_Config_connTimeout_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getConnTimeout() {
|
||||
return ovpncliJNI.ClientAPI_Config_connTimeout_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTunPersist(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_tunPersist_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getTunPersist() {
|
||||
return ovpncliJNI.ClientAPI_Config_tunPersist_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setGoogleDnsFallback(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_googleDnsFallback_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getGoogleDnsFallback() {
|
||||
return ovpncliJNI.ClientAPI_Config_googleDnsFallback_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSynchronousDnsLookup(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_synchronousDnsLookup_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getSynchronousDnsLookup() {
|
||||
return ovpncliJNI.ClientAPI_Config_synchronousDnsLookup_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAutologinSessions(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_autologinSessions_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getAutologinSessions() {
|
||||
return ovpncliJNI.ClientAPI_Config_autologinSessions_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRetryOnAuthFailed(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_retryOnAuthFailed_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getRetryOnAuthFailed() {
|
||||
return ovpncliJNI.ClientAPI_Config_retryOnAuthFailed_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setExternalPkiAlias(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_externalPkiAlias_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getExternalPkiAlias() {
|
||||
return ovpncliJNI.ClientAPI_Config_externalPkiAlias_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setDisableClientCert(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_disableClientCert_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getDisableClientCert() {
|
||||
return ovpncliJNI.ClientAPI_Config_disableClientCert_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSslDebugLevel(int value) {
|
||||
ovpncliJNI.ClientAPI_Config_sslDebugLevel_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getSslDebugLevel() {
|
||||
return ovpncliJNI.ClientAPI_Config_sslDebugLevel_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setCompressionMode(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_compressionMode_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getCompressionMode() {
|
||||
return ovpncliJNI.ClientAPI_Config_compressionMode_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPrivateKeyPassword(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_privateKeyPassword_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getPrivateKeyPassword() {
|
||||
return ovpncliJNI.ClientAPI_Config_privateKeyPassword_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setDefaultKeyDirection(int value) {
|
||||
ovpncliJNI.ClientAPI_Config_defaultKeyDirection_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getDefaultKeyDirection() {
|
||||
return ovpncliJNI.ClientAPI_Config_defaultKeyDirection_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setForceAesCbcCiphersuites(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_forceAesCbcCiphersuites_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getForceAesCbcCiphersuites() {
|
||||
return ovpncliJNI.ClientAPI_Config_forceAesCbcCiphersuites_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTlsVersionMinOverride(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_tlsVersionMinOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getTlsVersionMinOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_tlsVersionMinOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTlsCertProfileOverride(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_tlsCertProfileOverride_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getTlsCertProfileOverride() {
|
||||
return ovpncliJNI.ClientAPI_Config_tlsCertProfileOverride_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTlsCipherList(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_tlsCipherList_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getTlsCipherList() {
|
||||
return ovpncliJNI.ClientAPI_Config_tlsCipherList_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTlsCiphersuitesList(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_tlsCiphersuitesList_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getTlsCiphersuitesList() {
|
||||
return ovpncliJNI.ClientAPI_Config_tlsCiphersuitesList_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPeerInfo(SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t value) {
|
||||
ovpncliJNI.ClientAPI_Config_peerInfo_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t getPeerInfo() {
|
||||
long cPtr = ovpncliJNI.ClientAPI_Config_peerInfo_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setProxyHost(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_proxyHost_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProxyHost() {
|
||||
return ovpncliJNI.ClientAPI_Config_proxyHost_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProxyPort(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_proxyPort_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProxyPort() {
|
||||
return ovpncliJNI.ClientAPI_Config_proxyPort_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProxyUsername(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_proxyUsername_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProxyUsername() {
|
||||
return ovpncliJNI.ClientAPI_Config_proxyUsername_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProxyPassword(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_proxyPassword_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProxyPassword() {
|
||||
return ovpncliJNI.ClientAPI_Config_proxyPassword_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProxyAllowCleartextAuth(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_proxyAllowCleartextAuth_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getProxyAllowCleartextAuth() {
|
||||
return ovpncliJNI.ClientAPI_Config_proxyAllowCleartextAuth_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAltProxy(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_altProxy_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getAltProxy() {
|
||||
return ovpncliJNI.ClientAPI_Config_altProxy_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setDco(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_dco_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getDco() {
|
||||
return ovpncliJNI.ClientAPI_Config_dco_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setEcho(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_echo_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getEcho() {
|
||||
return ovpncliJNI.ClientAPI_Config_echo_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setInfo(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_info_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getInfo() {
|
||||
return ovpncliJNI.ClientAPI_Config_info_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAllowLocalLanAccess(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_allowLocalLanAccess_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getAllowLocalLanAccess() {
|
||||
return ovpncliJNI.ClientAPI_Config_allowLocalLanAccess_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setClockTickMS(long value) {
|
||||
ovpncliJNI.ClientAPI_Config_clockTickMS_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getClockTickMS() {
|
||||
return ovpncliJNI.ClientAPI_Config_clockTickMS_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setGremlinConfig(String value) {
|
||||
ovpncliJNI.ClientAPI_Config_gremlinConfig_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getGremlinConfig() {
|
||||
return ovpncliJNI.ClientAPI_Config_gremlinConfig_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setWintun(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Config_wintun_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getWintun() {
|
||||
return ovpncliJNI.ClientAPI_Config_wintun_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_Config() {
|
||||
this(ovpncliJNI.new_ClientAPI_Config(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ConnectionInfo {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_ConnectionInfo(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ConnectionInfo obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ConnectionInfo(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setDefined(boolean value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_defined_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getDefined() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_defined_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setUser(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_user_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getUser() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_user_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setServerHost(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_serverHost_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getServerHost() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_serverHost_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setServerPort(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_serverPort_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getServerPort() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_serverPort_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setServerProto(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_serverProto_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getServerProto() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_serverProto_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setServerIp(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_serverIp_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getServerIp() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_serverIp_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setVpnIp4(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp4_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getVpnIp4() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp4_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setVpnIp6(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp6_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getVpnIp6() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_vpnIp6_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setGw4(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_gw4_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getGw4() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_gw4_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setGw6(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_gw6_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getGw6() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_gw6_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setClientIp(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_clientIp_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getClientIp() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_clientIp_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTunName(String value) {
|
||||
ovpncliJNI.ClientAPI_ConnectionInfo_tunName_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getTunName() {
|
||||
return ovpncliJNI.ClientAPI_ConnectionInfo_tunName_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ConnectionInfo() {
|
||||
this(ovpncliJNI.new_ClientAPI_ConnectionInfo(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_DynamicChallenge {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_DynamicChallenge(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_DynamicChallenge obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_DynamicChallenge(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setChallenge(String value) {
|
||||
ovpncliJNI.ClientAPI_DynamicChallenge_challenge_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getChallenge() {
|
||||
return ovpncliJNI.ClientAPI_DynamicChallenge_challenge_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setEcho(boolean value) {
|
||||
ovpncliJNI.ClientAPI_DynamicChallenge_echo_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getEcho() {
|
||||
return ovpncliJNI.ClientAPI_DynamicChallenge_echo_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setResponseRequired(boolean value) {
|
||||
ovpncliJNI.ClientAPI_DynamicChallenge_responseRequired_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getResponseRequired() {
|
||||
return ovpncliJNI.ClientAPI_DynamicChallenge_responseRequired_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setStateID(String value) {
|
||||
ovpncliJNI.ClientAPI_DynamicChallenge_stateID_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getStateID() {
|
||||
return ovpncliJNI.ClientAPI_DynamicChallenge_stateID_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_DynamicChallenge() {
|
||||
this(ovpncliJNI.new_ClientAPI_DynamicChallenge(), true);
|
||||
}
|
||||
|
||||
}
|
172
client/android/src/net/openvpn/ovpn3/ClientAPI_EvalConfig.java
Normal file
172
client/android/src/net/openvpn/ovpn3/ClientAPI_EvalConfig.java
Normal file
|
@ -0,0 +1,172 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_EvalConfig {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_EvalConfig(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_EvalConfig obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_EvalConfig(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setError(boolean value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_error_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getError() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_error_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setMessage(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_message_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_message_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setUserlockedUsername(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_userlockedUsername_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getUserlockedUsername() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_userlockedUsername_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProfileName(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_profileName_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProfileName() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_profileName_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setFriendlyName(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_friendlyName_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getFriendlyName() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_friendlyName_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAutologin(boolean value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_autologin_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getAutologin() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_autologin_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setExternalPki(boolean value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_externalPki_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getExternalPki() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_externalPki_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setStaticChallenge(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_staticChallenge_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getStaticChallenge() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_staticChallenge_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setStaticChallengeEcho(boolean value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_staticChallengeEcho_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getStaticChallengeEcho() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_staticChallengeEcho_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPrivateKeyPasswordRequired(boolean value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_privateKeyPasswordRequired_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getPrivateKeyPasswordRequired() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_privateKeyPasswordRequired_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAllowPasswordSave(boolean value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_allowPasswordSave_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getAllowPasswordSave() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_allowPasswordSave_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRemoteHost(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_remoteHost_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getRemoteHost() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_remoteHost_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRemotePort(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_remotePort_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getRemotePort() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_remotePort_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRemoteProto(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_remoteProto_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getRemoteProto() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_remoteProto_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setServerList(ClientAPI_ServerEntryVector value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_serverList_set(swigCPtr, this, ClientAPI_ServerEntryVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntryVector getServerList() {
|
||||
long cPtr = ovpncliJNI.ClientAPI_EvalConfig_serverList_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new ClientAPI_ServerEntryVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setWindowsDriver(String value) {
|
||||
ovpncliJNI.ClientAPI_EvalConfig_windowsDriver_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getWindowsDriver() {
|
||||
return ovpncliJNI.ClientAPI_EvalConfig_windowsDriver_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_EvalConfig() {
|
||||
this(ovpncliJNI.new_ClientAPI_EvalConfig(), true);
|
||||
}
|
||||
|
||||
}
|
75
client/android/src/net/openvpn/ovpn3/ClientAPI_Event.java
Normal file
75
client/android/src/net/openvpn/ovpn3/ClientAPI_Event.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_Event {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_Event(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_Event obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_Event(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setError(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Event_error_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getError() {
|
||||
return ovpncliJNI.ClientAPI_Event_error_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setFatal(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Event_fatal_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getFatal() {
|
||||
return ovpncliJNI.ClientAPI_Event_fatal_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setName(String value) {
|
||||
ovpncliJNI.ClientAPI_Event_name_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return ovpncliJNI.ClientAPI_Event_name_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setInfo(String value) {
|
||||
ovpncliJNI.ClientAPI_Event_info_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return ovpncliJNI.ClientAPI_Event_info_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_Event() {
|
||||
this(ovpncliJNI.new_ClientAPI_Event(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ExternalPKIBase {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_ExternalPKIBase(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ExternalPKIBase obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ExternalPKIBase(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean sign(String data, SWIGTYPE_p_std__string sig, String algorithm) {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKIBase_sign(swigCPtr, this, data, SWIGTYPE_p_std__string.getCPtr(sig), algorithm);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ExternalPKICertRequest extends ClientAPI_ExternalPKIRequestBase {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected ClientAPI_ExternalPKICertRequest(long cPtr, boolean cMemoryOwn) {
|
||||
super(ovpncliJNI.ClientAPI_ExternalPKICertRequest_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ExternalPKICertRequest obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ExternalPKICertRequest(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setCert(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKICertRequest_cert_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getCert() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKICertRequest_cert_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSupportingChain(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKICertRequest_supportingChain_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getSupportingChain() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKICertRequest_supportingChain_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ExternalPKICertRequest() {
|
||||
this(ovpncliJNI.new_ClientAPI_ExternalPKICertRequest(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ExternalPKIRequestBase {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_ExternalPKIRequestBase(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ExternalPKIRequestBase obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ExternalPKIRequestBase(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setError(boolean value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKIRequestBase_error_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getError() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_error_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setErrorText(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKIRequestBase_errorText_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getErrorText() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_errorText_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setInvalidAlias(boolean value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKIRequestBase_invalidAlias_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getInvalidAlias() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_invalidAlias_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAlias(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKIRequestBase_alias_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getAlias() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKIRequestBase_alias_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ExternalPKIRequestBase() {
|
||||
this(ovpncliJNI.new_ClientAPI_ExternalPKIRequestBase(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ExternalPKISignRequest extends ClientAPI_ExternalPKIRequestBase {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected ClientAPI_ExternalPKISignRequest(long cPtr, boolean cMemoryOwn) {
|
||||
super(ovpncliJNI.ClientAPI_ExternalPKISignRequest_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ExternalPKISignRequest obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ExternalPKISignRequest(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setData(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKISignRequest_data_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKISignRequest_data_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSig(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKISignRequest_sig_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getSig() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKISignRequest_sig_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setAlgorithm(String value) {
|
||||
ovpncliJNI.ClientAPI_ExternalPKISignRequest_algorithm_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getAlgorithm() {
|
||||
return ovpncliJNI.ClientAPI_ExternalPKISignRequest_algorithm_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ExternalPKISignRequest() {
|
||||
this(ovpncliJNI.new_ClientAPI_ExternalPKISignRequest(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_InterfaceStats {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_InterfaceStats(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_InterfaceStats obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_InterfaceStats(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setBytesIn(long value) {
|
||||
ovpncliJNI.ClientAPI_InterfaceStats_bytesIn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getBytesIn() {
|
||||
return ovpncliJNI.ClientAPI_InterfaceStats_bytesIn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPacketsIn(long value) {
|
||||
ovpncliJNI.ClientAPI_InterfaceStats_packetsIn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getPacketsIn() {
|
||||
return ovpncliJNI.ClientAPI_InterfaceStats_packetsIn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setErrorsIn(long value) {
|
||||
ovpncliJNI.ClientAPI_InterfaceStats_errorsIn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getErrorsIn() {
|
||||
return ovpncliJNI.ClientAPI_InterfaceStats_errorsIn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setBytesOut(long value) {
|
||||
ovpncliJNI.ClientAPI_InterfaceStats_bytesOut_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getBytesOut() {
|
||||
return ovpncliJNI.ClientAPI_InterfaceStats_bytesOut_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPacketsOut(long value) {
|
||||
ovpncliJNI.ClientAPI_InterfaceStats_packetsOut_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getPacketsOut() {
|
||||
return ovpncliJNI.ClientAPI_InterfaceStats_packetsOut_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setErrorsOut(long value) {
|
||||
ovpncliJNI.ClientAPI_InterfaceStats_errorsOut_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getErrorsOut() {
|
||||
return ovpncliJNI.ClientAPI_InterfaceStats_errorsOut_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_InterfaceStats() {
|
||||
this(ovpncliJNI.new_ClientAPI_InterfaceStats(), true);
|
||||
}
|
||||
|
||||
}
|
63
client/android/src/net/openvpn/ovpn3/ClientAPI_KeyValue.java
Normal file
63
client/android/src/net/openvpn/ovpn3/ClientAPI_KeyValue.java
Normal file
|
@ -0,0 +1,63 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_KeyValue {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_KeyValue(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_KeyValue obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_KeyValue(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_KeyValue() {
|
||||
this(ovpncliJNI.new_ClientAPI_KeyValue__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public ClientAPI_KeyValue(String key_arg, String value_arg) {
|
||||
this(ovpncliJNI.new_ClientAPI_KeyValue__SWIG_1(key_arg, value_arg), true);
|
||||
}
|
||||
|
||||
public void setKey(String value) {
|
||||
ovpncliJNI.ClientAPI_KeyValue_key_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return ovpncliJNI.ClientAPI_KeyValue_key_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
ovpncliJNI.ClientAPI_KeyValue_value_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return ovpncliJNI.ClientAPI_KeyValue_value_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
}
|
144
client/android/src/net/openvpn/ovpn3/ClientAPI_LLVector.java
Normal file
144
client/android/src/net/openvpn/ovpn3/ClientAPI_LLVector.java
Normal file
|
@ -0,0 +1,144 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_LLVector extends java.util.AbstractList<Long> implements java.util.RandomAccess {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_LLVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_LLVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_LLVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_LLVector(long[] initialElements) {
|
||||
this();
|
||||
reserve(initialElements.length);
|
||||
|
||||
for (long element : initialElements) {
|
||||
add(element);
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_LLVector(Iterable<Long> initialElements) {
|
||||
this();
|
||||
for (long element : initialElements) {
|
||||
add(element);
|
||||
}
|
||||
}
|
||||
|
||||
public Long get(int index) {
|
||||
return doGet(index);
|
||||
}
|
||||
|
||||
public Long set(int index, Long e) {
|
||||
return doSet(index, e);
|
||||
}
|
||||
|
||||
public boolean add(Long e) {
|
||||
modCount++;
|
||||
doAdd(e);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void add(int index, Long e) {
|
||||
modCount++;
|
||||
doAdd(index, e);
|
||||
}
|
||||
|
||||
public Long remove(int index) {
|
||||
modCount++;
|
||||
return doRemove(index);
|
||||
}
|
||||
|
||||
protected void removeRange(int fromIndex, int toIndex) {
|
||||
modCount++;
|
||||
doRemoveRange(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return doSize();
|
||||
}
|
||||
|
||||
public ClientAPI_LLVector() {
|
||||
this(ovpncliJNI.new_ClientAPI_LLVector__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public ClientAPI_LLVector(ClientAPI_LLVector other) {
|
||||
this(ovpncliJNI.new_ClientAPI_LLVector__SWIG_1(ClientAPI_LLVector.getCPtr(other), other), true);
|
||||
}
|
||||
|
||||
public long capacity() {
|
||||
return ovpncliJNI.ClientAPI_LLVector_capacity(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
ovpncliJNI.ClientAPI_LLVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return ovpncliJNI.ClientAPI_LLVector_isEmpty(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
ovpncliJNI.ClientAPI_LLVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_LLVector(int count, long value) {
|
||||
this(ovpncliJNI.new_ClientAPI_LLVector__SWIG_2(count, value), true);
|
||||
}
|
||||
|
||||
private int doSize() {
|
||||
return ovpncliJNI.ClientAPI_LLVector_doSize(swigCPtr, this);
|
||||
}
|
||||
|
||||
private void doAdd(long x) {
|
||||
ovpncliJNI.ClientAPI_LLVector_doAdd__SWIG_0(swigCPtr, this, x);
|
||||
}
|
||||
|
||||
private void doAdd(int index, long x) {
|
||||
ovpncliJNI.ClientAPI_LLVector_doAdd__SWIG_1(swigCPtr, this, index, x);
|
||||
}
|
||||
|
||||
private long doRemove(int index) {
|
||||
return ovpncliJNI.ClientAPI_LLVector_doRemove(swigCPtr, this, index);
|
||||
}
|
||||
|
||||
private long doGet(int index) {
|
||||
return ovpncliJNI.ClientAPI_LLVector_doGet(swigCPtr, this, index);
|
||||
}
|
||||
|
||||
private long doSet(int index, long val) {
|
||||
return ovpncliJNI.ClientAPI_LLVector_doSet(swigCPtr, this, index, val);
|
||||
}
|
||||
|
||||
private void doRemoveRange(int fromIndex, int toIndex) {
|
||||
ovpncliJNI.ClientAPI_LLVector_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
55
client/android/src/net/openvpn/ovpn3/ClientAPI_LogInfo.java
Normal file
55
client/android/src/net/openvpn/ovpn3/ClientAPI_LogInfo.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_LogInfo {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_LogInfo(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_LogInfo obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_LogInfo(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_LogInfo() {
|
||||
this(ovpncliJNI.new_ClientAPI_LogInfo__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public ClientAPI_LogInfo(String str) {
|
||||
this(ovpncliJNI.new_ClientAPI_LogInfo__SWIG_1(str), true);
|
||||
}
|
||||
|
||||
public void setText(String value) {
|
||||
ovpncliJNI.ClientAPI_LogInfo_text_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return ovpncliJNI.ClientAPI_LogInfo_text_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_MergeConfig {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_MergeConfig(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_MergeConfig obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_MergeConfig(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setStatus(String value) {
|
||||
ovpncliJNI.ClientAPI_MergeConfig_status_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return ovpncliJNI.ClientAPI_MergeConfig_status_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setErrorText(String value) {
|
||||
ovpncliJNI.ClientAPI_MergeConfig_errorText_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getErrorText() {
|
||||
return ovpncliJNI.ClientAPI_MergeConfig_errorText_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setBasename(String value) {
|
||||
ovpncliJNI.ClientAPI_MergeConfig_basename_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getBasename() {
|
||||
return ovpncliJNI.ClientAPI_MergeConfig_basename_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProfileContent(String value) {
|
||||
ovpncliJNI.ClientAPI_MergeConfig_profileContent_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProfileContent() {
|
||||
return ovpncliJNI.ClientAPI_MergeConfig_profileContent_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRefPathList(ClientAPI_StringVec value) {
|
||||
ovpncliJNI.ClientAPI_MergeConfig_refPathList_set(swigCPtr, this, ClientAPI_StringVec.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec getRefPathList() {
|
||||
long cPtr = ovpncliJNI.ClientAPI_MergeConfig_refPathList_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new ClientAPI_StringVec(cPtr, false);
|
||||
}
|
||||
|
||||
public ClientAPI_MergeConfig() {
|
||||
this(ovpncliJNI.new_ClientAPI_MergeConfig(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,195 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_OpenVPNClient extends ClientAPI_TunBuilderBase {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected ClientAPI_OpenVPNClient(long cPtr, boolean cMemoryOwn) {
|
||||
super(ovpncliJNI.ClientAPI_OpenVPNClient_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_OpenVPNClient obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_OpenVPNClient(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
protected void swigDirectorDisconnect() {
|
||||
swigCMemOwn = false;
|
||||
delete();
|
||||
}
|
||||
|
||||
public void swigReleaseOwnership() {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_change_ownership(this, swigCPtr, false);
|
||||
}
|
||||
|
||||
public void swigTakeOwnership() {
|
||||
swigCMemOwn = true;
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_change_ownership(this, swigCPtr, true);
|
||||
}
|
||||
|
||||
public ClientAPI_OpenVPNClient() {
|
||||
this(ovpncliJNI.new_ClientAPI_OpenVPNClient(), true);
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_director_connect(this, swigCPtr, true, true);
|
||||
}
|
||||
|
||||
public static ClientAPI_MergeConfig merge_config_static(String path, boolean follow_references) {
|
||||
return new ClientAPI_MergeConfig(ovpncliJNI.ClientAPI_OpenVPNClient_merge_config_static(path, follow_references), true);
|
||||
}
|
||||
|
||||
public static ClientAPI_MergeConfig merge_config_string_static(String config_content) {
|
||||
return new ClientAPI_MergeConfig(ovpncliJNI.ClientAPI_OpenVPNClient_merge_config_string_static(config_content), true);
|
||||
}
|
||||
|
||||
public static ClientAPI_EvalConfig eval_config_static(ClientAPI_Config config) {
|
||||
return new ClientAPI_EvalConfig(ovpncliJNI.ClientAPI_OpenVPNClient_eval_config_static(ClientAPI_Config.getCPtr(config), config), true);
|
||||
}
|
||||
|
||||
public static int max_profile_size() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_max_profile_size();
|
||||
}
|
||||
|
||||
public static boolean parse_dynamic_challenge(String cookie, ClientAPI_DynamicChallenge dc) {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_parse_dynamic_challenge(cookie, ClientAPI_DynamicChallenge.getCPtr(dc), dc);
|
||||
}
|
||||
|
||||
public ClientAPI_EvalConfig eval_config(ClientAPI_Config arg0) {
|
||||
return new ClientAPI_EvalConfig(ovpncliJNI.ClientAPI_OpenVPNClient_eval_config(swigCPtr, this, ClientAPI_Config.getCPtr(arg0), arg0), true);
|
||||
}
|
||||
|
||||
public ClientAPI_Status provide_creds(ClientAPI_ProvideCreds arg0) {
|
||||
return new ClientAPI_Status(ovpncliJNI.ClientAPI_OpenVPNClient_provide_creds(swigCPtr, this, ClientAPI_ProvideCreds.getCPtr(arg0), arg0), true);
|
||||
}
|
||||
|
||||
public boolean socket_protect(int socket, String remote, boolean ipv6) {
|
||||
return (getClass() == ClientAPI_OpenVPNClient.class) ? ovpncliJNI.ClientAPI_OpenVPNClient_socket_protect(swigCPtr, this, socket, remote, ipv6) : ovpncliJNI.ClientAPI_OpenVPNClient_socket_protectSwigExplicitClientAPI_OpenVPNClient(swigCPtr, this, socket, remote, ipv6);
|
||||
}
|
||||
|
||||
public ClientAPI_Status connect() {
|
||||
return new ClientAPI_Status(ovpncliJNI.ClientAPI_OpenVPNClient_connect(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public ClientAPI_ConnectionInfo connection_info() {
|
||||
return new ClientAPI_ConnectionInfo(ovpncliJNI.ClientAPI_OpenVPNClient_connection_info(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public boolean session_token(ClientAPI_SessionToken tok) {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_session_token(swigCPtr, this, ClientAPI_SessionToken.getCPtr(tok), tok);
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_stop(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void pause(String reason) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_pause(swigCPtr, this, reason);
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_resume(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void reconnect(int seconds) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_reconnect(swigCPtr, this, seconds);
|
||||
}
|
||||
|
||||
public boolean pause_on_connection_timeout() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_pause_on_connection_timeout(swigCPtr, this);
|
||||
}
|
||||
|
||||
public static int stats_n() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_stats_n();
|
||||
}
|
||||
|
||||
public static String stats_name(int index) {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_stats_name(index);
|
||||
}
|
||||
|
||||
public long stats_value(int index) {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_stats_value(swigCPtr, this, index);
|
||||
}
|
||||
|
||||
public ClientAPI_LLVector stats_bundle() {
|
||||
return new ClientAPI_LLVector(ovpncliJNI.ClientAPI_OpenVPNClient_stats_bundle(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public ClientAPI_InterfaceStats tun_stats() {
|
||||
return new ClientAPI_InterfaceStats(ovpncliJNI.ClientAPI_OpenVPNClient_tun_stats(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public ClientAPI_TransportStats transport_stats() {
|
||||
return new ClientAPI_TransportStats(ovpncliJNI.ClientAPI_OpenVPNClient_transport_stats(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public void post_cc_msg(String msg) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_post_cc_msg(swigCPtr, this, msg);
|
||||
}
|
||||
|
||||
public void event(ClientAPI_Event arg0) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_event(swigCPtr, this, ClientAPI_Event.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public void log(ClientAPI_LogInfo arg0) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_log(swigCPtr, this, ClientAPI_LogInfo.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public void external_pki_cert_request(ClientAPI_ExternalPKICertRequest arg0) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_external_pki_cert_request(swigCPtr, this, ClientAPI_ExternalPKICertRequest.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public void external_pki_sign_request(ClientAPI_ExternalPKISignRequest arg0) {
|
||||
ovpncliJNI.ClientAPI_OpenVPNClient_external_pki_sign_request(swigCPtr, this, ClientAPI_ExternalPKISignRequest.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public boolean remote_override_enabled() {
|
||||
return (getClass() == ClientAPI_OpenVPNClient.class) ? ovpncliJNI.ClientAPI_OpenVPNClient_remote_override_enabled(swigCPtr, this) : ovpncliJNI.ClientAPI_OpenVPNClient_remote_override_enabledSwigExplicitClientAPI_OpenVPNClient(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void remote_override(ClientAPI_RemoteOverride arg0) {
|
||||
if (getClass() == ClientAPI_OpenVPNClient.class) ovpncliJNI.ClientAPI_OpenVPNClient_remote_override(swigCPtr, this, ClientAPI_RemoteOverride.getCPtr(arg0), arg0); else ovpncliJNI.ClientAPI_OpenVPNClient_remote_overrideSwigExplicitClientAPI_OpenVPNClient(swigCPtr, this, ClientAPI_RemoteOverride.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public void clock_tick() {
|
||||
if (getClass() == ClientAPI_OpenVPNClient.class) ovpncliJNI.ClientAPI_OpenVPNClient_clock_tick(swigCPtr, this); else ovpncliJNI.ClientAPI_OpenVPNClient_clock_tickSwigExplicitClientAPI_OpenVPNClient(swigCPtr, this);
|
||||
}
|
||||
|
||||
public static String crypto_self_test() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_crypto_self_test();
|
||||
}
|
||||
|
||||
public static int app_expire() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_app_expire();
|
||||
}
|
||||
|
||||
public static String platform() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_platform();
|
||||
}
|
||||
|
||||
public static String copyright() {
|
||||
return ovpncliJNI.ClientAPI_OpenVPNClient_copyright();
|
||||
}
|
||||
|
||||
}
|
107
client/android/src/net/openvpn/ovpn3/ClientAPI_ProvideCreds.java
Normal file
107
client/android/src/net/openvpn/ovpn3/ClientAPI_ProvideCreds.java
Normal file
|
@ -0,0 +1,107 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ProvideCreds {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_ProvideCreds(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ProvideCreds obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ProvideCreds(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setUsername(String value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_username_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_username_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPassword(String value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_password_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_password_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setHttp_proxy_user(String value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_http_proxy_user_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getHttp_proxy_user() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_http_proxy_user_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setHttp_proxy_pass(String value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_http_proxy_pass_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getHttp_proxy_pass() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_http_proxy_pass_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setResponse(String value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_response_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getResponse() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_response_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setDynamicChallengeCookie(String value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_dynamicChallengeCookie_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getDynamicChallengeCookie() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_dynamicChallengeCookie_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setReplacePasswordWithSessionID(boolean value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_replacePasswordWithSessionID_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getReplacePasswordWithSessionID() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_replacePasswordWithSessionID_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setCachePassword(boolean value) {
|
||||
ovpncliJNI.ClientAPI_ProvideCreds_cachePassword_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getCachePassword() {
|
||||
return ovpncliJNI.ClientAPI_ProvideCreds_cachePassword_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ProvideCreds() {
|
||||
this(ovpncliJNI.new_ClientAPI_ProvideCreds(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_RemoteOverride {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_RemoteOverride(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_RemoteOverride obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_RemoteOverride(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setHost(String value) {
|
||||
ovpncliJNI.ClientAPI_RemoteOverride_host_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getHost() {
|
||||
return ovpncliJNI.ClientAPI_RemoteOverride_host_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setIp(String value) {
|
||||
ovpncliJNI.ClientAPI_RemoteOverride_ip_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ovpncliJNI.ClientAPI_RemoteOverride_ip_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPort(String value) {
|
||||
ovpncliJNI.ClientAPI_RemoteOverride_port_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return ovpncliJNI.ClientAPI_RemoteOverride_port_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setProto(String value) {
|
||||
ovpncliJNI.ClientAPI_RemoteOverride_proto_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getProto() {
|
||||
return ovpncliJNI.ClientAPI_RemoteOverride_proto_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setError(String value) {
|
||||
ovpncliJNI.ClientAPI_RemoteOverride_error_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getError() {
|
||||
return ovpncliJNI.ClientAPI_RemoteOverride_error_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_RemoteOverride() {
|
||||
this(ovpncliJNI.new_ClientAPI_RemoteOverride(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ServerEntry {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_ServerEntry(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ServerEntry obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ServerEntry(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setServer(String value) {
|
||||
ovpncliJNI.ClientAPI_ServerEntry_server_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getServer() {
|
||||
return ovpncliJNI.ClientAPI_ServerEntry_server_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setFriendlyName(String value) {
|
||||
ovpncliJNI.ClientAPI_ServerEntry_friendlyName_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getFriendlyName() {
|
||||
return ovpncliJNI.ClientAPI_ServerEntry_friendlyName_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntry() {
|
||||
this(ovpncliJNI.new_ClientAPI_ServerEntry(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_ServerEntryVector extends java.util.AbstractList<ClientAPI_ServerEntry> implements java.util.RandomAccess {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_ServerEntryVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_ServerEntryVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_ServerEntryVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntryVector(ClientAPI_ServerEntry[] initialElements) {
|
||||
this();
|
||||
reserve(initialElements.length);
|
||||
|
||||
for (ClientAPI_ServerEntry element : initialElements) {
|
||||
add(element);
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntryVector(Iterable<ClientAPI_ServerEntry> initialElements) {
|
||||
this();
|
||||
for (ClientAPI_ServerEntry element : initialElements) {
|
||||
add(element);
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntry get(int index) {
|
||||
return doGet(index);
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntry set(int index, ClientAPI_ServerEntry e) {
|
||||
return doSet(index, e);
|
||||
}
|
||||
|
||||
public boolean add(ClientAPI_ServerEntry e) {
|
||||
modCount++;
|
||||
doAdd(e);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void add(int index, ClientAPI_ServerEntry e) {
|
||||
modCount++;
|
||||
doAdd(index, e);
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntry remove(int index) {
|
||||
modCount++;
|
||||
return doRemove(index);
|
||||
}
|
||||
|
||||
protected void removeRange(int fromIndex, int toIndex) {
|
||||
modCount++;
|
||||
doRemoveRange(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return doSize();
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntryVector() {
|
||||
this(ovpncliJNI.new_ClientAPI_ServerEntryVector__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntryVector(ClientAPI_ServerEntryVector other) {
|
||||
this(ovpncliJNI.new_ClientAPI_ServerEntryVector__SWIG_1(ClientAPI_ServerEntryVector.getCPtr(other), other), true);
|
||||
}
|
||||
|
||||
public long capacity() {
|
||||
return ovpncliJNI.ClientAPI_ServerEntryVector_capacity(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
ovpncliJNI.ClientAPI_ServerEntryVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return ovpncliJNI.ClientAPI_ServerEntryVector_isEmpty(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
ovpncliJNI.ClientAPI_ServerEntryVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_ServerEntryVector(int count, ClientAPI_ServerEntry value) {
|
||||
this(ovpncliJNI.new_ClientAPI_ServerEntryVector__SWIG_2(count, ClientAPI_ServerEntry.getCPtr(value), value), true);
|
||||
}
|
||||
|
||||
private int doSize() {
|
||||
return ovpncliJNI.ClientAPI_ServerEntryVector_doSize(swigCPtr, this);
|
||||
}
|
||||
|
||||
private void doAdd(ClientAPI_ServerEntry x) {
|
||||
ovpncliJNI.ClientAPI_ServerEntryVector_doAdd__SWIG_0(swigCPtr, this, ClientAPI_ServerEntry.getCPtr(x), x);
|
||||
}
|
||||
|
||||
private void doAdd(int index, ClientAPI_ServerEntry x) {
|
||||
ovpncliJNI.ClientAPI_ServerEntryVector_doAdd__SWIG_1(swigCPtr, this, index, ClientAPI_ServerEntry.getCPtr(x), x);
|
||||
}
|
||||
|
||||
private ClientAPI_ServerEntry doRemove(int index) {
|
||||
return new ClientAPI_ServerEntry(ovpncliJNI.ClientAPI_ServerEntryVector_doRemove(swigCPtr, this, index), true);
|
||||
}
|
||||
|
||||
private ClientAPI_ServerEntry doGet(int index) {
|
||||
return new ClientAPI_ServerEntry(ovpncliJNI.ClientAPI_ServerEntryVector_doGet(swigCPtr, this, index), false);
|
||||
}
|
||||
|
||||
private ClientAPI_ServerEntry doSet(int index, ClientAPI_ServerEntry val) {
|
||||
return new ClientAPI_ServerEntry(ovpncliJNI.ClientAPI_ServerEntryVector_doSet(swigCPtr, this, index, ClientAPI_ServerEntry.getCPtr(val), val), true);
|
||||
}
|
||||
|
||||
private void doRemoveRange(int fromIndex, int toIndex) {
|
||||
ovpncliJNI.ClientAPI_ServerEntryVector_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_SessionToken {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_SessionToken(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_SessionToken obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_SessionToken(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setUsername(String value) {
|
||||
ovpncliJNI.ClientAPI_SessionToken_username_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return ovpncliJNI.ClientAPI_SessionToken_username_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSession_id(String value) {
|
||||
ovpncliJNI.ClientAPI_SessionToken_session_id_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getSession_id() {
|
||||
return ovpncliJNI.ClientAPI_SessionToken_session_id_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_SessionToken() {
|
||||
this(ovpncliJNI.new_ClientAPI_SessionToken(), true);
|
||||
}
|
||||
|
||||
}
|
67
client/android/src/net/openvpn/ovpn3/ClientAPI_Status.java
Normal file
67
client/android/src/net/openvpn/ovpn3/ClientAPI_Status.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_Status {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_Status(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_Status obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_Status(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setError(boolean value) {
|
||||
ovpncliJNI.ClientAPI_Status_error_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getError() {
|
||||
return ovpncliJNI.ClientAPI_Status_error_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setStatus(String value) {
|
||||
ovpncliJNI.ClientAPI_Status_status_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return ovpncliJNI.ClientAPI_Status_status_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setMessage(String value) {
|
||||
ovpncliJNI.ClientAPI_Status_message_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return ovpncliJNI.ClientAPI_Status_message_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_Status() {
|
||||
this(ovpncliJNI.new_ClientAPI_Status(), true);
|
||||
}
|
||||
|
||||
}
|
144
client/android/src/net/openvpn/ovpn3/ClientAPI_StringVec.java
Normal file
144
client/android/src/net/openvpn/ovpn3/ClientAPI_StringVec.java
Normal file
|
@ -0,0 +1,144 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_StringVec extends java.util.AbstractList<String> implements java.util.RandomAccess {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_StringVec(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_StringVec obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_StringVec(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec(String[] initialElements) {
|
||||
this();
|
||||
reserve(initialElements.length);
|
||||
|
||||
for (String element : initialElements) {
|
||||
add(element);
|
||||
}
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec(Iterable<String> initialElements) {
|
||||
this();
|
||||
for (String element : initialElements) {
|
||||
add(element);
|
||||
}
|
||||
}
|
||||
|
||||
public String get(int index) {
|
||||
return doGet(index);
|
||||
}
|
||||
|
||||
public String set(int index, String e) {
|
||||
return doSet(index, e);
|
||||
}
|
||||
|
||||
public boolean add(String e) {
|
||||
modCount++;
|
||||
doAdd(e);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void add(int index, String e) {
|
||||
modCount++;
|
||||
doAdd(index, e);
|
||||
}
|
||||
|
||||
public String remove(int index) {
|
||||
modCount++;
|
||||
return doRemove(index);
|
||||
}
|
||||
|
||||
protected void removeRange(int fromIndex, int toIndex) {
|
||||
modCount++;
|
||||
doRemoveRange(fromIndex, toIndex);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return doSize();
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec() {
|
||||
this(ovpncliJNI.new_ClientAPI_StringVec__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec(ClientAPI_StringVec other) {
|
||||
this(ovpncliJNI.new_ClientAPI_StringVec__SWIG_1(ClientAPI_StringVec.getCPtr(other), other), true);
|
||||
}
|
||||
|
||||
public long capacity() {
|
||||
return ovpncliJNI.ClientAPI_StringVec_capacity(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
ovpncliJNI.ClientAPI_StringVec_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return ovpncliJNI.ClientAPI_StringVec_isEmpty(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
ovpncliJNI.ClientAPI_StringVec_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec(int count, String value) {
|
||||
this(ovpncliJNI.new_ClientAPI_StringVec__SWIG_2(count, value), true);
|
||||
}
|
||||
|
||||
private int doSize() {
|
||||
return ovpncliJNI.ClientAPI_StringVec_doSize(swigCPtr, this);
|
||||
}
|
||||
|
||||
private void doAdd(String x) {
|
||||
ovpncliJNI.ClientAPI_StringVec_doAdd__SWIG_0(swigCPtr, this, x);
|
||||
}
|
||||
|
||||
private void doAdd(int index, String x) {
|
||||
ovpncliJNI.ClientAPI_StringVec_doAdd__SWIG_1(swigCPtr, this, index, x);
|
||||
}
|
||||
|
||||
private String doRemove(int index) {
|
||||
return ovpncliJNI.ClientAPI_StringVec_doRemove(swigCPtr, this, index);
|
||||
}
|
||||
|
||||
private String doGet(int index) {
|
||||
return ovpncliJNI.ClientAPI_StringVec_doGet(swigCPtr, this, index);
|
||||
}
|
||||
|
||||
private String doSet(int index, String val) {
|
||||
return ovpncliJNI.ClientAPI_StringVec_doSet(swigCPtr, this, index, val);
|
||||
}
|
||||
|
||||
private void doRemoveRange(int fromIndex, int toIndex) {
|
||||
ovpncliJNI.ClientAPI_StringVec_doRemoveRange(swigCPtr, this, fromIndex, toIndex);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_TransportStats {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_TransportStats(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_TransportStats obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_TransportStats(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setBytesIn(long value) {
|
||||
ovpncliJNI.ClientAPI_TransportStats_bytesIn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getBytesIn() {
|
||||
return ovpncliJNI.ClientAPI_TransportStats_bytesIn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setBytesOut(long value) {
|
||||
ovpncliJNI.ClientAPI_TransportStats_bytesOut_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getBytesOut() {
|
||||
return ovpncliJNI.ClientAPI_TransportStats_bytesOut_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPacketsIn(long value) {
|
||||
ovpncliJNI.ClientAPI_TransportStats_packetsIn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getPacketsIn() {
|
||||
return ovpncliJNI.ClientAPI_TransportStats_packetsIn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPacketsOut(long value) {
|
||||
ovpncliJNI.ClientAPI_TransportStats_packetsOut_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getPacketsOut() {
|
||||
return ovpncliJNI.ClientAPI_TransportStats_packetsOut_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setLastPacketReceived(int value) {
|
||||
ovpncliJNI.ClientAPI_TransportStats_lastPacketReceived_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getLastPacketReceived() {
|
||||
return ovpncliJNI.ClientAPI_TransportStats_lastPacketReceived_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_TransportStats() {
|
||||
this(ovpncliJNI.new_ClientAPI_TransportStats(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ClientAPI_TunBuilderBase {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClientAPI_TunBuilderBase(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClientAPI_TunBuilderBase obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
ovpncliJNI.delete_ClientAPI_TunBuilderBase(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean tun_builder_new() {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_new(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_layer(int layer) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_layer(swigCPtr, this, layer);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_remote_address(String address, boolean ipv6) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_remote_address(swigCPtr, this, address, ipv6);
|
||||
}
|
||||
|
||||
public boolean tun_builder_add_address(String address, int prefix_length, String gateway, boolean ipv6, boolean net30) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_add_address(swigCPtr, this, address, prefix_length, gateway, ipv6, net30);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_route_metric_default(int metric) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_route_metric_default(swigCPtr, this, metric);
|
||||
}
|
||||
|
||||
public boolean tun_builder_reroute_gw(boolean ipv4, boolean ipv6, long flags) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_reroute_gw(swigCPtr, this, ipv4, ipv6, flags);
|
||||
}
|
||||
|
||||
public boolean tun_builder_add_route(String address, int prefix_length, int metric, boolean ipv6) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_add_route(swigCPtr, this, address, prefix_length, metric, ipv6);
|
||||
}
|
||||
|
||||
public boolean tun_builder_exclude_route(String address, int prefix_length, int metric, boolean ipv6) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_exclude_route(swigCPtr, this, address, prefix_length, metric, ipv6);
|
||||
}
|
||||
|
||||
public boolean tun_builder_add_dns_server(String address, boolean ipv6) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_add_dns_server(swigCPtr, this, address, ipv6);
|
||||
}
|
||||
|
||||
public boolean tun_builder_add_search_domain(String domain) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_add_search_domain(swigCPtr, this, domain);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_mtu(int mtu) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_mtu(swigCPtr, this, mtu);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_session_name(String name) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_session_name(swigCPtr, this, name);
|
||||
}
|
||||
|
||||
public boolean tun_builder_add_proxy_bypass(String bypass_host) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_add_proxy_bypass(swigCPtr, this, bypass_host);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_proxy_auto_config_url(String url) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_proxy_auto_config_url(swigCPtr, this, url);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_proxy_http(String host, int port) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_proxy_http(swigCPtr, this, host, port);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_proxy_https(String host, int port) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_proxy_https(swigCPtr, this, host, port);
|
||||
}
|
||||
|
||||
public boolean tun_builder_add_wins_server(String address) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_add_wins_server(swigCPtr, this, address);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_block_ipv6(boolean block_ipv6) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_block_ipv6(swigCPtr, this, block_ipv6);
|
||||
}
|
||||
|
||||
public boolean tun_builder_set_adapter_domain_suffix(String name) {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_set_adapter_domain_suffix(swigCPtr, this, name);
|
||||
}
|
||||
|
||||
public int tun_builder_establish() {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_establish(swigCPtr, this);
|
||||
}
|
||||
|
||||
public boolean tun_builder_persist() {
|
||||
return ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_persist(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClientAPI_StringVec tun_builder_get_local_networks(boolean ipv6) {
|
||||
return new ClientAPI_StringVec(ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_get_local_networks(swigCPtr, this, ipv6), true);
|
||||
}
|
||||
|
||||
public void tun_builder_establish_lite() {
|
||||
ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_establish_lite(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void tun_builder_teardown(boolean disconnect) {
|
||||
ovpncliJNI.ClientAPI_TunBuilderBase_tun_builder_teardown(swigCPtr, this, disconnect);
|
||||
}
|
||||
|
||||
public ClientAPI_TunBuilderBase() {
|
||||
this(ovpncliJNI.new_ClientAPI_TunBuilderBase(), true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class SWIGTYPE_p_std__string {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected SWIGTYPE_p_std__string(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_std__string() {
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected static long getCPtr(SWIGTYPE_p_std__string obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t() {
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected static long getCPtr(SWIGTYPE_p_std__vectorT_openvpn__ClientAPI__KeyValue_t obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
12
client/android/src/net/openvpn/ovpn3/ovpncli.java
Normal file
12
client/android/src/net/openvpn/ovpn3/ovpncli.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ovpncli {
|
||||
}
|
525
client/android/src/net/openvpn/ovpn3/ovpncliJNI.java
Normal file
525
client/android/src/net/openvpn/ovpn3/ovpncliJNI.java
Normal file
|
@ -0,0 +1,525 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package net.openvpn.ovpn3;
|
||||
|
||||
public class ovpncliJNI {
|
||||
public final static native long new_ClientAPI_ServerEntryVector__SWIG_0();
|
||||
public final static native long new_ClientAPI_ServerEntryVector__SWIG_1(long jarg1, ClientAPI_ServerEntryVector jarg1_);
|
||||
public final static native long ClientAPI_ServerEntryVector_capacity(long jarg1, ClientAPI_ServerEntryVector jarg1_);
|
||||
public final static native void ClientAPI_ServerEntryVector_reserve(long jarg1, ClientAPI_ServerEntryVector jarg1_, long jarg2);
|
||||
public final static native boolean ClientAPI_ServerEntryVector_isEmpty(long jarg1, ClientAPI_ServerEntryVector jarg1_);
|
||||
public final static native void ClientAPI_ServerEntryVector_clear(long jarg1, ClientAPI_ServerEntryVector jarg1_);
|
||||
public final static native long new_ClientAPI_ServerEntryVector__SWIG_2(int jarg1, long jarg2, ClientAPI_ServerEntry jarg2_);
|
||||
public final static native int ClientAPI_ServerEntryVector_doSize(long jarg1, ClientAPI_ServerEntryVector jarg1_);
|
||||
public final static native void ClientAPI_ServerEntryVector_doAdd__SWIG_0(long jarg1, ClientAPI_ServerEntryVector jarg1_, long jarg2, ClientAPI_ServerEntry jarg2_);
|
||||
public final static native void ClientAPI_ServerEntryVector_doAdd__SWIG_1(long jarg1, ClientAPI_ServerEntryVector jarg1_, int jarg2, long jarg3, ClientAPI_ServerEntry jarg3_);
|
||||
public final static native long ClientAPI_ServerEntryVector_doRemove(long jarg1, ClientAPI_ServerEntryVector jarg1_, int jarg2);
|
||||
public final static native long ClientAPI_ServerEntryVector_doGet(long jarg1, ClientAPI_ServerEntryVector jarg1_, int jarg2);
|
||||
public final static native long ClientAPI_ServerEntryVector_doSet(long jarg1, ClientAPI_ServerEntryVector jarg1_, int jarg2, long jarg3, ClientAPI_ServerEntry jarg3_);
|
||||
public final static native void ClientAPI_ServerEntryVector_doRemoveRange(long jarg1, ClientAPI_ServerEntryVector jarg1_, int jarg2, int jarg3);
|
||||
public final static native void delete_ClientAPI_ServerEntryVector(long jarg1);
|
||||
public final static native long new_ClientAPI_LLVector__SWIG_0();
|
||||
public final static native long new_ClientAPI_LLVector__SWIG_1(long jarg1, ClientAPI_LLVector jarg1_);
|
||||
public final static native long ClientAPI_LLVector_capacity(long jarg1, ClientAPI_LLVector jarg1_);
|
||||
public final static native void ClientAPI_LLVector_reserve(long jarg1, ClientAPI_LLVector jarg1_, long jarg2);
|
||||
public final static native boolean ClientAPI_LLVector_isEmpty(long jarg1, ClientAPI_LLVector jarg1_);
|
||||
public final static native void ClientAPI_LLVector_clear(long jarg1, ClientAPI_LLVector jarg1_);
|
||||
public final static native long new_ClientAPI_LLVector__SWIG_2(int jarg1, long jarg2);
|
||||
public final static native int ClientAPI_LLVector_doSize(long jarg1, ClientAPI_LLVector jarg1_);
|
||||
public final static native void ClientAPI_LLVector_doAdd__SWIG_0(long jarg1, ClientAPI_LLVector jarg1_, long jarg2);
|
||||
public final static native void ClientAPI_LLVector_doAdd__SWIG_1(long jarg1, ClientAPI_LLVector jarg1_, int jarg2, long jarg3);
|
||||
public final static native long ClientAPI_LLVector_doRemove(long jarg1, ClientAPI_LLVector jarg1_, int jarg2);
|
||||
public final static native long ClientAPI_LLVector_doGet(long jarg1, ClientAPI_LLVector jarg1_, int jarg2);
|
||||
public final static native long ClientAPI_LLVector_doSet(long jarg1, ClientAPI_LLVector jarg1_, int jarg2, long jarg3);
|
||||
public final static native void ClientAPI_LLVector_doRemoveRange(long jarg1, ClientAPI_LLVector jarg1_, int jarg2, int jarg3);
|
||||
public final static native void delete_ClientAPI_LLVector(long jarg1);
|
||||
public final static native long new_ClientAPI_StringVec__SWIG_0();
|
||||
public final static native long new_ClientAPI_StringVec__SWIG_1(long jarg1, ClientAPI_StringVec jarg1_);
|
||||
public final static native long ClientAPI_StringVec_capacity(long jarg1, ClientAPI_StringVec jarg1_);
|
||||
public final static native void ClientAPI_StringVec_reserve(long jarg1, ClientAPI_StringVec jarg1_, long jarg2);
|
||||
public final static native boolean ClientAPI_StringVec_isEmpty(long jarg1, ClientAPI_StringVec jarg1_);
|
||||
public final static native void ClientAPI_StringVec_clear(long jarg1, ClientAPI_StringVec jarg1_);
|
||||
public final static native long new_ClientAPI_StringVec__SWIG_2(int jarg1, String jarg2);
|
||||
public final static native int ClientAPI_StringVec_doSize(long jarg1, ClientAPI_StringVec jarg1_);
|
||||
public final static native void ClientAPI_StringVec_doAdd__SWIG_0(long jarg1, ClientAPI_StringVec jarg1_, String jarg2);
|
||||
public final static native void ClientAPI_StringVec_doAdd__SWIG_1(long jarg1, ClientAPI_StringVec jarg1_, int jarg2, String jarg3);
|
||||
public final static native String ClientAPI_StringVec_doRemove(long jarg1, ClientAPI_StringVec jarg1_, int jarg2);
|
||||
public final static native String ClientAPI_StringVec_doGet(long jarg1, ClientAPI_StringVec jarg1_, int jarg2);
|
||||
public final static native String ClientAPI_StringVec_doSet(long jarg1, ClientAPI_StringVec jarg1_, int jarg2, String jarg3);
|
||||
public final static native void ClientAPI_StringVec_doRemoveRange(long jarg1, ClientAPI_StringVec jarg1_, int jarg2, int jarg3);
|
||||
public final static native void delete_ClientAPI_StringVec(long jarg1);
|
||||
public final static native boolean ClientAPI_ExternalPKIBase_sign(long jarg1, ClientAPI_ExternalPKIBase jarg1_, String jarg2, long jarg3, String jarg4);
|
||||
public final static native void delete_ClientAPI_ExternalPKIBase(long jarg1);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_new(long jarg1, ClientAPI_TunBuilderBase jarg1_);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_layer(long jarg1, ClientAPI_TunBuilderBase jarg1_, int jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_remote_address(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, boolean jarg3);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_add_address(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, int jarg3, String jarg4, boolean jarg5, boolean jarg6);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_route_metric_default(long jarg1, ClientAPI_TunBuilderBase jarg1_, int jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_reroute_gw(long jarg1, ClientAPI_TunBuilderBase jarg1_, boolean jarg2, boolean jarg3, long jarg4);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_add_route(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, int jarg3, int jarg4, boolean jarg5);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_exclude_route(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, int jarg3, int jarg4, boolean jarg5);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_add_dns_server(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, boolean jarg3);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_add_search_domain(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_mtu(long jarg1, ClientAPI_TunBuilderBase jarg1_, int jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_session_name(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_add_proxy_bypass(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_proxy_auto_config_url(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_proxy_http(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, int jarg3);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_proxy_https(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2, int jarg3);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_add_wins_server(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_block_ipv6(long jarg1, ClientAPI_TunBuilderBase jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_set_adapter_domain_suffix(long jarg1, ClientAPI_TunBuilderBase jarg1_, String jarg2);
|
||||
public final static native int ClientAPI_TunBuilderBase_tun_builder_establish(long jarg1, ClientAPI_TunBuilderBase jarg1_);
|
||||
public final static native boolean ClientAPI_TunBuilderBase_tun_builder_persist(long jarg1, ClientAPI_TunBuilderBase jarg1_);
|
||||
public final static native long ClientAPI_TunBuilderBase_tun_builder_get_local_networks(long jarg1, ClientAPI_TunBuilderBase jarg1_, boolean jarg2);
|
||||
public final static native void ClientAPI_TunBuilderBase_tun_builder_establish_lite(long jarg1, ClientAPI_TunBuilderBase jarg1_);
|
||||
public final static native void ClientAPI_TunBuilderBase_tun_builder_teardown(long jarg1, ClientAPI_TunBuilderBase jarg1_, boolean jarg2);
|
||||
public final static native void delete_ClientAPI_TunBuilderBase(long jarg1);
|
||||
public final static native long new_ClientAPI_TunBuilderBase();
|
||||
public final static native void ClientAPI_ServerEntry_server_set(long jarg1, ClientAPI_ServerEntry jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ServerEntry_server_get(long jarg1, ClientAPI_ServerEntry jarg1_);
|
||||
public final static native void ClientAPI_ServerEntry_friendlyName_set(long jarg1, ClientAPI_ServerEntry jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ServerEntry_friendlyName_get(long jarg1, ClientAPI_ServerEntry jarg1_);
|
||||
public final static native long new_ClientAPI_ServerEntry();
|
||||
public final static native void delete_ClientAPI_ServerEntry(long jarg1);
|
||||
public final static native void ClientAPI_EvalConfig_error_set(long jarg1, ClientAPI_EvalConfig jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_EvalConfig_error_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_message_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_message_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_userlockedUsername_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_userlockedUsername_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_profileName_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_profileName_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_friendlyName_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_friendlyName_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_autologin_set(long jarg1, ClientAPI_EvalConfig jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_EvalConfig_autologin_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_externalPki_set(long jarg1, ClientAPI_EvalConfig jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_EvalConfig_externalPki_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_staticChallenge_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_staticChallenge_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_staticChallengeEcho_set(long jarg1, ClientAPI_EvalConfig jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_EvalConfig_staticChallengeEcho_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_privateKeyPasswordRequired_set(long jarg1, ClientAPI_EvalConfig jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_EvalConfig_privateKeyPasswordRequired_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_allowPasswordSave_set(long jarg1, ClientAPI_EvalConfig jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_EvalConfig_allowPasswordSave_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_remoteHost_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_remoteHost_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_remotePort_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_remotePort_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_remoteProto_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_remoteProto_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_serverList_set(long jarg1, ClientAPI_EvalConfig jarg1_, long jarg2, ClientAPI_ServerEntryVector jarg2_);
|
||||
public final static native long ClientAPI_EvalConfig_serverList_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native void ClientAPI_EvalConfig_windowsDriver_set(long jarg1, ClientAPI_EvalConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_EvalConfig_windowsDriver_get(long jarg1, ClientAPI_EvalConfig jarg1_);
|
||||
public final static native long new_ClientAPI_EvalConfig();
|
||||
public final static native void delete_ClientAPI_EvalConfig(long jarg1);
|
||||
public final static native void ClientAPI_ProvideCreds_username_set(long jarg1, ClientAPI_ProvideCreds jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ProvideCreds_username_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_password_set(long jarg1, ClientAPI_ProvideCreds jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ProvideCreds_password_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_http_proxy_user_set(long jarg1, ClientAPI_ProvideCreds jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ProvideCreds_http_proxy_user_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_http_proxy_pass_set(long jarg1, ClientAPI_ProvideCreds jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ProvideCreds_http_proxy_pass_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_response_set(long jarg1, ClientAPI_ProvideCreds jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ProvideCreds_response_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_dynamicChallengeCookie_set(long jarg1, ClientAPI_ProvideCreds jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ProvideCreds_dynamicChallengeCookie_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_replacePasswordWithSessionID_set(long jarg1, ClientAPI_ProvideCreds jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_ProvideCreds_replacePasswordWithSessionID_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native void ClientAPI_ProvideCreds_cachePassword_set(long jarg1, ClientAPI_ProvideCreds jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_ProvideCreds_cachePassword_get(long jarg1, ClientAPI_ProvideCreds jarg1_);
|
||||
public final static native long new_ClientAPI_ProvideCreds();
|
||||
public final static native void delete_ClientAPI_ProvideCreds(long jarg1);
|
||||
public final static native void ClientAPI_SessionToken_username_set(long jarg1, ClientAPI_SessionToken jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_SessionToken_username_get(long jarg1, ClientAPI_SessionToken jarg1_);
|
||||
public final static native void ClientAPI_SessionToken_session_id_set(long jarg1, ClientAPI_SessionToken jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_SessionToken_session_id_get(long jarg1, ClientAPI_SessionToken jarg1_);
|
||||
public final static native long new_ClientAPI_SessionToken();
|
||||
public final static native void delete_ClientAPI_SessionToken(long jarg1);
|
||||
public final static native void ClientAPI_DynamicChallenge_challenge_set(long jarg1, ClientAPI_DynamicChallenge jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_DynamicChallenge_challenge_get(long jarg1, ClientAPI_DynamicChallenge jarg1_);
|
||||
public final static native void ClientAPI_DynamicChallenge_echo_set(long jarg1, ClientAPI_DynamicChallenge jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_DynamicChallenge_echo_get(long jarg1, ClientAPI_DynamicChallenge jarg1_);
|
||||
public final static native void ClientAPI_DynamicChallenge_responseRequired_set(long jarg1, ClientAPI_DynamicChallenge jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_DynamicChallenge_responseRequired_get(long jarg1, ClientAPI_DynamicChallenge jarg1_);
|
||||
public final static native void ClientAPI_DynamicChallenge_stateID_set(long jarg1, ClientAPI_DynamicChallenge jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_DynamicChallenge_stateID_get(long jarg1, ClientAPI_DynamicChallenge jarg1_);
|
||||
public final static native long new_ClientAPI_DynamicChallenge();
|
||||
public final static native void delete_ClientAPI_DynamicChallenge(long jarg1);
|
||||
public final static native long new_ClientAPI_KeyValue__SWIG_0();
|
||||
public final static native long new_ClientAPI_KeyValue__SWIG_1(String jarg1, String jarg2);
|
||||
public final static native void ClientAPI_KeyValue_key_set(long jarg1, ClientAPI_KeyValue jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_KeyValue_key_get(long jarg1, ClientAPI_KeyValue jarg1_);
|
||||
public final static native void ClientAPI_KeyValue_value_set(long jarg1, ClientAPI_KeyValue jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_KeyValue_value_get(long jarg1, ClientAPI_KeyValue jarg1_);
|
||||
public final static native void delete_ClientAPI_KeyValue(long jarg1);
|
||||
public final static native void ClientAPI_Config_content_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_content_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_contentList_set(long jarg1, ClientAPI_Config jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_Config_contentList_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_guiVersion_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_guiVersion_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_ssoMethods_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_ssoMethods_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_hwAddrOverride_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_hwAddrOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_platformVersion_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_platformVersion_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_serverOverride_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_serverOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_portOverride_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_portOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_protoOverride_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_protoOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_protoVersionOverride_set(long jarg1, ClientAPI_Config jarg1_, int jarg2);
|
||||
public final static native int ClientAPI_Config_protoVersionOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_ipv6_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_ipv6_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_connTimeout_set(long jarg1, ClientAPI_Config jarg1_, int jarg2);
|
||||
public final static native int ClientAPI_Config_connTimeout_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_tunPersist_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_tunPersist_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_googleDnsFallback_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_googleDnsFallback_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_synchronousDnsLookup_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_synchronousDnsLookup_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_autologinSessions_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_autologinSessions_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_retryOnAuthFailed_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_retryOnAuthFailed_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_externalPkiAlias_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_externalPkiAlias_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_disableClientCert_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_disableClientCert_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_sslDebugLevel_set(long jarg1, ClientAPI_Config jarg1_, int jarg2);
|
||||
public final static native int ClientAPI_Config_sslDebugLevel_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_compressionMode_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_compressionMode_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_privateKeyPassword_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_privateKeyPassword_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_defaultKeyDirection_set(long jarg1, ClientAPI_Config jarg1_, int jarg2);
|
||||
public final static native int ClientAPI_Config_defaultKeyDirection_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_forceAesCbcCiphersuites_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_forceAesCbcCiphersuites_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_tlsVersionMinOverride_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_tlsVersionMinOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_tlsCertProfileOverride_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_tlsCertProfileOverride_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_tlsCipherList_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_tlsCipherList_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_tlsCiphersuitesList_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_tlsCiphersuitesList_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_peerInfo_set(long jarg1, ClientAPI_Config jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_Config_peerInfo_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_proxyHost_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_proxyHost_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_proxyPort_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_proxyPort_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_proxyUsername_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_proxyUsername_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_proxyPassword_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_proxyPassword_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_proxyAllowCleartextAuth_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_proxyAllowCleartextAuth_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_altProxy_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_altProxy_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_dco_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_dco_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_echo_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_echo_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_info_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_info_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_allowLocalLanAccess_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_allowLocalLanAccess_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_clockTickMS_set(long jarg1, ClientAPI_Config jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_Config_clockTickMS_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_gremlinConfig_set(long jarg1, ClientAPI_Config jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Config_gremlinConfig_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native void ClientAPI_Config_wintun_set(long jarg1, ClientAPI_Config jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Config_wintun_get(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native long new_ClientAPI_Config();
|
||||
public final static native void delete_ClientAPI_Config(long jarg1);
|
||||
public final static native void ClientAPI_Event_error_set(long jarg1, ClientAPI_Event jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Event_error_get(long jarg1, ClientAPI_Event jarg1_);
|
||||
public final static native void ClientAPI_Event_fatal_set(long jarg1, ClientAPI_Event jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Event_fatal_get(long jarg1, ClientAPI_Event jarg1_);
|
||||
public final static native void ClientAPI_Event_name_set(long jarg1, ClientAPI_Event jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Event_name_get(long jarg1, ClientAPI_Event jarg1_);
|
||||
public final static native void ClientAPI_Event_info_set(long jarg1, ClientAPI_Event jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Event_info_get(long jarg1, ClientAPI_Event jarg1_);
|
||||
public final static native long new_ClientAPI_Event();
|
||||
public final static native void delete_ClientAPI_Event(long jarg1);
|
||||
public final static native void ClientAPI_ConnectionInfo_defined_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_ConnectionInfo_defined_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_user_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_user_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_serverHost_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_serverHost_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_serverPort_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_serverPort_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_serverProto_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_serverProto_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_serverIp_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_serverIp_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_vpnIp4_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_vpnIp4_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_vpnIp6_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_vpnIp6_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_gw4_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_gw4_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_gw6_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_gw6_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_clientIp_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_clientIp_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native void ClientAPI_ConnectionInfo_tunName_set(long jarg1, ClientAPI_ConnectionInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ConnectionInfo_tunName_get(long jarg1, ClientAPI_ConnectionInfo jarg1_);
|
||||
public final static native long new_ClientAPI_ConnectionInfo();
|
||||
public final static native void delete_ClientAPI_ConnectionInfo(long jarg1);
|
||||
public final static native void ClientAPI_Status_error_set(long jarg1, ClientAPI_Status jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_Status_error_get(long jarg1, ClientAPI_Status jarg1_);
|
||||
public final static native void ClientAPI_Status_status_set(long jarg1, ClientAPI_Status jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Status_status_get(long jarg1, ClientAPI_Status jarg1_);
|
||||
public final static native void ClientAPI_Status_message_set(long jarg1, ClientAPI_Status jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_Status_message_get(long jarg1, ClientAPI_Status jarg1_);
|
||||
public final static native long new_ClientAPI_Status();
|
||||
public final static native void delete_ClientAPI_Status(long jarg1);
|
||||
public final static native long new_ClientAPI_LogInfo__SWIG_0();
|
||||
public final static native long new_ClientAPI_LogInfo__SWIG_1(String jarg1);
|
||||
public final static native void ClientAPI_LogInfo_text_set(long jarg1, ClientAPI_LogInfo jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_LogInfo_text_get(long jarg1, ClientAPI_LogInfo jarg1_);
|
||||
public final static native void delete_ClientAPI_LogInfo(long jarg1);
|
||||
public final static native void ClientAPI_InterfaceStats_bytesIn_set(long jarg1, ClientAPI_InterfaceStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_InterfaceStats_bytesIn_get(long jarg1, ClientAPI_InterfaceStats jarg1_);
|
||||
public final static native void ClientAPI_InterfaceStats_packetsIn_set(long jarg1, ClientAPI_InterfaceStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_InterfaceStats_packetsIn_get(long jarg1, ClientAPI_InterfaceStats jarg1_);
|
||||
public final static native void ClientAPI_InterfaceStats_errorsIn_set(long jarg1, ClientAPI_InterfaceStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_InterfaceStats_errorsIn_get(long jarg1, ClientAPI_InterfaceStats jarg1_);
|
||||
public final static native void ClientAPI_InterfaceStats_bytesOut_set(long jarg1, ClientAPI_InterfaceStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_InterfaceStats_bytesOut_get(long jarg1, ClientAPI_InterfaceStats jarg1_);
|
||||
public final static native void ClientAPI_InterfaceStats_packetsOut_set(long jarg1, ClientAPI_InterfaceStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_InterfaceStats_packetsOut_get(long jarg1, ClientAPI_InterfaceStats jarg1_);
|
||||
public final static native void ClientAPI_InterfaceStats_errorsOut_set(long jarg1, ClientAPI_InterfaceStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_InterfaceStats_errorsOut_get(long jarg1, ClientAPI_InterfaceStats jarg1_);
|
||||
public final static native long new_ClientAPI_InterfaceStats();
|
||||
public final static native void delete_ClientAPI_InterfaceStats(long jarg1);
|
||||
public final static native void ClientAPI_TransportStats_bytesIn_set(long jarg1, ClientAPI_TransportStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_TransportStats_bytesIn_get(long jarg1, ClientAPI_TransportStats jarg1_);
|
||||
public final static native void ClientAPI_TransportStats_bytesOut_set(long jarg1, ClientAPI_TransportStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_TransportStats_bytesOut_get(long jarg1, ClientAPI_TransportStats jarg1_);
|
||||
public final static native void ClientAPI_TransportStats_packetsIn_set(long jarg1, ClientAPI_TransportStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_TransportStats_packetsIn_get(long jarg1, ClientAPI_TransportStats jarg1_);
|
||||
public final static native void ClientAPI_TransportStats_packetsOut_set(long jarg1, ClientAPI_TransportStats jarg1_, long jarg2);
|
||||
public final static native long ClientAPI_TransportStats_packetsOut_get(long jarg1, ClientAPI_TransportStats jarg1_);
|
||||
public final static native void ClientAPI_TransportStats_lastPacketReceived_set(long jarg1, ClientAPI_TransportStats jarg1_, int jarg2);
|
||||
public final static native int ClientAPI_TransportStats_lastPacketReceived_get(long jarg1, ClientAPI_TransportStats jarg1_);
|
||||
public final static native long new_ClientAPI_TransportStats();
|
||||
public final static native void delete_ClientAPI_TransportStats(long jarg1);
|
||||
public final static native void ClientAPI_MergeConfig_status_set(long jarg1, ClientAPI_MergeConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_MergeConfig_status_get(long jarg1, ClientAPI_MergeConfig jarg1_);
|
||||
public final static native void ClientAPI_MergeConfig_errorText_set(long jarg1, ClientAPI_MergeConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_MergeConfig_errorText_get(long jarg1, ClientAPI_MergeConfig jarg1_);
|
||||
public final static native void ClientAPI_MergeConfig_basename_set(long jarg1, ClientAPI_MergeConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_MergeConfig_basename_get(long jarg1, ClientAPI_MergeConfig jarg1_);
|
||||
public final static native void ClientAPI_MergeConfig_profileContent_set(long jarg1, ClientAPI_MergeConfig jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_MergeConfig_profileContent_get(long jarg1, ClientAPI_MergeConfig jarg1_);
|
||||
public final static native void ClientAPI_MergeConfig_refPathList_set(long jarg1, ClientAPI_MergeConfig jarg1_, long jarg2, ClientAPI_StringVec jarg2_);
|
||||
public final static native long ClientAPI_MergeConfig_refPathList_get(long jarg1, ClientAPI_MergeConfig jarg1_);
|
||||
public final static native long new_ClientAPI_MergeConfig();
|
||||
public final static native void delete_ClientAPI_MergeConfig(long jarg1);
|
||||
public final static native void ClientAPI_ExternalPKIRequestBase_error_set(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_ExternalPKIRequestBase_error_get(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_);
|
||||
public final static native void ClientAPI_ExternalPKIRequestBase_errorText_set(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKIRequestBase_errorText_get(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_);
|
||||
public final static native void ClientAPI_ExternalPKIRequestBase_invalidAlias_set(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_, boolean jarg2);
|
||||
public final static native boolean ClientAPI_ExternalPKIRequestBase_invalidAlias_get(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_);
|
||||
public final static native void ClientAPI_ExternalPKIRequestBase_alias_set(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKIRequestBase_alias_get(long jarg1, ClientAPI_ExternalPKIRequestBase jarg1_);
|
||||
public final static native long new_ClientAPI_ExternalPKIRequestBase();
|
||||
public final static native void delete_ClientAPI_ExternalPKIRequestBase(long jarg1);
|
||||
public final static native void ClientAPI_ExternalPKICertRequest_cert_set(long jarg1, ClientAPI_ExternalPKICertRequest jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKICertRequest_cert_get(long jarg1, ClientAPI_ExternalPKICertRequest jarg1_);
|
||||
public final static native void ClientAPI_ExternalPKICertRequest_supportingChain_set(long jarg1, ClientAPI_ExternalPKICertRequest jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKICertRequest_supportingChain_get(long jarg1, ClientAPI_ExternalPKICertRequest jarg1_);
|
||||
public final static native long new_ClientAPI_ExternalPKICertRequest();
|
||||
public final static native void delete_ClientAPI_ExternalPKICertRequest(long jarg1);
|
||||
public final static native void ClientAPI_ExternalPKISignRequest_data_set(long jarg1, ClientAPI_ExternalPKISignRequest jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKISignRequest_data_get(long jarg1, ClientAPI_ExternalPKISignRequest jarg1_);
|
||||
public final static native void ClientAPI_ExternalPKISignRequest_sig_set(long jarg1, ClientAPI_ExternalPKISignRequest jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKISignRequest_sig_get(long jarg1, ClientAPI_ExternalPKISignRequest jarg1_);
|
||||
public final static native void ClientAPI_ExternalPKISignRequest_algorithm_set(long jarg1, ClientAPI_ExternalPKISignRequest jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_ExternalPKISignRequest_algorithm_get(long jarg1, ClientAPI_ExternalPKISignRequest jarg1_);
|
||||
public final static native long new_ClientAPI_ExternalPKISignRequest();
|
||||
public final static native void delete_ClientAPI_ExternalPKISignRequest(long jarg1);
|
||||
public final static native void ClientAPI_RemoteOverride_host_set(long jarg1, ClientAPI_RemoteOverride jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_RemoteOverride_host_get(long jarg1, ClientAPI_RemoteOverride jarg1_);
|
||||
public final static native void ClientAPI_RemoteOverride_ip_set(long jarg1, ClientAPI_RemoteOverride jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_RemoteOverride_ip_get(long jarg1, ClientAPI_RemoteOverride jarg1_);
|
||||
public final static native void ClientAPI_RemoteOverride_port_set(long jarg1, ClientAPI_RemoteOverride jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_RemoteOverride_port_get(long jarg1, ClientAPI_RemoteOverride jarg1_);
|
||||
public final static native void ClientAPI_RemoteOverride_proto_set(long jarg1, ClientAPI_RemoteOverride jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_RemoteOverride_proto_get(long jarg1, ClientAPI_RemoteOverride jarg1_);
|
||||
public final static native void ClientAPI_RemoteOverride_error_set(long jarg1, ClientAPI_RemoteOverride jarg1_, String jarg2);
|
||||
public final static native String ClientAPI_RemoteOverride_error_get(long jarg1, ClientAPI_RemoteOverride jarg1_);
|
||||
public final static native long new_ClientAPI_RemoteOverride();
|
||||
public final static native void delete_ClientAPI_RemoteOverride(long jarg1);
|
||||
public final static native long new_ClientAPI_OpenVPNClient();
|
||||
public final static native void delete_ClientAPI_OpenVPNClient(long jarg1);
|
||||
public final static native long ClientAPI_OpenVPNClient_merge_config_static(String jarg1, boolean jarg2);
|
||||
public final static native long ClientAPI_OpenVPNClient_merge_config_string_static(String jarg1);
|
||||
public final static native long ClientAPI_OpenVPNClient_eval_config_static(long jarg1, ClientAPI_Config jarg1_);
|
||||
public final static native int ClientAPI_OpenVPNClient_max_profile_size();
|
||||
public final static native boolean ClientAPI_OpenVPNClient_parse_dynamic_challenge(String jarg1, long jarg2, ClientAPI_DynamicChallenge jarg2_);
|
||||
public final static native long ClientAPI_OpenVPNClient_eval_config(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_Config jarg2_);
|
||||
public final static native long ClientAPI_OpenVPNClient_provide_creds(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_ProvideCreds jarg2_);
|
||||
public final static native boolean ClientAPI_OpenVPNClient_socket_protect(long jarg1, ClientAPI_OpenVPNClient jarg1_, int jarg2, String jarg3, boolean jarg4);
|
||||
public final static native boolean ClientAPI_OpenVPNClient_socket_protectSwigExplicitClientAPI_OpenVPNClient(long jarg1, ClientAPI_OpenVPNClient jarg1_, int jarg2, String jarg3, boolean jarg4);
|
||||
public final static native long ClientAPI_OpenVPNClient_connect(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native long ClientAPI_OpenVPNClient_connection_info(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native boolean ClientAPI_OpenVPNClient_session_token(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_SessionToken jarg2_);
|
||||
public final static native void ClientAPI_OpenVPNClient_stop(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native void ClientAPI_OpenVPNClient_pause(long jarg1, ClientAPI_OpenVPNClient jarg1_, String jarg2);
|
||||
public final static native void ClientAPI_OpenVPNClient_resume(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native void ClientAPI_OpenVPNClient_reconnect(long jarg1, ClientAPI_OpenVPNClient jarg1_, int jarg2);
|
||||
public final static native boolean ClientAPI_OpenVPNClient_pause_on_connection_timeout(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native int ClientAPI_OpenVPNClient_stats_n();
|
||||
public final static native String ClientAPI_OpenVPNClient_stats_name(int jarg1);
|
||||
public final static native long ClientAPI_OpenVPNClient_stats_value(long jarg1, ClientAPI_OpenVPNClient jarg1_, int jarg2);
|
||||
public final static native long ClientAPI_OpenVPNClient_stats_bundle(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native long ClientAPI_OpenVPNClient_tun_stats(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native long ClientAPI_OpenVPNClient_transport_stats(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native void ClientAPI_OpenVPNClient_post_cc_msg(long jarg1, ClientAPI_OpenVPNClient jarg1_, String jarg2);
|
||||
public final static native void ClientAPI_OpenVPNClient_event(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_Event jarg2_);
|
||||
public final static native void ClientAPI_OpenVPNClient_log(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_LogInfo jarg2_);
|
||||
public final static native void ClientAPI_OpenVPNClient_external_pki_cert_request(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_ExternalPKICertRequest jarg2_);
|
||||
public final static native void ClientAPI_OpenVPNClient_external_pki_sign_request(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_ExternalPKISignRequest jarg2_);
|
||||
public final static native boolean ClientAPI_OpenVPNClient_remote_override_enabled(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native boolean ClientAPI_OpenVPNClient_remote_override_enabledSwigExplicitClientAPI_OpenVPNClient(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native void ClientAPI_OpenVPNClient_remote_override(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_RemoteOverride jarg2_);
|
||||
public final static native void ClientAPI_OpenVPNClient_remote_overrideSwigExplicitClientAPI_OpenVPNClient(long jarg1, ClientAPI_OpenVPNClient jarg1_, long jarg2, ClientAPI_RemoteOverride jarg2_);
|
||||
public final static native void ClientAPI_OpenVPNClient_clock_tick(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native void ClientAPI_OpenVPNClient_clock_tickSwigExplicitClientAPI_OpenVPNClient(long jarg1, ClientAPI_OpenVPNClient jarg1_);
|
||||
public final static native String ClientAPI_OpenVPNClient_crypto_self_test();
|
||||
public final static native int ClientAPI_OpenVPNClient_app_expire();
|
||||
public final static native String ClientAPI_OpenVPNClient_platform();
|
||||
public final static native String ClientAPI_OpenVPNClient_copyright();
|
||||
public final static native void ClientAPI_OpenVPNClient_director_connect(ClientAPI_OpenVPNClient obj, long cptr, boolean mem_own, boolean weak_global);
|
||||
public final static native void ClientAPI_OpenVPNClient_change_ownership(ClientAPI_OpenVPNClient obj, long cptr, boolean take_or_release);
|
||||
public final static native long ClientAPI_ExternalPKICertRequest_SWIGUpcast(long jarg1);
|
||||
public final static native long ClientAPI_ExternalPKISignRequest_SWIGUpcast(long jarg1);
|
||||
public final static native long ClientAPI_OpenVPNClient_SWIGUpcast(long jarg1);
|
||||
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_new(ClientAPI_OpenVPNClient jself) {
|
||||
return jself.tun_builder_new();
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_layer(ClientAPI_OpenVPNClient jself, int layer) {
|
||||
return jself.tun_builder_set_layer(layer);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_remote_address(ClientAPI_OpenVPNClient jself, String address, boolean ipv6) {
|
||||
return jself.tun_builder_set_remote_address(address, ipv6);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_add_address(ClientAPI_OpenVPNClient jself, String address, int prefix_length, String gateway, boolean ipv6, boolean net30) {
|
||||
return jself.tun_builder_add_address(address, prefix_length, gateway, ipv6, net30);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_route_metric_default(ClientAPI_OpenVPNClient jself, int metric) {
|
||||
return jself.tun_builder_set_route_metric_default(metric);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_reroute_gw(ClientAPI_OpenVPNClient jself, boolean ipv4, boolean ipv6, long flags) {
|
||||
return jself.tun_builder_reroute_gw(ipv4, ipv6, flags);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_add_route(ClientAPI_OpenVPNClient jself, String address, int prefix_length, int metric, boolean ipv6) {
|
||||
return jself.tun_builder_add_route(address, prefix_length, metric, ipv6);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_exclude_route(ClientAPI_OpenVPNClient jself, String address, int prefix_length, int metric, boolean ipv6) {
|
||||
return jself.tun_builder_exclude_route(address, prefix_length, metric, ipv6);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_add_dns_server(ClientAPI_OpenVPNClient jself, String address, boolean ipv6) {
|
||||
return jself.tun_builder_add_dns_server(address, ipv6);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_add_search_domain(ClientAPI_OpenVPNClient jself, String domain) {
|
||||
return jself.tun_builder_add_search_domain(domain);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_mtu(ClientAPI_OpenVPNClient jself, int mtu) {
|
||||
return jself.tun_builder_set_mtu(mtu);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_session_name(ClientAPI_OpenVPNClient jself, String name) {
|
||||
return jself.tun_builder_set_session_name(name);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_add_proxy_bypass(ClientAPI_OpenVPNClient jself, String bypass_host) {
|
||||
return jself.tun_builder_add_proxy_bypass(bypass_host);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_proxy_auto_config_url(ClientAPI_OpenVPNClient jself, String url) {
|
||||
return jself.tun_builder_set_proxy_auto_config_url(url);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_proxy_http(ClientAPI_OpenVPNClient jself, String host, int port) {
|
||||
return jself.tun_builder_set_proxy_http(host, port);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_proxy_https(ClientAPI_OpenVPNClient jself, String host, int port) {
|
||||
return jself.tun_builder_set_proxy_https(host, port);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_add_wins_server(ClientAPI_OpenVPNClient jself, String address) {
|
||||
return jself.tun_builder_add_wins_server(address);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_block_ipv6(ClientAPI_OpenVPNClient jself, boolean block_ipv6) {
|
||||
return jself.tun_builder_set_block_ipv6(block_ipv6);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_set_adapter_domain_suffix(ClientAPI_OpenVPNClient jself, String name) {
|
||||
return jself.tun_builder_set_adapter_domain_suffix(name);
|
||||
}
|
||||
public static int SwigDirector_ClientAPI_OpenVPNClient_tun_builder_establish(ClientAPI_OpenVPNClient jself) {
|
||||
return jself.tun_builder_establish();
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_tun_builder_persist(ClientAPI_OpenVPNClient jself) {
|
||||
return jself.tun_builder_persist();
|
||||
}
|
||||
public static long SwigDirector_ClientAPI_OpenVPNClient_tun_builder_get_local_networks(ClientAPI_OpenVPNClient jself, boolean ipv6) {
|
||||
return ClientAPI_StringVec.getCPtr(jself.tun_builder_get_local_networks(ipv6));
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_tun_builder_establish_lite(ClientAPI_OpenVPNClient jself) {
|
||||
jself.tun_builder_establish_lite();
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_tun_builder_teardown(ClientAPI_OpenVPNClient jself, boolean disconnect) {
|
||||
jself.tun_builder_teardown(disconnect);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_socket_protect(ClientAPI_OpenVPNClient jself, int socket, String remote, boolean ipv6) {
|
||||
return jself.socket_protect(socket, remote, ipv6);
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_pause_on_connection_timeout(ClientAPI_OpenVPNClient jself) {
|
||||
return jself.pause_on_connection_timeout();
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_event(ClientAPI_OpenVPNClient jself, long arg0) {
|
||||
jself.event(new ClientAPI_Event(arg0, false));
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_log(ClientAPI_OpenVPNClient jself, long arg0) {
|
||||
jself.log(new ClientAPI_LogInfo(arg0, false));
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_external_pki_cert_request(ClientAPI_OpenVPNClient jself, long arg0) {
|
||||
jself.external_pki_cert_request(new ClientAPI_ExternalPKICertRequest(arg0, false));
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_external_pki_sign_request(ClientAPI_OpenVPNClient jself, long arg0) {
|
||||
jself.external_pki_sign_request(new ClientAPI_ExternalPKISignRequest(arg0, false));
|
||||
}
|
||||
public static boolean SwigDirector_ClientAPI_OpenVPNClient_remote_override_enabled(ClientAPI_OpenVPNClient jself) {
|
||||
return jself.remote_override_enabled();
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_remote_override(ClientAPI_OpenVPNClient jself, long arg0) {
|
||||
jself.remote_override(new ClientAPI_RemoteOverride(arg0, false));
|
||||
}
|
||||
public static void SwigDirector_ClientAPI_OpenVPNClient_clock_tick(ClientAPI_OpenVPNClient jself) {
|
||||
jself.clock_tick();
|
||||
}
|
||||
|
||||
private final static native void swig_module_init();
|
||||
static {
|
||||
swig_module_init();
|
||||
}
|
||||
}
|
151
client/android/src/org/amnezia/vpn/OpenVPNThreadv3.kt
Normal file
151
client/android/src/org/amnezia/vpn/OpenVPNThreadv3.kt
Normal file
|
@ -0,0 +1,151 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.amnezia.vpn
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.system.OsConstants
|
||||
import java.io.File
|
||||
import com.wireguard.android.util.SharedLibraryLoader
|
||||
import com.wireguard.config.*
|
||||
import com.wireguard.crypto.Key
|
||||
import org.json.JSONObject
|
||||
|
||||
import net.openvpn.ovpn3.ClientAPI_Config
|
||||
import net.openvpn.ovpn3.ClientAPI_EvalConfig
|
||||
import net.openvpn.ovpn3.ClientAPI_Event
|
||||
import net.openvpn.ovpn3.ClientAPI_ExternalPKICertRequest
|
||||
import net.openvpn.ovpn3.ClientAPI_ExternalPKISignRequest
|
||||
import net.openvpn.ovpn3.ClientAPI_LogInfo
|
||||
import net.openvpn.ovpn3.ClientAPI_OpenVPNClient
|
||||
import net.openvpn.ovpn3.ClientAPI_ProvideCreds
|
||||
import net.openvpn.ovpn3.ClientAPI_Status
|
||||
import net.openvpn.ovpn3.ClientAPI_TransportStats
|
||||
|
||||
class OpenVPNThreadv3(var service: VPNService): ClientAPI_OpenVPNClient(), Runnable {
|
||||
private val tag = "OpenVPNThreadv3"
|
||||
private var mAlreadyInitialised = false
|
||||
private var mService: VPNService = service
|
||||
|
||||
override fun run() {
|
||||
|
||||
val config: ClientAPI_Config = ClientAPI_Config()
|
||||
config.content = mService.getVpnConfig().getJSONObject("openvpn_config_data").getString("config")
|
||||
|
||||
eval_config(config)
|
||||
|
||||
val status = connect()
|
||||
if (status.getError()) {
|
||||
Log.i(tag, "connect() error: " + status.getError() + ": " + status.getMessage())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun log(arg0: ClientAPI_LogInfo){
|
||||
Log.i(tag, arg0.getText())
|
||||
}
|
||||
|
||||
override fun event(event: ClientAPI_Event ) {
|
||||
val eventName = event.getName()
|
||||
when (eventName) {
|
||||
"CONNECTED" -> mService.isUp = true
|
||||
"DISCONNECTED" -> mService.isUp = false
|
||||
}
|
||||
Log.i(tag, eventName)
|
||||
}
|
||||
|
||||
override fun tun_builder_new(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_establish(): Int {
|
||||
Log.v(tag, "tun_builder_establish")
|
||||
return mService.establish()!!.detachFd()
|
||||
}
|
||||
|
||||
override fun tun_builder_add_address(address: String , prefix_length: Int , gateway: String , ipv6:Boolean , net30: Boolean ): Boolean {
|
||||
Log.v(tag, "tun_builder_add_address")
|
||||
mService.addAddress(address, prefix_length)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_add_route(address: String, prefix_length: Int, metric: Int, ipv6: Boolean): Boolean {
|
||||
Log.v(tag, "tun_builder_add_route")
|
||||
if (address.equals("remote_host"))
|
||||
return false
|
||||
|
||||
mService.addRoute(address, prefix_length);
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_reroute_gw(ipv4: Boolean, ipv6: Boolean , flags: Long): Boolean {
|
||||
Log.v(tag, "tun_builder_reroute_gw")
|
||||
mService.addRoute("0.0.0.0", 0)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_exclude_route(address: String, prefix_length: Int, metric: Int, ipv6: Boolean): Boolean {
|
||||
Log.v(tag, "tun_builder_exclude_route")
|
||||
mService.addRoute(address, prefix_length);
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_set_remote_address(address: String , ipv6: Boolean): Boolean {
|
||||
mService.setMtu(1500)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_set_mtu(mtu: Int): Boolean {
|
||||
Log.v(tag, "tun_builder_set_mtu")
|
||||
mService.setMtu(mtu)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_add_dns_server(address: String , ipv6: Boolean): Boolean {
|
||||
mService.addDNS(address)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_set_session_name(name: String ): Boolean {
|
||||
Log.v(tag, "We should call this session: " + name)
|
||||
mService.setSessionName(name)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_set_proxy_http(host: String, port: Int): Boolean {
|
||||
return mService.addHttpProxy(host, port);
|
||||
}
|
||||
|
||||
override fun tun_builder_set_proxy_https(host: String , port: Int): Boolean {
|
||||
Log.v(tag, "tun_builder_set_proxy_https")
|
||||
return false
|
||||
}
|
||||
|
||||
override fun pause_on_connection_timeout(): Boolean {
|
||||
Log.v(tag, "pause_on_connection_timeout")
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_add_search_domain(domain: String ): Boolean {
|
||||
mService.setDomain(domain);
|
||||
return true
|
||||
}
|
||||
|
||||
override fun tun_builder_set_layer(layer: Int): Boolean {
|
||||
return layer == 3
|
||||
}
|
||||
|
||||
override fun socket_protect(socket: Int, remote: String, ipv6: Boolean): Boolean {
|
||||
Log.v(tag, "socket_protect")
|
||||
return mService.protect(socket);
|
||||
|
||||
}
|
||||
|
||||
override fun stop() {
|
||||
super.stop()
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.amnezia.vpn
|
||||
|
||||
|
@ -8,6 +8,8 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.IBinder
|
||||
import android.net.ProxyInfo
|
||||
import android.os.ParcelFileDescriptor
|
||||
import android.system.OsConstants
|
||||
import com.wireguard.android.util.SharedLibraryLoader
|
||||
import com.wireguard.config.*
|
||||
|
@ -18,9 +20,12 @@ class VPNService : android.net.VpnService() {
|
|||
private val tag = "VPNService"
|
||||
private var mBinder: VPNServiceBinder = VPNServiceBinder(this)
|
||||
private var mConfig: JSONObject? = null
|
||||
private var mProtocol: String? = null
|
||||
private var mConnectionTime: Long = 0
|
||||
private var mAlreadyInitialised = false
|
||||
private var mbuilder: Builder = Builder()
|
||||
|
||||
private var mOpenVPNThreadv3: OpenVPNThreadv3? = null
|
||||
private var currentTunnelHandle = -1
|
||||
|
||||
fun init() {
|
||||
|
@ -29,9 +34,12 @@ class VPNService : android.net.VpnService() {
|
|||
}
|
||||
Log.init(this)
|
||||
SharedLibraryLoader.loadSharedLibrary(this, "wg-go")
|
||||
Log.i(tag, "loaded lib")
|
||||
SharedLibraryLoader.loadSharedLibrary(this, "ovpn3")
|
||||
Log.i(tag, "Loaded libs")
|
||||
Log.e(tag, "Wireguard Version ${wgVersion()}")
|
||||
mOpenVPNThreadv3 = OpenVPNThreadv3 (this)
|
||||
mAlreadyInitialised = true
|
||||
|
||||
}
|
||||
|
||||
override fun onUnbind(intent: Intent?): Boolean {
|
||||
|
@ -44,9 +52,9 @@ class VPNService : android.net.VpnService() {
|
|||
}
|
||||
|
||||
/**
|
||||
* EntryPoint for the Service, gets Called when AndroidController.cpp
|
||||
* calles bindService. Returns the [VPNServiceBinder] so QT can send Requests to it.
|
||||
*/
|
||||
* EntryPoint for the Service, gets Called when AndroidController.cpp
|
||||
* calles bindService. Returns the [VPNServiceBinder] so QT can send Requests to it.
|
||||
*/
|
||||
override fun onBind(intent: Intent?): IBinder? {
|
||||
Log.v(tag, "Got Bind request")
|
||||
init()
|
||||
|
@ -54,10 +62,10 @@ class VPNService : android.net.VpnService() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Might be the entryPoint if the Service gets Started via an
|
||||
* Service Intent: Might be from Always-On-Vpn from Settings
|
||||
* or from Booting the device and having "connect on boot" enabled.
|
||||
*/
|
||||
* Might be the entryPoint if the Service gets Started via an
|
||||
* Service Intent: Might be from Always-On-Vpn from Settings
|
||||
* or from Booting the device and having "connect on boot" enabled.
|
||||
*/
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
init()
|
||||
intent?.let {
|
||||
|
@ -76,32 +84,32 @@ class VPNService : android.net.VpnService() {
|
|||
Log.e(
|
||||
tag,
|
||||
"VPN service was triggered without defining a Server or having a tunnel"
|
||||
)
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
)
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
}
|
||||
this.mConfig = JSONObject(lastConfString)
|
||||
}
|
||||
this.mConfig = JSONObject(lastConfString)
|
||||
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
}
|
||||
turnOn(this.mConfig!!)
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
}
|
||||
|
||||
// Invoked when the application is revoked.
|
||||
// At this moment, the VPN interface is already deactivated by the system.
|
||||
override fun onRevoke() {
|
||||
this.turnOff()
|
||||
super.onRevoke()
|
||||
}
|
||||
// Invoked when the application is revoked.
|
||||
// At this moment, the VPN interface is already deactivated by the system.
|
||||
override fun onRevoke() {
|
||||
this.turnOff()
|
||||
super.onRevoke()
|
||||
}
|
||||
|
||||
var connectionTime: Long = 0
|
||||
var connectionTime: Long = 0
|
||||
get() {
|
||||
return mConnectionTime
|
||||
}
|
||||
|
||||
var isUp: Boolean
|
||||
var isUp: Boolean
|
||||
get() {
|
||||
return currentTunnelHandle >= 0
|
||||
}
|
||||
private set(value) {
|
||||
set(value) {
|
||||
if (value) {
|
||||
mBinder.dispatchEvent(VPNServiceBinder.EVENTS.connected, "")
|
||||
mConnectionTime = System.currentTimeMillis()
|
||||
|
@ -110,7 +118,7 @@ class VPNService : android.net.VpnService() {
|
|||
mBinder.dispatchEvent(VPNServiceBinder.EVENTS.disconnected, "")
|
||||
mConnectionTime = 0
|
||||
}
|
||||
val status: JSONObject
|
||||
val status: JSONObject
|
||||
get() {
|
||||
val deviceIpv4: String = ""
|
||||
return JSONObject().apply {
|
||||
|
@ -120,190 +128,273 @@ class VPNService : android.net.VpnService() {
|
|||
putOpt("deviceIpv4", mConfig?.getJSONObject("device")?.getString("ipv4Address"))
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Checks if the VPN Permission is given.
|
||||
* If the permission is given, returns true
|
||||
* Requests permission and returns false if not.
|
||||
*/
|
||||
fun checkPermissions(): Boolean {
|
||||
// See https://developer.android.com/guide/topics/connectivity/vpn#connect_a_service
|
||||
// Call Prepare, if we get an Intent back, we dont have the VPN Permission
|
||||
// from the user. So we need to pass this to our main Activity and exit here.
|
||||
val intent = prepare(this)
|
||||
if (intent == null) {
|
||||
Log.e(tag, "VPN Permission Already Present")
|
||||
/*
|
||||
* Checks if the VPN Permission is given.
|
||||
* If the permission is given, returns true
|
||||
* Requests permission and returns false if not.
|
||||
*/
|
||||
fun checkPermissions(): Boolean {
|
||||
// See https://developer.android.com/guide/topics/connectivity/vpn#connect_a_service
|
||||
// Call Prepare, if we get an Intent back, we dont have the VPN Permission
|
||||
// from the user. So we need to pass this to our main Activity and exit here.
|
||||
val intent = prepare(this)
|
||||
if (intent == null) {
|
||||
Log.e(tag, "VPN Permission Already Present")
|
||||
return true
|
||||
}
|
||||
Log.e(tag, "Requesting VPN Permission")
|
||||
return false
|
||||
}
|
||||
|
||||
fun turnOn(json: JSONObject?): Int {
|
||||
if (!checkPermissions()) {
|
||||
Log.e(tag, "turn on was called without no permissions present!")
|
||||
isUp = false
|
||||
return 0
|
||||
}
|
||||
Log.i(tag, "Permission okay")
|
||||
mConfig = json!!
|
||||
mProtocol = mConfig!!.getString("protocol")
|
||||
when (mProtocol) {
|
||||
"openvpn" -> startOpenVpn()
|
||||
"wireguard" -> startWireGuard()
|
||||
else -> {
|
||||
Log.e(tag, "No protocol")
|
||||
return 0
|
||||
}
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
fun establish(): ParcelFileDescriptor? {
|
||||
mbuilder.allowFamily(OsConstants.AF_INET)
|
||||
mbuilder.allowFamily(OsConstants.AF_INET6)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) mbuilder.setMetered(false)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) setUnderlyingNetworks(null)
|
||||
|
||||
return mbuilder.establish()
|
||||
}
|
||||
|
||||
fun setMtu(mtu: Int) {
|
||||
mbuilder.setMtu(mtu)
|
||||
}
|
||||
|
||||
fun addAddress(ip: String, len: Int){
|
||||
Log.v(tag, "mbuilder.addAddress($ip, $len)")
|
||||
mbuilder.addAddress(ip, len)
|
||||
}
|
||||
|
||||
fun addRoute(ip: String, len: Int){
|
||||
Log.v(tag, "mbuilder.addRoute($ip, $len)")
|
||||
mbuilder.addRoute(ip, len)
|
||||
}
|
||||
|
||||
fun addDNS(ip: String){
|
||||
Log.v(tag, "mbuilder.addDnsServer($ip)")
|
||||
mbuilder.addDnsServer(ip)
|
||||
if ("samsung".equals(Build.BRAND) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
|
||||
mbuilder.addRoute(ip, 32)
|
||||
}
|
||||
}
|
||||
|
||||
fun setSessionName(name: String){
|
||||
Log.v(tag, "mbuilder.setSession($name)")
|
||||
mbuilder.setSession(name)
|
||||
}
|
||||
|
||||
fun addHttpProxy(host: String, port: Int): Boolean{
|
||||
val proxyInfo = ProxyInfo.buildDirectProxy(host, port)
|
||||
Log.v(tag, "mbuilder.addHttpProxy($host, $port)")
|
||||
mbuilder.setHttpProxy(proxyInfo)
|
||||
return true
|
||||
}
|
||||
Log.e(tag, "Requesting VPN Permission")
|
||||
return false
|
||||
}
|
||||
|
||||
fun turnOn(json: JSONObject) {
|
||||
Log.sensitive(tag, json.toString())
|
||||
val wireguard_conf = buildWireugardConfig(json)
|
||||
fun setDomain(domain: String) {
|
||||
Log.v(tag, "mbuilder.setDomain($domain)")
|
||||
mbuilder.addSearchDomain(domain)
|
||||
}
|
||||
|
||||
fun turnOff() {
|
||||
Log.v(tag, "Try to disable tunnel")
|
||||
when(mProtocol){
|
||||
"wireguard" -> wgTurnOff(currentTunnelHandle)
|
||||
"openvpn" -> ovpnTurnOff()
|
||||
else -> {
|
||||
Log.e(tag, "No protocol")
|
||||
}
|
||||
}
|
||||
currentTunnelHandle = -1
|
||||
stopForeground(true)
|
||||
|
||||
if (!checkPermissions()) {
|
||||
Log.e(tag, "turn on was called without no permissions present!")
|
||||
isUp = false
|
||||
return
|
||||
stopSelf();
|
||||
}
|
||||
Log.i(tag, "Permission okay")
|
||||
if (currentTunnelHandle != -1) {
|
||||
Log.e(tag, "Tunnel already up")
|
||||
// Turn the tunnel down because this might be a switch
|
||||
wgTurnOff(currentTunnelHandle)
|
||||
|
||||
|
||||
private fun ovpnTurnOff() {
|
||||
mOpenVPNThreadv3?.stop()
|
||||
mOpenVPNThreadv3 = null
|
||||
Log.e(tag, "mOpenVPNThreadv3 stop!")
|
||||
}
|
||||
val wgConfig: String = wireguard_conf!!.toWgUserspaceString()
|
||||
val builder = Builder()
|
||||
setupBuilder(wireguard_conf, builder)
|
||||
builder.setSession("mvpn0")
|
||||
builder.establish().use { tun ->
|
||||
if (tun == null)return
|
||||
Log.i(tag, "Go backend " + wgVersion())
|
||||
currentTunnelHandle = wgTurnOn("mvpn0", tun.detachFd(), wgConfig)
|
||||
}
|
||||
if (currentTunnelHandle < 0) {
|
||||
Log.e(tag, "Activation Error Code -> $currentTunnelHandle")
|
||||
isUp = false
|
||||
return
|
||||
}
|
||||
protect(wgGetSocketV4(currentTunnelHandle))
|
||||
protect(wgGetSocketV6(currentTunnelHandle))
|
||||
mConfig = json
|
||||
isUp = true
|
||||
|
||||
// Store the config in case the service gets
|
||||
// asked boot vpn from the OS
|
||||
val prefs = Prefs.get(this)
|
||||
prefs.edit()
|
||||
.putString("lastConf", json.toString())
|
||||
.apply()
|
||||
|
||||
NotificationUtil.show(this) // Go foreground
|
||||
}
|
||||
|
||||
fun turnOff() {
|
||||
Log.v(tag, "Try to disable tunnel")
|
||||
wgTurnOff(currentTunnelHandle)
|
||||
currentTunnelHandle = -1
|
||||
stopForeground(false)
|
||||
isUp = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures an Android VPN Service Tunnel
|
||||
* with a given Wireguard Config
|
||||
*/
|
||||
private fun setupBuilder(config: Config, builder: Builder) {
|
||||
// Setup Split tunnel
|
||||
for (excludedApplication in config.`interface`.excludedApplications)
|
||||
/**
|
||||
* Configures an Android VPN Service Tunnel
|
||||
* with a given Wireguard Config
|
||||
*/
|
||||
private fun setupBuilder(config: Config, builder: Builder) {
|
||||
// Setup Split tunnel
|
||||
for (excludedApplication in config.`interface`.excludedApplications)
|
||||
builder.addDisallowedApplication(excludedApplication)
|
||||
|
||||
// Device IP
|
||||
for (addr in config.`interface`.addresses) builder.addAddress(addr.address, addr.mask)
|
||||
// DNS
|
||||
for (addr in config.`interface`.dnsServers) builder.addDnsServer(addr.hostAddress)
|
||||
// Add All routes the VPN may route tos
|
||||
for (peer in config.peers) {
|
||||
for (addr in peer.allowedIps) {
|
||||
builder.addRoute(addr.address, addr.mask)
|
||||
// Device IP
|
||||
for (addr in config.`interface`.addresses) builder.addAddress(addr.address, addr.mask)
|
||||
// DNS
|
||||
for (addr in config.`interface`.dnsServers) builder.addDnsServer(addr.hostAddress)
|
||||
// Add All routes the VPN may route tos
|
||||
for (peer in config.peers) {
|
||||
for (addr in peer.allowedIps) {
|
||||
builder.addRoute(addr.address, addr.mask)
|
||||
}
|
||||
}
|
||||
builder.allowFamily(OsConstants.AF_INET)
|
||||
builder.allowFamily(OsConstants.AF_INET6)
|
||||
builder.setMtu(config.`interface`.mtu.orElse(1280))
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) builder.setMetered(false)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) setUnderlyingNetworks(null)
|
||||
|
||||
builder.setBlocking(true)
|
||||
}
|
||||
builder.allowFamily(OsConstants.AF_INET)
|
||||
builder.allowFamily(OsConstants.AF_INET6)
|
||||
builder.setMtu(config.`interface`.mtu.orElse(1280))
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) builder.setMetered(false)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) setUnderlyingNetworks(null)
|
||||
|
||||
builder.setBlocking(true)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets config value for {key} from the Current
|
||||
* running Wireguard tunnel
|
||||
*/
|
||||
private fun getConfigValue(key: String): String? {
|
||||
if (!isUp) {
|
||||
/**
|
||||
* Gets config value for {key} from the Current
|
||||
* running Wireguard tunnel
|
||||
*/
|
||||
private fun getConfigValue(key: String): String? {
|
||||
if (!isUp) {
|
||||
return null
|
||||
}
|
||||
val config = wgGetConfig(currentTunnelHandle) ?: return null
|
||||
val lines = config.split("\n")
|
||||
for (line in lines) {
|
||||
val parts = line.split("=")
|
||||
val k = parts.first()
|
||||
val value = parts.last()
|
||||
if (key == k) {
|
||||
return value
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
val config = wgGetConfig(currentTunnelHandle) ?: return null
|
||||
val lines = config.split("\n")
|
||||
for (line in lines) {
|
||||
val parts = line.split("=")
|
||||
val k = parts.first()
|
||||
val value = parts.last()
|
||||
if (key == k) {
|
||||
return value
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Wireguard [Config] from a [json] string -
|
||||
* The [json] will be created in AndroidController.cpp
|
||||
*/
|
||||
private fun buildWireugardConfig(obj: JSONObject): Config {
|
||||
val confBuilder = Config.Builder()
|
||||
val jServer = obj.getJSONObject("server")
|
||||
val peerBuilder = Peer.Builder()
|
||||
val ep =
|
||||
/**
|
||||
* Create a Wireguard [Config] from a [json] string -
|
||||
* The [json] will be created in AndroidVpnProtocol.cpp
|
||||
*/
|
||||
private fun buildWireugardConfig(obj: JSONObject): Config {
|
||||
val confBuilder = Config.Builder()
|
||||
val jServer = obj.getJSONObject("server")
|
||||
val peerBuilder = Peer.Builder()
|
||||
val ep =
|
||||
InetEndpoint.parse(jServer.getString("ipv4AddrIn") + ":" + jServer.getString("port"))
|
||||
peerBuilder.setEndpoint(ep)
|
||||
peerBuilder.setPublicKey(Key.fromBase64(jServer.getString("publicKey")))
|
||||
peerBuilder.setEndpoint(ep)
|
||||
peerBuilder.setPublicKey(Key.fromBase64(jServer.getString("publicKey")))
|
||||
|
||||
val jAllowedIPList = obj.getJSONArray("allowedIPs")
|
||||
if (jAllowedIPList.length() == 0) {
|
||||
val internet = InetNetwork.parse("0.0.0.0/0") // aka The whole internet.
|
||||
peerBuilder.addAllowedIp(internet)
|
||||
} else {
|
||||
(0 until jAllowedIPList.length()).toList().forEach {
|
||||
val network = InetNetwork.parse(jAllowedIPList.getString(it))
|
||||
peerBuilder.addAllowedIp(network)
|
||||
}
|
||||
}
|
||||
|
||||
confBuilder.addPeer(peerBuilder.build())
|
||||
|
||||
val privateKey = obj.getJSONObject("keys").getString("privateKey")
|
||||
val jDevice = obj.getJSONObject("device")
|
||||
|
||||
val ifaceBuilder = Interface.Builder()
|
||||
ifaceBuilder.parsePrivateKey(privateKey)
|
||||
ifaceBuilder.addAddress(InetNetwork.parse(jDevice.getString("ipv4Address")))
|
||||
ifaceBuilder.addAddress(InetNetwork.parse(jDevice.getString("ipv6Address")))
|
||||
ifaceBuilder.addDnsServer(InetNetwork.parse(obj.getString("dns")).address)
|
||||
val jExcludedApplication = obj.getJSONArray("excludedApps")
|
||||
(0 until jExcludedApplication.length()).toList().forEach {
|
||||
val appName = jExcludedApplication.get(it).toString()
|
||||
ifaceBuilder.excludeApplication(appName)
|
||||
}
|
||||
confBuilder.setInterface(ifaceBuilder.build())
|
||||
return confBuilder.build()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun startService(c: Context) {
|
||||
c.applicationContext.startService(
|
||||
Intent(c.applicationContext, VPNService::class.java).apply {
|
||||
putExtra("startOnly", true)
|
||||
val jAllowedIPList = obj.getJSONArray("allowedIPs")
|
||||
if (jAllowedIPList.length() == 0) {
|
||||
val internet = InetNetwork.parse("0.0.0.0/0") // aka The whole internet.
|
||||
peerBuilder.addAllowedIp(internet)
|
||||
} else {
|
||||
(0 until jAllowedIPList.length()).toList().forEach {
|
||||
val network = InetNetwork.parse(jAllowedIPList.getString(it))
|
||||
peerBuilder.addAllowedIp(network)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
private external fun wgGetConfig(handle: Int): String?
|
||||
@JvmStatic
|
||||
private external fun wgGetSocketV4(handle: Int): Int
|
||||
@JvmStatic
|
||||
private external fun wgGetSocketV6(handle: Int): Int
|
||||
@JvmStatic
|
||||
private external fun wgTurnOff(handle: Int)
|
||||
@JvmStatic
|
||||
private external fun wgTurnOn(ifName: String, tunFd: Int, settings: String): Int
|
||||
@JvmStatic
|
||||
private external fun wgVersion(): String?
|
||||
}
|
||||
}
|
||||
confBuilder.addPeer(peerBuilder.build())
|
||||
|
||||
val privateKey = obj.getJSONObject("keys").getString("privateKey")
|
||||
val jDevice = obj.getJSONObject("device")
|
||||
|
||||
val ifaceBuilder = Interface.Builder()
|
||||
ifaceBuilder.parsePrivateKey(privateKey)
|
||||
ifaceBuilder.addAddress(InetNetwork.parse(jDevice.getString("ipv4Address")))
|
||||
ifaceBuilder.addAddress(InetNetwork.parse(jDevice.getString("ipv6Address")))
|
||||
ifaceBuilder.addDnsServer(InetNetwork.parse(obj.getString("dns")).address)
|
||||
val jExcludedApplication = obj.getJSONArray("excludedApps")
|
||||
(0 until jExcludedApplication.length()).toList().forEach {
|
||||
val appName = jExcludedApplication.get(it).toString()
|
||||
ifaceBuilder.excludeApplication(appName)
|
||||
}
|
||||
confBuilder.setInterface(ifaceBuilder.build())
|
||||
return confBuilder.build()
|
||||
}
|
||||
|
||||
fun getVpnConfig(): JSONObject {
|
||||
return mConfig!!
|
||||
}
|
||||
|
||||
private fun startOpenVpn() {
|
||||
mOpenVPNThreadv3 = OpenVPNThreadv3 (this)
|
||||
Thread ({
|
||||
mOpenVPNThreadv3?.run()
|
||||
}).start()
|
||||
}
|
||||
|
||||
private fun startWireGuard(){
|
||||
val wireguard_conf = buildWireugardConfig(mConfig!!)
|
||||
if (currentTunnelHandle != -1) {
|
||||
Log.e(tag, "Tunnel already up")
|
||||
// Turn the tunnel down because this might be a switch
|
||||
wgTurnOff(currentTunnelHandle)
|
||||
}
|
||||
val wgConfig: String = wireguard_conf!!.toWgUserspaceString()
|
||||
val builder = Builder()
|
||||
setupBuilder(wireguard_conf, builder)
|
||||
builder.setSession("mvpn0")
|
||||
builder.establish().use { tun ->
|
||||
if (tun == null)return
|
||||
Log.i(tag, "Go backend " + wgVersion())
|
||||
currentTunnelHandle = wgTurnOn("mvpn0", tun.detachFd(), wgConfig)
|
||||
}
|
||||
if (currentTunnelHandle < 0) {
|
||||
Log.e(tag, "Activation Error Code -> $currentTunnelHandle")
|
||||
isUp = false
|
||||
return
|
||||
}
|
||||
protect(wgGetSocketV4(currentTunnelHandle))
|
||||
protect(wgGetSocketV6(currentTunnelHandle))
|
||||
isUp = true
|
||||
|
||||
// Store the config in case the service gets
|
||||
// asked boot vpn from the OS
|
||||
val prefs = Prefs.get(this)
|
||||
prefs.edit()
|
||||
.putString("lastConf", mConfig.toString())
|
||||
.apply()
|
||||
|
||||
NotificationUtil.show(this) // Go foreground
|
||||
}
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun startService(c: Context) {
|
||||
c.applicationContext.startService(
|
||||
Intent(c.applicationContext, VPNService::class.java).apply {
|
||||
putExtra("startOnly", true)
|
||||
})
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
private external fun wgGetConfig(handle: Int): String?
|
||||
@JvmStatic
|
||||
private external fun wgGetSocketV4(handle: Int): Int
|
||||
@JvmStatic
|
||||
private external fun wgGetSocketV6(handle: Int): Int
|
||||
@JvmStatic
|
||||
private external fun wgTurnOff(handle: Int)
|
||||
@JvmStatic
|
||||
private external fun wgTurnOn(ifName: String, tunFd: Int, settings: String): Int
|
||||
@JvmStatic
|
||||
private external fun wgVersion(): String?
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.amnezia.vpn
|
||||
import android.os.Binder
|
||||
|
@ -19,8 +19,8 @@ class VPNServiceBinder(service: VPNService) : Binder() {
|
|||
private var mResumeConfig: JSONObject? = null
|
||||
|
||||
/**
|
||||
* The codes this Binder does accept in [onTransact]
|
||||
*/
|
||||
* The codes this Binder does accept in [onTransact]
|
||||
*/
|
||||
object ACTIONS {
|
||||
const val activate = 1
|
||||
const val deactivate = 2
|
||||
|
@ -34,22 +34,22 @@ class VPNServiceBinder(service: VPNService) : Binder() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets called when the VPNServiceBinder gets a request from a Client.
|
||||
* The [code] determines what action is requested. - see [ACTIONS]
|
||||
* [data] may contain a utf-8 encoded json string with optional args or is null.
|
||||
* [reply] is a pointer to a buffer in the clients memory, to reply results.
|
||||
* we use this to send result data.
|
||||
*
|
||||
* returns true if the [code] was accepted
|
||||
*/
|
||||
* Gets called when the VPNServiceBinder gets a request from a Client.
|
||||
* The [code] determines what action is requested. - see [ACTIONS]
|
||||
* [data] may contain a utf-8 encoded json string with optional args or is null.
|
||||
* [reply] is a pointer to a buffer in the clients memory, to reply results.
|
||||
* we use this to send result data.
|
||||
*
|
||||
* returns true if the [code] was accepted
|
||||
*/
|
||||
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean {
|
||||
Log.i(tag, "GOT TRANSACTION $code")
|
||||
Log.i(tag, "GOT TRANSACTION " + code)
|
||||
|
||||
when (code) {
|
||||
ACTIONS.activate -> {
|
||||
try {
|
||||
Log.i(tag, "Activiation Requested, parsing Config")
|
||||
// [data] is here a json containing the wireguard conf
|
||||
// [data] is here a json containing the wireguard/openvpn conf
|
||||
val buffer = data.createByteArray()
|
||||
val json = buffer?.let { String(it) }
|
||||
val config = JSONObject(json)
|
||||
|
@ -58,7 +58,7 @@ class VPNServiceBinder(service: VPNService) : Binder() {
|
|||
if (!mService.checkPermissions()) {
|
||||
mResumeConfig = config
|
||||
// The Permission prompt was already
|
||||
// send, in case it's accepted we will
|
||||
// send, in case it's accepted we will
|
||||
// receive ACTIONS.resumeActivate
|
||||
return true
|
||||
}
|
||||
|
@ -70,101 +70,101 @@ class VPNServiceBinder(service: VPNService) : Binder() {
|
|||
return true
|
||||
}
|
||||
|
||||
ACTIONS.resumeActivate -> {
|
||||
ACTIONS.resumeActivate -> {
|
||||
// [data] is empty
|
||||
// Activate the current tunnel
|
||||
try {
|
||||
mResumeConfig?.let { this.mService.turnOn(it) }
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "An Error occurred while enabling the VPN: ${e.localizedMessage}")
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "An Error occurred while enabling the VPN: ${e.localizedMessage}")
|
||||
}
|
||||
return true
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
ACTIONS.deactivate -> {
|
||||
// [data] here is empty
|
||||
this.mService.turnOff()
|
||||
return true
|
||||
}
|
||||
ACTIONS.deactivate -> {
|
||||
// [data] here is empty
|
||||
this.mService.turnOff()
|
||||
return true
|
||||
}
|
||||
|
||||
ACTIONS.registerEventListener -> {
|
||||
// [data] contains the Binder that we need to dispatch the Events
|
||||
val binder = data.readStrongBinder()
|
||||
mListener = binder
|
||||
val obj = JSONObject()
|
||||
obj.put("connected", mService.isUp)
|
||||
obj.put("time", mService.connectionTime)
|
||||
dispatchEvent(EVENTS.init, obj.toString())
|
||||
return true
|
||||
}
|
||||
ACTIONS.registerEventListener -> {
|
||||
// [data] contains the Binder that we need to dispatch the Events
|
||||
val binder = data.readStrongBinder()
|
||||
mListener = binder
|
||||
val obj = JSONObject()
|
||||
obj.put("connected", mService.isUp)
|
||||
obj.put("time", mService.connectionTime)
|
||||
dispatchEvent(EVENTS.init, obj.toString())
|
||||
return true
|
||||
}
|
||||
|
||||
ACTIONS.requestStatistic -> {
|
||||
dispatchEvent(EVENTS.statisticUpdate, mService.status.toString())
|
||||
return true
|
||||
}
|
||||
ACTIONS.requestStatistic -> {
|
||||
dispatchEvent(EVENTS.statisticUpdate, mService.status.toString())
|
||||
return true
|
||||
}
|
||||
|
||||
ACTIONS.requestGetLog -> {
|
||||
// Grabs all the Logs and dispatch new Log Event
|
||||
dispatchEvent(EVENTS.backendLogs, Log.getContent())
|
||||
return true
|
||||
}
|
||||
ACTIONS.requestCleanupLog -> {
|
||||
Log.clearFile()
|
||||
return true
|
||||
}
|
||||
ACTIONS.setNotificationText -> {
|
||||
NotificationUtil.update(data)
|
||||
return true
|
||||
}
|
||||
ACTIONS.setFallBackNotification -> {
|
||||
NotificationUtil.saveFallBackMessage(data, mService)
|
||||
return true
|
||||
}
|
||||
IBinder.LAST_CALL_TRANSACTION -> {
|
||||
Log.e(tag, "The OS Requested to shut down the VPN")
|
||||
this.mService.turnOff()
|
||||
return true
|
||||
}
|
||||
ACTIONS.requestGetLog -> {
|
||||
// Grabs all the Logs and dispatch new Log Event
|
||||
dispatchEvent(EVENTS.backendLogs, Log.getContent())
|
||||
return true
|
||||
}
|
||||
ACTIONS.requestCleanupLog -> {
|
||||
Log.clearFile()
|
||||
return true
|
||||
}
|
||||
ACTIONS.setNotificationText -> {
|
||||
NotificationUtil.update(data)
|
||||
return true
|
||||
}
|
||||
ACTIONS.setFallBackNotification -> {
|
||||
NotificationUtil.saveFallBackMessage(data, mService)
|
||||
return true
|
||||
}
|
||||
IBinder.LAST_CALL_TRANSACTION -> {
|
||||
Log.e(tag, "The OS Requested to shut down the VPN")
|
||||
this.mService.turnOff()
|
||||
return true
|
||||
}
|
||||
|
||||
else -> {
|
||||
Log.e(tag, "Received invalid bind request \t Code -> $code")
|
||||
// If we're hitting this there is probably something wrong in the client.
|
||||
return false
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatches an Event to all registered Binders
|
||||
* [code] the Event that happened - see [EVENTS]
|
||||
* To register an Eventhandler use [onTransact] with
|
||||
* [ACTIONS.registerEventListener]
|
||||
*/
|
||||
fun dispatchEvent(code: Int, payload: String?) {
|
||||
try {
|
||||
mListener?.let {
|
||||
if (it.isBinderAlive) {
|
||||
val data = Parcel.obtain()
|
||||
data.writeByteArray(payload?.toByteArray(charset("UTF-8")))
|
||||
it.transact(code, data, Parcel.obtain(), 0)
|
||||
else -> {
|
||||
Log.e(tag, "Received invalid bind request \t Code -> $code")
|
||||
// If we're hitting this there is probably something wrong in the client.
|
||||
return false
|
||||
}
|
||||
}
|
||||
} catch (e: DeadObjectException) {
|
||||
// If the QT Process is killed (not just inactive)
|
||||
// we cant access isBinderAlive, so nothing to do here.
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The codes we Are Using in case of [dispatchEvent]
|
||||
*/
|
||||
object EVENTS {
|
||||
const val init = 0
|
||||
const val connected = 1
|
||||
const val disconnected = 2
|
||||
const val statisticUpdate = 3
|
||||
const val backendLogs = 4
|
||||
const val activationError = 5
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Dispatches an Event to all registered Binders
|
||||
* [code] the Event that happened - see [EVENTS]
|
||||
* To register an Eventhandler use [onTransact] with
|
||||
* [ACTIONS.registerEventListener]
|
||||
*/
|
||||
fun dispatchEvent(code: Int, payload: String?) {
|
||||
try {
|
||||
mListener?.let {
|
||||
if (it.isBinderAlive) {
|
||||
val data = Parcel.obtain()
|
||||
data.writeByteArray(payload?.toByteArray(charset("UTF-8")))
|
||||
it.transact(code, data, Parcel.obtain(), 0)
|
||||
}
|
||||
}
|
||||
} catch (e: DeadObjectException) {
|
||||
// If the QT Process is killed (not just inactive)
|
||||
// we cant access isBinderAlive, so nothing to do here.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The codes we Are Using in case of [dispatchEvent]
|
||||
*/
|
||||
object EVENTS {
|
||||
const val init = 0
|
||||
const val connected = 1
|
||||
const val disconnected = 2
|
||||
const val statisticUpdate = 3
|
||||
const val backendLogs = 4
|
||||
const val activationError = 5
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,13 +6,17 @@ package org.amnezia.vpn.qt
|
|||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
|
||||
class VPNPermissionHelper : android.net.VpnService() {
|
||||
|
||||
private val tag = "VPNPermissionHelper"
|
||||
/**
|
||||
* This small service does nothing else then checking if the vpn permission
|
||||
* is present and prompting if not.
|
||||
*/
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
Log.i(tag, "onStartCommand")
|
||||
val intent = prepare(this.applicationContext)
|
||||
if (intent != null) {
|
||||
startActivityForResult(intent)
|
||||
|
|
|
@ -133,13 +133,6 @@ RESOURCES += \
|
|||
TRANSLATIONS = \
|
||||
translations/amneziavpn_ru.ts
|
||||
|
||||
#CONFIG(release, debug|release) {
|
||||
# DESTDIR = $$PWD/../../AmneziaVPN-build/client/release
|
||||
# MOC_DIR = $$DESTDIR
|
||||
# OBJECTS_DIR = $$DESTDIR
|
||||
# RCC_DIR = $$DESTDIR
|
||||
#}
|
||||
|
||||
win32 {
|
||||
OTHER_FILES += platform_win/vpnclient.rc
|
||||
RC_FILE = platform_win/vpnclient.rc
|
||||
|
@ -167,11 +160,11 @@ win32 {
|
|||
|
||||
!contains(QMAKE_TARGET.arch, x86_64) {
|
||||
message("Windows x86 build")
|
||||
LIBS += -L$$PWD/3rd/OpenSSL/lib/windows/x86/ -llibssl -llibcrypto -lopenssl
|
||||
LIBS += -L$$PWD/3rd/OpenSSL/lib/windows/x86/ -llibssl -llibcrypto
|
||||
}
|
||||
else {
|
||||
message("Windows x86_64 build")
|
||||
LIBS += -L$$PWD/3rd/OpenSSL/lib/windows/x86_64/ -llibssl -llibcrypto -lopenssl
|
||||
LIBS += -L$$PWD/3rd/OpenSSL/lib/windows/x86_64/ -llibssl -llibcrypto
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,10 +192,8 @@ android {
|
|||
|
||||
HEADERS += protocols/android_vpnprotocol.h \
|
||||
|
||||
|
||||
SOURCES += protocols/android_vpnprotocol.cpp \
|
||||
|
||||
|
||||
DISTFILES += \
|
||||
android/AndroidManifest.xml \
|
||||
android/build.gradle \
|
||||
|
@ -210,17 +201,30 @@ android {
|
|||
android/gradle/wrapper/gradle-wrapper.properties \
|
||||
android/gradlew \
|
||||
android/gradlew.bat \
|
||||
android/res/values/libs.xml
|
||||
android/res/values/libs.xml \
|
||||
android/src/org/amnezia/vpn/OpenVPNThreadv3.kt \
|
||||
android/src/org/amnezia/vpn/VpnService.kt \
|
||||
android/src/org/amnezia/vpn/VpnServiceBinder.kt \
|
||||
android/src/org/amnezia/vpn/qt/VPNPermissionHelper.kt
|
||||
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
|
||||
for (abi, ANDROID_ABIS): {
|
||||
#message("Android build for ANDROID_TARGET_ARCH" $$abi)
|
||||
equals(ANDROID_TARGET_ARCH,$$abi) {
|
||||
LIBS += $$PWD/3rd/OpenSSL/lib/android/$${abi}/libcrypto.a
|
||||
LIBS += $$PWD/3rd/OpenSSL/lib/android/$${abi}/libssl.a
|
||||
}
|
||||
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/wireguard/$${abi}/libwg.so
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/wireguard/$${abi}/libwg-go.so
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/wireguard/$${abi}/libwg-quick.so
|
||||
}
|
||||
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/openvpn/$${abi}/libjbcrypto.so
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/openvpn/$${abi}/libopenvpn.so
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/openvpn/$${abi}/libopvpnutil.so
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/openvpn/$${abi}/libovpn3.so
|
||||
ANDROID_EXTRA_LIBS += $$PWD/android/lib/openvpn/$${abi}/libovpnexec.so
|
||||
}
|
||||
}
|
||||
|
||||
ios {
|
||||
|
@ -271,5 +275,3 @@ ios {
|
|||
|
||||
REPC_REPLICA += ../ipc/ipc_interface.rep
|
||||
!ios: REPC_REPLICA += ../ipc/ipc_process_interface.rep
|
||||
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ int main(int argc, char *argv[])
|
|||
qRegisterMetaType<Protocol>("Protocol");
|
||||
qRegisterMetaType<ServiceType>("ServiceType");
|
||||
qRegisterMetaType<Page>("Page");
|
||||
qRegisterMetaType<VpnProtocol::ConnectionState>("ConnectionState");
|
||||
|
||||
qRegisterMetaType<PageProtocolLogicBase *>("PageProtocolLogicBase *");
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ AndroidVpnProtocol* AndroidVpnProtocol::instance() {
|
|||
return s_instance;
|
||||
}
|
||||
|
||||
void AndroidVpnProtocol::initialize()
|
||||
bool AndroidVpnProtocol::initialize()
|
||||
{
|
||||
qDebug() << "Initializing";
|
||||
|
||||
|
@ -81,9 +81,12 @@ void AndroidVpnProtocol::initialize()
|
|||
"(Landroid/content/Context;)V", appContext.object());
|
||||
|
||||
// Start the VPN Service (if not yet) and Bind to it
|
||||
QtAndroid::bindService(
|
||||
const bool bindResult = QtAndroid::bindService(
|
||||
QAndroidIntent(appContext.object(), "org.amnezia.vpn.VPNService"),
|
||||
*this, QtAndroid::BindFlag::AutoCreate);
|
||||
qDebug() << "Binding to the service..." << bindResult;
|
||||
|
||||
return bindResult;
|
||||
}
|
||||
|
||||
ErrorCode AndroidVpnProtocol::start()
|
||||
|
@ -91,45 +94,49 @@ ErrorCode AndroidVpnProtocol::start()
|
|||
|
||||
qDebug() << "Prompting for VPN permission";
|
||||
auto appContext = QtAndroid::androidActivity().callObjectMethod(
|
||||
"getApplicationContext", "()Landroid/content/Context;");
|
||||
"getApplicationContext", "()Landroid/content/Context;");
|
||||
QAndroidJniObject::callStaticMethod<void>(
|
||||
PERMISSIONHELPER_CLASS, "startService", "(Landroid/content/Context;)V",
|
||||
appContext.object());
|
||||
PERMISSIONHELPER_CLASS, "startService", "(Landroid/content/Context;)V",
|
||||
appContext.object());
|
||||
|
||||
|
||||
// QJsonObject jServer;
|
||||
// jServer["ipv4AddrIn"] = server.ipv4AddrIn();
|
||||
// jServer["ipv4Gateway"] = server.ipv4Gateway();
|
||||
// jServer["ipv6AddrIn"] = server.ipv6AddrIn();
|
||||
// jServer["ipv6Gateway"] = server.ipv6Gateway();
|
||||
// jServer["publicKey"] = server.publicKey();
|
||||
// jServer["port"] = (int)server.choosePort();
|
||||
// QJsonObject jServer;
|
||||
// jServer["ipv4AddrIn"] = server.ipv4AddrIn();
|
||||
// jServer["ipv4Gateway"] = server.ipv4Gateway();
|
||||
// jServer["ipv6AddrIn"] = server.ipv6AddrIn();
|
||||
// jServer["ipv6Gateway"] = server.ipv6Gateway();
|
||||
// jServer["publicKey"] = server.publicKey();
|
||||
// jServer["port"] = (int)server.choosePort();
|
||||
|
||||
// QJsonArray allowedIPs;
|
||||
// foreach (auto item, allowedIPAddressRanges) {
|
||||
// QJsonValue val;
|
||||
// val = item.toString();
|
||||
// allowedIPs.append(val);
|
||||
// }
|
||||
// QJsonArray allowedIPs;
|
||||
// foreach (auto item, allowedIPAddressRanges) {
|
||||
// QJsonValue val;
|
||||
// val = item.toString();
|
||||
// allowedIPs.append(val);
|
||||
// }
|
||||
|
||||
// QJsonArray excludedApps;
|
||||
// foreach (auto appID, vpnDisabledApps) {
|
||||
// excludedApps.append(QJsonValue(appID));
|
||||
// }
|
||||
// QJsonArray excludedApps;
|
||||
// foreach (auto appID, vpnDisabledApps) {
|
||||
// excludedApps.append(QJsonValue(appID));
|
||||
// }
|
||||
|
||||
// QJsonObject args;
|
||||
// args["device"] = jDevice;
|
||||
// args["keys"] = jKeys;
|
||||
// args["server"] = jServer;
|
||||
// args["reason"] = (int)reason;
|
||||
// args["allowedIPs"] = allowedIPs;
|
||||
// args["excludedApps"] = excludedApps;
|
||||
// args["dns"] = dns.toString();
|
||||
// QJsonObject args;
|
||||
// args["device"] = jDevice;
|
||||
// args["keys"] = jKeys;
|
||||
// args["server"] = jServer;
|
||||
// args["reason"] = (int)reason;
|
||||
// args["allowedIPs"] = allowedIPs;
|
||||
// args["excludedApps"] = excludedApps;
|
||||
// args["dns"] = dns.toString();
|
||||
|
||||
QAndroidParcel sendData;
|
||||
sendData.writeData(QJsonDocument(m_rawConfig).toJson());
|
||||
m_serviceBinder.transact(ACTION_ACTIVATE, sendData, nullptr);
|
||||
return NoError;
|
||||
bool activateResult = false;
|
||||
while (!activateResult){
|
||||
activateResult = m_serviceBinder.transact(ACTION_ACTIVATE, sendData, nullptr);
|
||||
}
|
||||
|
||||
return activateResult ? NoError : UnknownError;
|
||||
}
|
||||
|
||||
// Activates the tunnel that is currently set
|
||||
|
@ -212,7 +219,7 @@ void AndroidVpnProtocol::cleanupBackendLogs() {
|
|||
|
||||
void AndroidVpnProtocol::onServiceConnected(
|
||||
const QString& name, const QAndroidBinder& serviceBinder) {
|
||||
qDebug() << "Server connected";
|
||||
qDebug() << "Server " + name + " connected";
|
||||
|
||||
Q_UNUSED(name);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
virtual ~AndroidVpnProtocol() override = default;
|
||||
|
||||
void initialize();
|
||||
bool initialize();
|
||||
|
||||
virtual ErrorCode start() override;
|
||||
virtual void stop() override;
|
||||
|
|
|
@ -251,12 +251,15 @@ ErrorCode VpnConnection::connectToVpn(int serverIndex,
|
|||
|
||||
|
||||
#else
|
||||
Protocol proto = ContainerProps::defaultProtocol(container);
|
||||
AndroidVpnProtocol *androidVpnProtocol = new AndroidVpnProtocol(proto, m_vpnConfiguration);
|
||||
androidVpnProtocol->initialize();
|
||||
if (!androidVpnProtocol->initialize()) {
|
||||
qDebug() << QString("Init failed") ;
|
||||
return UnknownError;
|
||||
}
|
||||
m_vpnProtocol.reset(androidVpnProtocol);
|
||||
#endif
|
||||
|
||||
|
||||
connect(m_vpnProtocol.data(), &VpnProtocol::protocolError, this, &VpnConnection::vpnProtocolError);
|
||||
connect(m_vpnProtocol.data(), SIGNAL(connectionStateChanged(VpnProtocol::ConnectionState)), this, SLOT(onConnectionStateChanged(VpnProtocol::ConnectionState)));
|
||||
connect(m_vpnProtocol.data(), SIGNAL(bytesChanged(quint64, quint64)), this, SLOT(onBytesChanged(quint64, quint64)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue