Upgrade onionwrapper to 0.1.0 and snowflake to 2.9.1.

This commit is contained in:
akwizgran
2024-03-09 20:52:32 +00:00
parent f16875c602
commit ca9181ee3f
11 changed files with 23 additions and 38 deletions

View File

@@ -75,7 +75,6 @@ import static org.briarproject.bramble.api.plugin.TorConstants.PREF_TOR_ONLY_WHE
import static org.briarproject.bramble.api.plugin.TorConstants.PREF_TOR_PORT;
import static org.briarproject.bramble.api.plugin.TorConstants.PROP_ONION_V3;
import static org.briarproject.bramble.api.plugin.TorConstants.REASON_BATTERY;
import static org.briarproject.bramble.api.plugin.TorConstants.REASON_COUNTRY_BLOCKED;
import static org.briarproject.bramble.api.plugin.TorConstants.REASON_MOBILE_DATA;
import static org.briarproject.bramble.plugin.tor.TorRendezvousCrypto.SEED_BYTES;
import static org.briarproject.bramble.util.IoUtils.tryToClose;
@@ -106,7 +105,6 @@ class TorPlugin implements DuplexPlugin, EventListener {
private final PluginCallback callback;
private final long maxLatency;
private final int maxIdleTime;
private final boolean canVerifyLetsEncryptCerts;
private final int socketTimeout;
private final AtomicBoolean used = new AtomicBoolean(false);
@@ -126,8 +124,7 @@ class TorPlugin implements DuplexPlugin, EventListener {
TorWrapper tor,
PluginCallback callback,
long maxLatency,
int maxIdleTime,
boolean canVerifyLetsEncryptCerts) {
int maxIdleTime) {
this.ioExecutor = ioExecutor;
this.wakefulIoExecutor = wakefulIoExecutor;
this.networkManager = networkManager;
@@ -141,7 +138,6 @@ class TorPlugin implements DuplexPlugin, EventListener {
this.callback = callback;
this.maxLatency = maxLatency;
this.maxIdleTime = maxIdleTime;
this.canVerifyLetsEncryptCerts = canVerifyLetsEncryptCerts;
if (maxIdleTime > Integer.MAX_VALUE / 2) {
socketTimeout = Integer.MAX_VALUE;
} else {
@@ -297,7 +293,7 @@ class TorPlugin implements DuplexPlugin, EventListener {
List<String> bridges = new ArrayList<>();
for (BridgeType bridgeType : bridgeTypes) {
bridges.addAll(circumventionProvider.getBridges(bridgeType,
countryCode, canVerifyLetsEncryptCerts));
countryCode));
}
tor.enableBridges(bridges);
}
@@ -491,8 +487,8 @@ class TorPlugin implements DuplexPlugin, EventListener {
boolean wifi = status.isWifi();
boolean ipv6Only = status.isIpv6Only();
String country = locationUtils.getCurrentCountry();
boolean blocked =
circumventionProvider.isTorProbablyBlocked(country);
boolean bridgesByDefault =
circumventionProvider.shouldUseBridges(country);
boolean enabledByUser = settings.getBoolean(PREF_PLUGIN_ENABLE,
DEFAULT_PREF_PLUGIN_ENABLE);
int network = settings.getInt(PREF_TOR_NETWORK,
@@ -502,7 +498,6 @@ class TorPlugin implements DuplexPlugin, EventListener {
boolean onlyWhenCharging =
settings.getBoolean(PREF_TOR_ONLY_WHEN_CHARGING,
DEFAULT_PREF_TOR_ONLY_WHEN_CHARGING);
boolean bridgesWork = circumventionProvider.doBridgesWork(country);
boolean automatic = network == PREF_TOR_NETWORK_AUTOMATIC;
if (LOG.isLoggable(INFO)) {
@@ -532,10 +527,6 @@ class TorPlugin implements DuplexPlugin, EventListener {
LOG.info("Configured not to use mobile data");
reasonsDisabled |= REASON_MOBILE_DATA;
}
if (automatic && blocked && !bridgesWork) {
LOG.info("Country is blocked");
reasonsDisabled |= REASON_COUNTRY_BLOCKED;
}
if (reasonsDisabled != 0) {
LOG.info("Disabling network due to settings");
@@ -543,7 +534,7 @@ class TorPlugin implements DuplexPlugin, EventListener {
LOG.info("Enabling network");
enableNetwork = true;
if (network == PREF_TOR_NETWORK_WITH_BRIDGES ||
(automatic && bridgesWork)) {
(automatic && bridgesByDefault)) {
if (ipv6Only) {
bridgeTypes = asList(MEEK, SNOWFLAKE);
} else {

View File

@@ -36,7 +36,7 @@ dependencyVerification {
'org.bouncycastle:bcprov-jdk15to18:1.71:bcprov-jdk15to18-1.71.jar:143aaa4a40edd5fc2a18db7900059f6c16f4d931b94b94b20f7e2238e6662886',
'org.briarproject:jtorctl:0.5:jtorctl-0.5.jar:43f8c7d390169772b9a2c82ab806c8414c136a2a8636c555e22754bb7260793b',
'org.briarproject:null-safety:0.1:null-safety-0.1.jar:161760de5e838cb982bafa973df820675d4397098e9a91637a36a306d43ba011',
'org.briarproject:onionwrapper-core:0.0.7:onionwrapper-core-0.0.7.jar:918b5851f4a05a3bc0835bc7c81d70e598a178c79856fe5c506c261889f4b3fd',
'org.briarproject:onionwrapper-core:0.1.0:onionwrapper-core-0.1.0.jar:3e6631771b891c959403f6145de034c6f9816e7d067808d534f954eef9a1ca35',
'org.briarproject:socks-socket:0.1:socks-socket-0.1.jar:e5898822d10f5390363c5dddb945891648c92cf93ba50709e07f0d173ec0eb4b',
'org.checkerframework:checker-compat-qual:2.5.5:checker-compat-qual-2.5.5.jar:11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a',
'org.checkerframework:checker-qual:3.12.0:checker-qual-3.12.0.jar:ff10785ac2a357ec5de9c293cb982a2cbb605c0309ea4cc1cb9b9bc6dbe7f3cb',