Pier Angelo Vendrame pushed to branch tor-browser-140.11.0esr-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 82326a42 by Pier Angelo Vendrame at 2026-06-01T09:05:08+02:00 fixup! TB 40562: Added Tor Browser preferences to 000-tor-browser.js TB 42436: Support multi-fronts for Moat. - - - - - 50d0e9e2 by Pier Angelo Vendrame at 2026-06-01T09:05:08+02:00 fixup! Lox integration TB 42436: Support multi-fronts for Moat. - - - - - 5cecad81 by Pier Angelo Vendrame at 2026-06-01T09:05:09+02:00 fixup! TB 40597: Implement TorSettings module TB 42436: Support multi-fronts for Moat. - - - - - 4 changed files: - browser/app/profile/000-tor-browser.js - toolkit/components/lox/Lox.sys.mjs - toolkit/modules/DomainFrontedRequests.sys.mjs - toolkit/modules/Moat.sys.mjs Changes: ===================================== browser/app/profile/000-tor-browser.js ===================================== @@ -126,8 +126,7 @@ pref("extensions.torlauncher.torrc_path", ""); pref("extensions.torlauncher.tordatadir_path", ""); // BridgeDB-related preferences (used for Moat). -pref("extensions.torlauncher.bridgedb_front", "vuejs.org"); -pref("extensions.torlauncher.bridgedb_reflector", "https://bespoke-strudel-c243cc.netlify.app"); +pref("extensions.torlauncher.bridgedb_targets", "https://1723079976.rsc.cdn77.org|cdn.zk.mk+www.cdn77.com"); pref("extensions.torlauncher.moat_service", "https://bridges.torproject.org/moat"); // Log levels ===================================== toolkit/components/lox/Lox.sys.mjs ===================================== @@ -1077,15 +1077,12 @@ class LoxImpl { if (this.#domainFrontedRequests === null) { this.#domainFrontedRequests = new Promise((resolve, reject) => { // TODO: Customize to the values for Lox - const reflector = Services.prefs.getStringPref( - "extensions.torlauncher.bridgedb_reflector" - ); - const front = Services.prefs.getStringPref( - "extensions.torlauncher.bridgedb_front" + const targets = Services.prefs.getStringPref( + "extensions.torlauncher.bridgedb_targets" ); const builder = new lazy.DomainFrontRequestBuilder(); builder - .init(reflector, front) + .init(targets) .then(() => resolve(builder)) .catch(reject); }); ===================================== toolkit/modules/DomainFrontedRequests.sys.mjs ===================================== @@ -22,38 +22,20 @@ ChromeUtils.defineESModuleGetters(lazy, { * proxy credentials, which can be prepared with this function. * * @param {string} proxyType The proxy type (socks for socks5 or socks4) - * @param {string} reflector The URL of the service hosted by the CDN - * @param {string} front The domain to use as a front + * @param {string} targets The string to pass to meek as the targets argument * @returns {string[]} An array containing [username, password] */ -function makeMeekCredentials(proxyType, reflector, front) { - // Construct the per-connection arguments. - let meekClientEscapedArgs = ""; - +function makeMeekCredentials(proxyType, targets) { // Escape aValue per section 3.5 of the PT specification: // First the "<Key>=<Value>" formatted arguments MUST be escaped, // such that all backslash, equal sign, and semicolon characters // are escaped with a backslash. - const escapeArgValue = aValue => - aValue - ? aValue - .replaceAll("\\", "\\\\") - .replaceAll("=", "\\=") - .replaceAll(";", "\\;") - : ""; - - if (reflector) { - meekClientEscapedArgs += "url="; - meekClientEscapedArgs += escapeArgValue(reflector); - } - - if (front) { - if (meekClientEscapedArgs.length) { - meekClientEscapedArgs += ";"; - } - meekClientEscapedArgs += "front="; - meekClientEscapedArgs += escapeArgValue(front); - } + targets = targets + .replaceAll("\\", "\\\\") + .replaceAll("=", "\\=") + .replaceAll(";", "\\;"); + // Construct the per-connection arguments. + const meekClientEscapedArgs = `targets=${targets}`; // socks5 if (proxyType === "socks") { @@ -86,7 +68,7 @@ class MeekTransport { #meekClientProcess = null; // launches the meekprocess - async init(reflector, front) { + async init(targets) { // ensure we haven't already init'd if (this.#inited) { throw new Error("MeekTransport: Already initialized"); @@ -265,8 +247,7 @@ class MeekTransport { }); [this.proxyUsername, this.proxyPassword] = makeMeekCredentials( this.proxyType, - reflector, - front + targets ); this.#inited = true; } catch (ex) { @@ -319,7 +300,7 @@ class MeekTransportAndroid { */ #id = 0; - async init(reflector, front) { + async init(targets) { // ensure we haven't already init'd if (this.#id) { throw new Error("MeekTransport: Already initialized"); @@ -333,8 +314,7 @@ class MeekTransportAndroid { this.proxyPort = details.port; [this.proxyUsername, this.proxyPassword] = makeMeekCredentials( this.proxyType, - reflector, - front + targets ); } @@ -455,7 +435,7 @@ export class DomainFrontRequestBuilder { return this.#inited; } - async init(reflector, front) { + async init(targets) { if (this.#inited) { throw new Error("DomainFrontRequestBuilder: Already initialized"); } @@ -464,7 +444,7 @@ export class DomainFrontRequestBuilder { Services.appinfo.OS === "Android" ? new MeekTransportAndroid() : new MeekTransport(); - await meekTransport.init(reflector, front); + await meekTransport.init(targets); this.#meekTransport = meekTransport; this.#inited = true; } ===================================== toolkit/modules/Moat.sys.mjs ===================================== @@ -18,8 +18,7 @@ ChromeUtils.defineESModuleGetters(lazy, { }); const TorLauncherPrefs = Object.freeze({ - bridgedb_front: "extensions.torlauncher.bridgedb_front", - bridgedb_reflector: "extensions.torlauncher.bridgedb_reflector", + bridgedb_targets: "extensions.torlauncher.bridgedb_targets", moat_service: "extensions.torlauncher.moat_service", }); @@ -68,13 +67,12 @@ export class MoatRPC { return; } - const reflector = Services.prefs.getStringPref( - TorLauncherPrefs.bridgedb_reflector + const targets = Services.prefs.getStringPref( + TorLauncherPrefs.bridgedb_targets ); - const front = Services.prefs.getStringPref(TorLauncherPrefs.bridgedb_front); this.#requestBuilder = new lazy.DomainFrontRequestBuilder(); try { - await this.#requestBuilder.init(reflector, front); + await this.#requestBuilder.init(targets); } catch (e) { this.#requestBuilder = null; throw e; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c564825... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c564825... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
Pier Angelo Vendrame (@pierov)