summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-11-21 15:49:52 +0100
committercyberta <cyberta@riseup.net>2022-11-21 15:49:52 +0100
commit93fe05806856897749846203f832867327d14352 (patch)
tree090a7d1a6c31df23d1305292e30c1e7f7f378c80 /app/src/main/java/se/leap
parent5b9505dbb37d110b8c528671bbfc67f7944d2e43 (diff)
fix bitmaskcore builds on macOS, rename Shapeshifter to ShapeshifterClient as part of this gombile JNI generation fix
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java5
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ShapeshifterClient.java (renamed from app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Shapeshifter.java)13
2 files changed, 8 insertions, 10 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
index f60d89ce..72a0d80a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
@@ -33,8 +33,8 @@ import static se.leap.bitmaskclient.base.models.Constants.TRANSPORT;
import static se.leap.bitmaskclient.base.models.Constants.TYPE;
import static se.leap.bitmaskclient.base.models.Constants.UDP;
import static se.leap.bitmaskclient.base.utils.ConfigHelper.ObfsVpnHelper.useObfsVpn;
-import static se.leap.bitmaskclient.pluggableTransports.Shapeshifter.DISPATCHER_IP;
-import static se.leap.bitmaskclient.pluggableTransports.Shapeshifter.DISPATCHER_PORT;
+import static se.leap.bitmaskclient.pluggableTransports.ShapeshifterClient.DISPATCHER_IP;
+import static se.leap.bitmaskclient.pluggableTransports.ShapeshifterClient.DISPATCHER_PORT;
import androidx.annotation.VisibleForTesting;
@@ -55,7 +55,6 @@ import de.blinkt.openvpn.core.VpnStatus;
import de.blinkt.openvpn.core.connection.Connection;
import de.blinkt.openvpn.core.connection.Connection.TransportType;
import se.leap.bitmaskclient.base.models.Provider;
-import se.leap.bitmaskclient.base.models.Transport;
import se.leap.bitmaskclient.base.utils.ConfigHelper;
import se.leap.bitmaskclient.pluggableTransports.Obfs4Options;
diff --git a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Shapeshifter.java b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ShapeshifterClient.java
index 9bd61859..f1eb0f1b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Shapeshifter.java
+++ b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/ShapeshifterClient.java
@@ -27,17 +27,16 @@ import java.util.Observer;
import de.blinkt.openvpn.core.ConnectionStatus;
import de.blinkt.openvpn.core.VpnStatus;
import se.leap.bitmaskclient.eip.EipStatus;
-import shapeshifter.ShapeShifter;
-public class Shapeshifter implements Observer {
+public class ShapeshifterClient implements Observer {
public static final String DISPATCHER_PORT = "4430";
public static final String DISPATCHER_IP = "127.0.0.1";
private static final int MAX_RETRY = 5;
private static final int RETRY_TIME = 4000;
- private static final String TAG = Shapeshifter.class.getSimpleName();
+ private static final String TAG = ShapeshifterClient.class.getSimpleName();
- private final shapeshifter.ShapeShifter shapeShifter;
+ private final shapeshifter.Shapeshifter_ shapeShifter;
private boolean isErrorHandling;
private boolean noNetwork;
private int retry = 0;
@@ -53,15 +52,15 @@ public class Shapeshifter implements Observer {
if (retry < MAX_RETRY && !noNetwork) {
retry++;
- reconnectHandler.postDelayed(Shapeshifter.this::reconnect, RETRY_TIME);
+ reconnectHandler.postDelayed(ShapeshifterClient.this::reconnect, RETRY_TIME);
} else {
VpnStatus.logError(VpnStatus.ErrorType.SHAPESHIFTER);
}
}
}
- public Shapeshifter(Obfs4Options options) {
- shapeShifter = new ShapeShifter();
+ public ShapeshifterClient(Obfs4Options options) {
+ shapeShifter = new shapeshifter.Shapeshifter_();
shapeShifter.setLogger(new ShapeshifterLogger());
setup(options);
Looper.prepare();