diff options
author | cyberta <cyberta@riseup.net> | 2022-11-21 15:49:52 +0100 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2022-11-21 15:49:52 +0100 |
commit | 93fe05806856897749846203f832867327d14352 (patch) | |
tree | 090a7d1a6c31df23d1305292e30c1e7f7f378c80 /app/src/main/java | |
parent | 5b9505dbb37d110b8c528671bbfc67f7944d2e43 (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')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 6 | ||||
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/connection/Obfs4Connection.java | 4 | ||||
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java | 5 | ||||
-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 |
4 files changed, 13 insertions, 15 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 4b394136..88a85de3 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -54,7 +54,7 @@ import se.leap.bitmaskclient.eip.EipStatus; import se.leap.bitmaskclient.eip.VpnNotificationManager; import se.leap.bitmaskclient.firewall.FirewallManager; import se.leap.bitmaskclient.pluggableTransports.ObfsVpnClient; -import se.leap.bitmaskclient.pluggableTransports.Shapeshifter; +import se.leap.bitmaskclient.pluggableTransports.ShapeshifterClient; public class OpenVPNService extends VpnService implements StateListener, Callback, ByteCountListener, IOpenVPNServiceInternal, VpnNotificationManager.VpnServiceCallback { @@ -90,7 +90,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private Toast mlastToast; private Runnable mOpenVPNThread; private VpnNotificationManager notificationManager; - private Shapeshifter shapeshifter; + private ShapeshifterClient shapeshifter; private ObfsVpnClient obfsVpnClient; private FirewallManager firewallManager; @@ -426,7 +426,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac int runningSocksPort = obfsVpnClient.start(); connection.setProxyPort(String.valueOf(runningSocksPort)); } else if (shapeshifter == null) { - shapeshifter = new Shapeshifter(obfs4Connection.getDispatcherOptions()); + shapeshifter = new ShapeshifterClient(obfs4Connection.getDispatcherOptions()); shapeshifter.start(); } } diff --git a/app/src/main/java/de/blinkt/openvpn/core/connection/Obfs4Connection.java b/app/src/main/java/de/blinkt/openvpn/core/connection/Obfs4Connection.java index 5189afcc..c77c23fd 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/connection/Obfs4Connection.java +++ b/app/src/main/java/de/blinkt/openvpn/core/connection/Obfs4Connection.java @@ -1,8 +1,8 @@ package de.blinkt.openvpn.core.connection; 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 se.leap.bitmaskclient.pluggableTransports.Obfs4Options; import se.leap.bitmaskclient.pluggableTransports.ObfsVpnClient; 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(); |