mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Use Tor binary for armhf (armv7)
Example devices are Nexus 5 and Raspberry Pi v2. Based on https://code.briarproject.org/briar/briar/-/merge_requests/1376 Related to https://code.briarproject.org/briar/briar/-/issues/1854
This commit is contained in:
@@ -25,6 +25,7 @@ import javax.annotation.concurrent.Immutable;
|
||||
import javax.inject.Inject;
|
||||
import javax.net.SocketFactory;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static java.util.logging.Logger.getLogger;
|
||||
import static org.briarproject.bramble.util.OsUtils.isLinux;
|
||||
|
||||
@@ -96,12 +97,15 @@ public class UnixTorPluginFactory implements DuplexPluginFactory {
|
||||
String architecture = null;
|
||||
if (isLinux()) {
|
||||
String arch = System.getProperty("os.arch");
|
||||
LOG.info("System's os.arch is " + arch);
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("System's os.arch is " + arch);
|
||||
}
|
||||
if (arch.equals("amd64")) {
|
||||
architecture = "linux-x86_64";
|
||||
}
|
||||
else if (arch.equals("aarch64")) {
|
||||
} else if (arch.equals("aarch64")) {
|
||||
architecture = "linux-aarch64";
|
||||
} else if (arch.equals("arm")) {
|
||||
architecture = "linux-armhf";
|
||||
}
|
||||
}
|
||||
if (architecture == null) {
|
||||
@@ -109,7 +113,9 @@ public class UnixTorPluginFactory implements DuplexPluginFactory {
|
||||
return null;
|
||||
}
|
||||
|
||||
LOG.info("The selected architecture for Tor is " + architecture);
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("The selected architecture for Tor is " + architecture);
|
||||
}
|
||||
|
||||
Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL,
|
||||
MAX_POLLING_INTERVAL, BACKOFF_BASE);
|
||||
|
||||
@@ -15,6 +15,7 @@ To build the `jar` file, you need to specify the combination of architecture and
|
||||
|
||||
$ ./gradlew --configure-on-demand briar-headless:x86LinuxJar
|
||||
$ ./gradlew --configure-on-demand briar-headless:aarch64LinuxJar
|
||||
$ ./gradlew --configure-on-demand briar-headless:armhfLinuxJar
|
||||
|
||||
You can start the peer (and its API server) like this:
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ void jarFactory(Jar jarTask, jarArchitecture) {
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
{
|
||||
String[] architectures = ["linux-aarch64", "linux-x86_64"]
|
||||
String[] architectures = ["linux-aarch64", "linux-armhf", "linux-x86_64"]
|
||||
for (String arch : architectures) {
|
||||
if (arch != jarArchitecture) {
|
||||
exclude "obfs4proxy_" + arch + ".zip"
|
||||
@@ -102,6 +102,10 @@ task aarch64LinuxJar(type: Jar) {
|
||||
jarFactory(it, 'linux-aarch64')
|
||||
}
|
||||
|
||||
task armhfLinuxJar(type: Jar) {
|
||||
jarFactory(it, 'linux-armhf')
|
||||
}
|
||||
|
||||
task x86LinuxJar(type: Jar) {
|
||||
jarFactory(it, 'linux-x86_64')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user