[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-151.0a1-16.0-1] 3 commits: fixup! TB 40562: Added Tor Browser preferences to 000-tor-browser.js



Title: GitLab

Pier Angelo Vendrame pushed to branch tor-browser-151.0a1-16.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 152a987b
    by Pier Angelo Vendrame at 2026-05-28T12:26:37+02:00
    fixup! TB 40562: Added Tor Browser preferences to 000-tor-browser.js
    
    TB 42436: Support multi-fronts for Moat.
    
  • e4d60e5f
    by Pier Angelo Vendrame at 2026-05-28T12:26:44+02:00
    fixup! Lox integration
    
    TB 42436: Support multi-fronts for Moat.
    
  • fd471587
    by Pier Angelo Vendrame at 2026-05-28T12:26:44+02:00
    fixup! TB 40597: Implement TorSettings module
    
    TB 42436: Support multi-fronts for Moat.
    

4 changed files:

Changes:

  • browser/app/profile/000-tor-browser.js
    ... ... @@ -126,8 +126,7 @@ pref("extensions.torlauncher.torrc_path", "");
    126 126
     pref("extensions.torlauncher.tordatadir_path", "");
    
    127 127
     
    
    128 128
     // BridgeDB-related preferences (used for Moat).
    
    129
    -pref("extensions.torlauncher.bridgedb_front", "vuejs.org");
    
    130
    -pref("extensions.torlauncher.bridgedb_reflector", "https://bespoke-strudel-c243cc.netlify.app");
    
    129
    +pref("extensions.torlauncher.bridgedb_targets", "https://1723079976.rsc.cdn77.org|cdn.zk.mk+www.cdn77.com");
    
    131 130
     pref("extensions.torlauncher.moat_service", "https://bridges.torproject.org/moat");
    
    132 131
     
    
    133 132
     // Log levels
    

  • toolkit/components/lox/Lox.sys.mjs
    ... ... @@ -1077,15 +1077,12 @@ class LoxImpl {
    1077 1077
         if (this.#domainFrontedRequests === null) {
    
    1078 1078
           this.#domainFrontedRequests = new Promise((resolve, reject) => {
    
    1079 1079
             // TODO: Customize to the values for Lox
    
    1080
    -        const reflector = Services.prefs.getStringPref(
    
    1081
    -          "extensions.torlauncher.bridgedb_reflector"
    
    1082
    -        );
    
    1083
    -        const front = Services.prefs.getStringPref(
    
    1084
    -          "extensions.torlauncher.bridgedb_front"
    
    1080
    +        const targets = Services.prefs.getStringPref(
    
    1081
    +          "extensions.torlauncher.bridgedb_targets"
    
    1085 1082
             );
    
    1086 1083
             const builder = new lazy.DomainFrontRequestBuilder();
    
    1087 1084
             builder
    
    1088
    -          .init(reflector, front)
    
    1085
    +          .init(targets)
    
    1089 1086
               .then(() => resolve(builder))
    
    1090 1087
               .catch(reject);
    
    1091 1088
           });
    

  • toolkit/modules/DomainFrontedRequests.sys.mjs
    ... ... @@ -24,38 +24,20 @@ ChromeUtils.defineESModuleGetters(lazy, {
    24 24
      * proxy credentials, which can be prepared with this function.
    
    25 25
      *
    
    26 26
      * @param {string} proxyType The proxy type (socks for socks5 or socks4)
    
    27
    - * @param {string} reflector The URL of the service hosted by the CDN
    
    28
    - * @param {string} front The domain to use as a front
    
    27
    + * @param {string} targets The string to pass to meek as the targets argument
    
    29 28
      * @returns {string[]} An array containing [username, password]
    
    30 29
      */
    
    31
    -function makeMeekCredentials(proxyType, reflector, front) {
    
    32
    -  // Construct the per-connection arguments.
    
    33
    -  let meekClientEscapedArgs = "";
    
    34
    -
    
    30
    +function makeMeekCredentials(proxyType, targets) {
    
    35 31
       // Escape aValue per section 3.5 of the PT specification:
    
    36 32
       //   First the "<Key>=<Value>" formatted arguments MUST be escaped,
    
    37 33
       //   such that all backslash, equal sign, and semicolon characters
    
    38 34
       //   are escaped with a backslash.
    
    39
    -  const escapeArgValue = aValue =>
    
    40
    -    aValue
    
    41
    -      ? aValue
    
    42
    -          .replaceAll("\\", "\\\\")
    
    43
    -          .replaceAll("=", "\\=")
    
    44
    -          .replaceAll(";", "\\;")
    
    45
    -      : "";
    
    46
    -
    
    47
    -  if (reflector) {
    
    48
    -    meekClientEscapedArgs += "url="">";
    
    49
    -    meekClientEscapedArgs += escapeArgValue(reflector);
    
    50
    -  }
    
    51
    -
    
    52
    -  if (front) {
    
    53
    -    if (meekClientEscapedArgs.length) {
    
    54
    -      meekClientEscapedArgs += ";";
    
    55
    -    }
    
    56
    -    meekClientEscapedArgs += "front=";
    
    57
    -    meekClientEscapedArgs += escapeArgValue(front);
    
    58
    -  }
    
    35
    +  targets = targets
    
    36
    +    .replaceAll("\\", "\\\\")
    
    37
    +    .replaceAll("=", "\\=")
    
    38
    +    .replaceAll(";", "\\;");
    
    39
    +  // Construct the per-connection arguments.
    
    40
    +  const meekClientEscapedArgs = `targets=${targets}`;
    
    59 41
     
    
    60 42
       // socks5
    
    61 43
       if (proxyType === "socks") {
    
    ... ... @@ -88,7 +70,7 @@ class MeekTransport {
    88 70
       #meekClientProcess = null;
    
    89 71
     
    
    90 72
       // launches the meekprocess
    
    91
    -  async init(reflector, front) {
    
    73
    +  async init(targets) {
    
    92 74
         // ensure we haven't already init'd
    
    93 75
         if (this.#inited) {
    
    94 76
           throw new Error("MeekTransport: Already initialized");
    
    ... ... @@ -267,8 +249,7 @@ class MeekTransport {
    267 249
           });
    
    268 250
           [this.proxyUsername, this.proxyPassword] = makeMeekCredentials(
    
    269 251
             this.proxyType,
    
    270
    -        reflector,
    
    271
    -        front
    
    252
    +        targets
    
    272 253
           );
    
    273 254
           this.#inited = true;
    
    274 255
         } catch (ex) {
    
    ... ... @@ -321,7 +302,7 @@ class MeekTransportAndroid {
    321 302
        */
    
    322 303
       #id = 0;
    
    323 304
     
    
    324
    -  async init(reflector, front) {
    
    305
    +  async init(targets) {
    
    325 306
         // ensure we haven't already init'd
    
    326 307
         if (this.#id) {
    
    327 308
           throw new Error("MeekTransport: Already initialized");
    
    ... ... @@ -336,8 +317,7 @@ class MeekTransportAndroid {
    336 317
         this.proxyPort = details.port;
    
    337 318
         [this.proxyUsername, this.proxyPassword] = makeMeekCredentials(
    
    338 319
           this.proxyType,
    
    339
    -      reflector,
    
    340
    -      front
    
    320
    +      targets
    
    341 321
         );
    
    342 322
       }
    
    343 323
     
    
    ... ... @@ -457,7 +437,7 @@ export class DomainFrontRequestBuilder {
    457 437
         return this.#inited;
    
    458 438
       }
    
    459 439
     
    
    460
    -  async init(reflector, front) {
    
    440
    +  async init(targets) {
    
    461 441
         if (this.#inited) {
    
    462 442
           throw new Error("DomainFrontRequestBuilder: Already initialized");
    
    463 443
         }
    
    ... ... @@ -466,7 +446,7 @@ export class DomainFrontRequestBuilder {
    466 446
           Services.appinfo.OS === "Android"
    
    467 447
             ? new MeekTransportAndroid()
    
    468 448
             : new MeekTransport();
    
    469
    -    await meekTransport.init(reflector, front);
    
    449
    +    await meekTransport.init(targets);
    
    470 450
         this.#meekTransport = meekTransport;
    
    471 451
         this.#inited = true;
    
    472 452
       }
    

  • toolkit/modules/Moat.sys.mjs
    ... ... @@ -18,8 +18,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
    18 18
     });
    
    19 19
     
    
    20 20
     const TorLauncherPrefs = Object.freeze({
    
    21
    -  bridgedb_front: "extensions.torlauncher.bridgedb_front",
    
    22
    -  bridgedb_reflector: "extensions.torlauncher.bridgedb_reflector",
    
    21
    +  bridgedb_targets: "extensions.torlauncher.bridgedb_targets",
    
    23 22
       moat_service: "extensions.torlauncher.moat_service",
    
    24 23
     });
    
    25 24
     
    
    ... ... @@ -68,13 +67,12 @@ export class MoatRPC {
    68 67
           return;
    
    69 68
         }
    
    70 69
     
    
    71
    -    const reflector = Services.prefs.getStringPref(
    
    72
    -      TorLauncherPrefs.bridgedb_reflector
    
    70
    +    const targets = Services.prefs.getStringPref(
    
    71
    +      TorLauncherPrefs.bridgedb_targets
    
    73 72
         );
    
    74
    -    const front = Services.prefs.getStringPref(TorLauncherPrefs.bridgedb_front);
    
    75 73
         this.#requestBuilder = new lazy.DomainFrontRequestBuilder();
    
    76 74
         try {
    
    77
    -      await this.#requestBuilder.init(reflector, front);
    
    75
    +      await this.#requestBuilder.init(targets);
    
    78 76
         } catch (e) {
    
    79 77
           this.#requestBuilder = null;
    
    80 78
           throw e;
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx