summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/blinkt
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-07-31 04:07:47 +0200
committercyBerta <cyberta@riseup.net>2022-07-31 04:07:47 +0200
commit87446cbc0c818a374c057894b57e93156443a270 (patch)
treec2fa479d2b85df5eb624c75b71a89dac2973b8a3 /app/src/main/java/de/blinkt
parent7692e1db1021460ec777928bdf418432cac9e7cb (diff)
implement obfuscation pinning
Diffstat (limited to 'app/src/main/java/de/blinkt')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 10dd7033..6063ea53 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -5,10 +5,13 @@
package de.blinkt.openvpn.core;
+import static de.blinkt.openvpn.core.connection.Connection.TransportType.PT;
+
import android.os.Build;
-import androidx.core.util.Pair;
import android.text.TextUtils;
+import androidx.core.util.Pair;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;
@@ -27,8 +30,6 @@ import de.blinkt.openvpn.core.connection.Obfs4Connection;
import de.blinkt.openvpn.core.connection.OpenvpnConnection;
import se.leap.bitmaskclient.pluggableTransports.Obfs4Options;
-import static de.blinkt.openvpn.core.connection.Connection.TransportType.OBFS4;
-
//! Openvpn Config FIle Parser, probably not 100% accurate but close enough
// And remember, this is valid :)
@@ -807,7 +808,7 @@ public class ConfigParser {
return null;
}
else
- conn = transportType == OBFS4 ? new Obfs4Connection(obfs4Options) : new OpenvpnConnection();
+ conn = transportType.getMetaType() == PT ? new Obfs4Connection(obfs4Options) : new OpenvpnConnection();
Vector<String> port = getOption("port", 1, 1);
if (port != null) {