mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
WIP: macos support
This commit is contained in:
@@ -53,7 +53,7 @@ class UnixTorPlugin extends JavaTorPlugin {
|
||||
|
||||
private interface CLibrary extends Library {
|
||||
|
||||
CLibrary INSTANCE = Native.loadLibrary("c", CLibrary.class);
|
||||
CLibrary INSTANCE = Native.load("c", CLibrary.class);
|
||||
|
||||
int getpid();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import javax.net.SocketFactory;
|
||||
|
||||
import static java.util.logging.Level.INFO;
|
||||
import static org.briarproject.bramble.util.OsUtils.isLinux;
|
||||
import static org.briarproject.bramble.util.OsUtils.isMac;
|
||||
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
@@ -57,14 +58,18 @@ public class UnixTorPluginFactory extends TorPluginFactory {
|
||||
@Nullable
|
||||
@Override
|
||||
String getArchitectureForTorBinary() {
|
||||
if (!isLinux()) return null;
|
||||
if (!isLinux() && !isMac()) return null;
|
||||
String arch = System.getProperty("os.arch");
|
||||
if (LOG.isLoggable(INFO)) {
|
||||
LOG.info("System's os.arch is " + arch);
|
||||
}
|
||||
if (arch.equals("amd64")) return "x86_64";
|
||||
else if (arch.equals("aarch64")) return "aarch64";
|
||||
else if (arch.equals("arm")) return "armhf";
|
||||
if (isLinux()) {
|
||||
if (arch.equals("amd64")) return "x86_64";
|
||||
else if (arch.equals("aarch64")) return "aarch64";
|
||||
else if (arch.equals("arm")) return "armhf";
|
||||
} else if (isMac()) {
|
||||
if (arch.equals("aarch64")) return "aarch64";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
BIN
bramble-java/src/main/resources/aarch64/obfs4proxy
Executable file
BIN
bramble-java/src/main/resources/aarch64/obfs4proxy
Executable file
Binary file not shown.
150684
bramble-java/src/main/resources/geoip
Normal file
150684
bramble-java/src/main/resources/geoip
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bramble-java/src/main/resources/libevent-2.1.7.dylib
Executable file
BIN
bramble-java/src/main/resources/libevent-2.1.7.dylib
Executable file
Binary file not shown.
BIN
bramble-java/src/main/resources/tor
Executable file
BIN
bramble-java/src/main/resources/tor
Executable file
Binary file not shown.
BIN
bramble-java/src/main/resources/tor_macos-aarch64.zip
Normal file
BIN
bramble-java/src/main/resources/tor_macos-aarch64.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user