Skip to content
Snippets Groups Projects
Commit 7d992c7a authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! TB 40597: Implement TorSettings module

TB 42550: Move straight to FinalError when the user selects a specific
region.

Also fix the `simulateMoatResponse` value for the censorship levels.
Although it does not change the overall outcome (bootstrap fails) it
does change *how* it fails.
parent e20606ca
Branches
Tags
1 merge request!1500TB 43415: Rebased onto 134.0a1
......@@ -1227,7 +1227,10 @@ export const TorConnect = {
bootstrapOptions.simulateCensorship = true;
bootstrapOptions.simulateMoatResponse = {
country: "fi",
settings: [{}, {}],
bridgesList: [
{ source: 0, builtin_type: "obfs4" },
{ source: 0, builtin_type: "snowflake" },
],
};
}
} else if (censorshipLevel === 3) {
......@@ -1235,7 +1238,7 @@ export const TorConnect = {
bootstrapOptions.simulateCensorship = true;
bootstrapOptions.simulateMoatResponse = {
country: null,
settings: [],
bridgesList: [],
};
}
},
......@@ -1412,21 +1415,21 @@ export const TorConnect = {
this._setStage(TorConnectStage.ChooseRegion);
return;
case TorConnectStage.ChooseRegion:
// TODO: Uncomment for behaviour in tor-browser#42550.
/*
if (regionCode !== "automatic") {
// Not automatic. Go straight to the final error.
this._setStage(TorConnectStage.FinalError);
return;
}
*/
if (regionCode !== "automatic" || bootstrapAttempt.detectedRegion) {
if (regionCode === "automatic") {
// The automatic region failed.
if (bootstrapAttempt.detectedRegion) {
this._setStage(TorConnectStage.ConfirmRegion);
return;
}
} else {
this._setStage(TorConnectStage.RegionNotFound);
}
return;
}
// Else, not automatic. Go straight to the final error since the user
// is unlikely to succeed re-selecting the same region and it would be
// unexpected for the user to select a different region.
// See tor-browser#42550.
break;
}
this._setStage(TorConnectStage.FinalError);
return;
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment