Skip to content

Commit

Permalink
add Java wrapper function for setTrojanInterval()
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
  • Loading branch information
dlenski committed Mar 30, 2020
1 parent ddf0b58 commit 2792174
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions java/src/org/infradead/libopenconnect/LibOpenConnect.java
Expand Up @@ -127,6 +127,7 @@ public boolean isCanceled() {
public synchronized native int passphraseFromFSID();
public synchronized native void setCertExpiryWarning(int seconds);
public synchronized native void setDPD(int minSeconds);
public synchronized native void setTrojanInterval(int seconds);
public synchronized native int setProxyAuth(String methods);
public synchronized native int setHTTPProxy(String proxy);
public synchronized native void setXMLSHA1(String hash);
Expand Down
10 changes: 10 additions & 0 deletions jni.c
Expand Up @@ -1041,6 +1041,16 @@ JNIEXPORT void JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_setDPD(
openconnect_set_dpd(ctx->vpninfo, arg);
}

JNIEXPORT void JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_setTrojanInterval(
JNIEnv *jenv, jobject jobj, jint arg)
{
struct libctx *ctx = getctx(jenv, jobj);

if (!ctx)
return;
openconnect_set_trojan_interval(ctx->vpninfo, arg);
}

JNIEXPORT void JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_setPFS(
JNIEnv *jenv, jobject jobj, jboolean arg)
{
Expand Down

0 comments on commit 2792174

Please sign in to comment.