Pier Angelo Vendrame pushed to branch tor-browser-128.7.0esr-14.5-1 at The Tor Project / Applications / Tor Browser
Commits:
-
67136454
by Pier Angelo Vendrame at 2025-02-26T11:52:52+01:00
-
e687a9b7
by Pier Angelo Vendrame at 2025-02-26T11:52:58+01:00
4 changed files:
- browser/components/torpreferences/content/connectionPane.js
- toolkit/components/tor-launcher/TorControlPort.sys.mjs
- toolkit/components/tor-launcher/TorProvider.sys.mjs
- toolkit/components/tor-launcher/TorProviderBuilder.sys.mjs
Changes:
... | ... | @@ -343,7 +343,7 @@ const gBridgeGrid = { |
343 | 343 | |
344 | 344 | observe(subject, topic) {
|
345 | 345 | switch (topic) {
|
346 | - case TorSettingsTopics.SettingsChanged:
|
|
346 | + case TorSettingsTopics.SettingsChanged: {
|
|
347 | 347 | const { changes } = subject.wrappedJSObject;
|
348 | 348 | if (
|
349 | 349 | changes.includes("bridges.source") ||
|
... | ... | @@ -352,6 +352,7 @@ const gBridgeGrid = { |
352 | 352 | this._updateRows();
|
353 | 353 | }
|
354 | 354 | break;
|
355 | + }
|
|
355 | 356 | case TorProviderTopics.BridgeChanged:
|
356 | 357 | this._updateConnectedBridge();
|
357 | 358 | break;
|
... | ... | @@ -1019,7 +1020,7 @@ const gBuiltinBridgesArea = { |
1019 | 1020 | |
1020 | 1021 | observe(subject, topic) {
|
1021 | 1022 | switch (topic) {
|
1022 | - case TorSettingsTopics.SettingsChanged:
|
|
1023 | + case TorSettingsTopics.SettingsChanged: {
|
|
1023 | 1024 | const { changes } = subject.wrappedJSObject;
|
1024 | 1025 | if (
|
1025 | 1026 | changes.includes("bridges.source") ||
|
... | ... | @@ -1031,6 +1032,7 @@ const gBuiltinBridgesArea = { |
1031 | 1032 | this._updateBridgeIds();
|
1032 | 1033 | }
|
1033 | 1034 | break;
|
1035 | + }
|
|
1034 | 1036 | case TorProviderTopics.BridgeChanged:
|
1035 | 1037 | this._updateConnectedBridge();
|
1036 | 1038 | break;
|
... | ... | @@ -1365,7 +1367,7 @@ const gLoxStatus = { |
1365 | 1367 | |
1366 | 1368 | observe(subject, topic) {
|
1367 | 1369 | switch (topic) {
|
1368 | - case TorSettingsTopics.SettingsChanged:
|
|
1370 | + case TorSettingsTopics.SettingsChanged: {
|
|
1369 | 1371 | const { changes } = subject.wrappedJSObject;
|
1370 | 1372 | if (changes.includes("bridges.source")) {
|
1371 | 1373 | this._updateLoxId();
|
... | ... | @@ -1376,6 +1378,7 @@ const gLoxStatus = { |
1376 | 1378 | // *before* we do. In particular, we want to make sure the invites and
|
1377 | 1379 | // event data has been cleared.
|
1378 | 1380 | break;
|
1381 | + }
|
|
1379 | 1382 | case LoxTopics.UpdateActiveLoxId:
|
1380 | 1383 | this._updateLoxId();
|
1381 | 1384 | break;
|
... | ... | @@ -1881,7 +1884,7 @@ const gBridgeSettings = { |
1881 | 1884 | |
1882 | 1885 | observe(subject, topic) {
|
1883 | 1886 | switch (topic) {
|
1884 | - case TorSettingsTopics.SettingsChanged:
|
|
1887 | + case TorSettingsTopics.SettingsChanged: {
|
|
1885 | 1888 | const { changes } = subject.wrappedJSObject;
|
1886 | 1889 | if (changes.includes("bridges.enabled")) {
|
1887 | 1890 | this._updateEnabled();
|
... | ... | @@ -1893,6 +1896,7 @@ const gBridgeSettings = { |
1893 | 1896 | this._updateBridgeStrings();
|
1894 | 1897 | }
|
1895 | 1898 | break;
|
1899 | + }
|
|
1896 | 1900 | }
|
1897 | 1901 | },
|
1898 | 1902 |
... | ... | @@ -973,7 +973,7 @@ export class TorController { |
973 | 973 | throw new Error(`Unsupported type ${typeof value} (key ${key})`);
|
974 | 974 | })
|
975 | 975 | .join(" ");
|
976 | - return this.#sendCommandSimple(`SETCONF ${args}`);
|
|
976 | + await this.#sendCommandSimple(`SETCONF ${args}`);
|
|
977 | 977 | }
|
978 | 978 | |
979 | 979 | /**
|
... | ... | @@ -984,14 +984,14 @@ export class TorController { |
984 | 984 | * @param {boolean} enabled Tell whether the network should be enabled
|
985 | 985 | */
|
986 | 986 | async setNetworkEnabled(enabled) {
|
987 | - return this.setConf([["DisableNetwork", !enabled]]);
|
|
987 | + await this.setConf([["DisableNetwork", !enabled]]);
|
|
988 | 988 | }
|
989 | 989 | |
990 | 990 | /**
|
991 | 991 | * Ask Tor to write out its config options into its torrc.
|
992 | 992 | */
|
993 | 993 | async flushSettings() {
|
994 | - return this.#sendCommandSimple("SAVECONF");
|
|
994 | + await this.#sendCommandSimple("SAVECONF");
|
|
995 | 995 | }
|
996 | 996 | |
997 | 997 | // Onion service authentication
|
... | ... | @@ -1075,7 +1075,7 @@ export class TorController { |
1075 | 1075 | * them is closed.
|
1076 | 1076 | */
|
1077 | 1077 | async takeOwnership() {
|
1078 | - return this.#sendCommandSimple("TAKEOWNERSHIP");
|
|
1078 | + await this.#sendCommandSimple("TAKEOWNERSHIP");
|
|
1079 | 1079 | }
|
1080 | 1080 | |
1081 | 1081 | /**
|
... | ... | @@ -1085,7 +1085,7 @@ export class TorController { |
1085 | 1085 | * should be stopped by calling this function.
|
1086 | 1086 | */
|
1087 | 1087 | async resetOwningControllerProcess() {
|
1088 | - return this.#sendCommandSimple("RESETCONF __OwningControllerProcess");
|
|
1088 | + await this.#sendCommandSimple("RESETCONF __OwningControllerProcess");
|
|
1089 | 1089 | }
|
1090 | 1090 | |
1091 | 1091 | // Signals
|
... | ... | @@ -1094,7 +1094,7 @@ export class TorController { |
1094 | 1094 | * Ask Tor to swtich to new circuits and clear the DNS cache.
|
1095 | 1095 | */
|
1096 | 1096 | async newnym() {
|
1097 | - return this.#sendCommandSimple("SIGNAL NEWNYM");
|
|
1097 | + await this.#sendCommandSimple("SIGNAL NEWNYM");
|
|
1098 | 1098 | }
|
1099 | 1099 | |
1100 | 1100 | // Events monitoring
|
... | ... | @@ -489,7 +489,7 @@ export class TorProvider { |
489 | 489 | * @param {boolean} isPermanent Tell whether the key should be saved forever
|
490 | 490 | */
|
491 | 491 | async onionAuthAdd(address, b64PrivateKey, isPermanent) {
|
492 | - return this.#controller.onionAuthAdd(address, b64PrivateKey, isPermanent);
|
|
492 | + await this.#controller.onionAuthAdd(address, b64PrivateKey, isPermanent);
|
|
493 | 493 | }
|
494 | 494 | |
495 | 495 | /**
|
... | ... | @@ -498,7 +498,7 @@ export class TorProvider { |
498 | 498 | * @param {string} address The address of the onion service
|
499 | 499 | */
|
500 | 500 | async onionAuthRemove(address) {
|
501 | - return this.#controller.onionAuthRemove(address);
|
|
501 | + await this.#controller.onionAuthRemove(address);
|
|
502 | 502 | }
|
503 | 503 | |
504 | 504 | /**
|
... | ... | @@ -142,6 +142,8 @@ export class TorProviderBuilder { |
142 | 142 | * Build a provider.
|
143 | 143 | * This method will wait for the system to be initialized, and allows you to
|
144 | 144 | * catch also any initialization errors.
|
145 | + *
|
|
146 | + * @returns {TorProvider} A TorProvider instance
|
|
145 | 147 | */
|
146 | 148 | static async build() {
|
147 | 149 | if (!this.#provider && this.providerType === TorProviders.none) {
|