summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-11-22 00:32:42 +0000
committercyberta <cyberta@riseup.net>2022-11-22 00:32:42 +0000
commit0806936f2e2499b2cfa85a429f7926cd3dc6d142 (patch)
tree2e2f2660a8463667f297a5a1985366cbf309c8ae
parent2bd3f94e15ce2d81ba24ed41defbbf6a237394fc (diff)
parent9d2c5e400e1e69575cdb5782c1f3576a058733fa (diff)
Merge branch 'last_shapeshifter_update<3' into 'master'
fix bitmaskcore builds on macOS See merge request leap/bitmask_android!216
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java6
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/connection/Obfs4Connection.java4
-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
m---------bitmaskcore0
-rwxr-xr-xscripts/cleanProject.sh3
6 files changed, 16 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();
diff --git a/bitmaskcore b/bitmaskcore
-Subproject f3229dc6ce31ba0962657bcd2c29e999224d885
+Subproject 01c6b6c7c463aadde6b22e04b49b1a8cc35f6c9
diff --git a/scripts/cleanProject.sh b/scripts/cleanProject.sh
index e7d8460e..49e2db44 100755
--- a/scripts/cleanProject.sh
+++ b/scripts/cleanProject.sh
@@ -6,6 +6,8 @@ BASE_DIR="$SCRIPT_DIR/.."
git checkout -- \*
git checkout -- \.\*
+git clean -xfd
+git submodule foreach --recursive git clean -xfd
rm -r $BASE_DIR/ics-openvpn
rm -r $BASE_DIR/build
rm -r $BASE_DIR/app/build
@@ -18,6 +20,7 @@ rm -r $BASE_DIR/tor-android/external/bin
rm -r $BASE_DIR/tor-android/external/include/
rm -r $BASE_DIR/tor-android/external/*.build-stamp
rm -r $BASE_DIR/tor-android/external/lib
+git reset --hard
git submodule foreach --recursive git reset --hard HEAD
git submodule sync --recursive
git submodule update --init --recursive