From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OOCBEIgWDGGdHAEAgWs5BA (envelope-from ) for ; Thu, 05 Aug 2021 18:49:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OV1EDIgWDGGpFAAA1q6Kng (envelope-from ) for ; Thu, 05 Aug 2021 16:49:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 506972EEBE for ; Thu, 5 Aug 2021 18:49:11 +0200 (CEST) Received: from localhost ([::1]:41138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBgYP-0004CE-FO for larch@yhetil.org; Thu, 05 Aug 2021 12:49:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBgYI-0004Av-7v for bug-guix@gnu.org; Thu, 05 Aug 2021 12:49:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBgYH-0001pC-Vv for bug-guix@gnu.org; Thu, 05 Aug 2021 12:49:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBgYH-0002n8-US for bug-guix@gnu.org; Thu, 05 Aug 2021 12:49:01 -0400 Subject: bug#44678: Set a Firefox user agent for our Icecat build Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Thu, 05 Aug 2021 16:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 44678 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner Mail-Followup-To: 44678@debbugs.gnu.org, maxim.cournoyer@gmail.com, arunisaac@systemreboot.net Received: via spool by 44678-done@debbugs.gnu.org id=D44678.162818210610666 (code D ref 44678); Thu, 05 Aug 2021 16:49:01 +0000 Received: (at 44678-done) by debbugs.gnu.org; 5 Aug 2021 16:48:26 +0000 Received: from localhost ([127.0.0.1]:48244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBgXe-0002lt-AR for submit@debbugs.gnu.org; Thu, 05 Aug 2021 12:48:25 -0400 Received: from mail-qt1-f182.google.com ([209.85.160.182]:40798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBgXb-0002le-LR for 44678-done@debbugs.gnu.org; Thu, 05 Aug 2021 12:48:20 -0400 Received: by mail-qt1-f182.google.com with SMTP id m11so4324859qtx.7 for <44678-done@debbugs.gnu.org>; Thu, 05 Aug 2021 09:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=trV+2/fQQM3BmXTnDSLxM6PhnYECcFKn64KjrCtzqWU=; b=jX5YxnR+3nKBvq+GJxe9Lf//6MyUa9AVV2nOOw6kGbA9yZ0y4XIcS2ISaw2gd1N+Vl YP2ATsUMTLY7APnYVKWMr/wXL3FEbW2uhaV3+y7F0GXf82eooKXueR3s2XXD28kuZihr D63/3Q7LoVdkPn1nY/CmtAIw99jyOcczl1hHwaS9VKhc3dvs3wZM8Drqq8uesjOfgNRO CFtiN1IYikPRKz3kfSylKSIWqeMjFCG365Ty+/c1WECv65XJyErp2syOTQ126lmB2/Oj +9EThHYLpWmeB8CBLEyARxPUq3Qv5+/wAasafoH6YYLxGsfCnbGVimvE6Oz5HUCIkAXj cPYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=trV+2/fQQM3BmXTnDSLxM6PhnYECcFKn64KjrCtzqWU=; b=AX3bSts1mT76T19yDTDV1Bj65CMXK80Dj4DOtEq7giAEvDUJvEVRko5sIMoEpx+Hu9 WckjPIz4Ik2zqP9iRWKGoT6jqoHDhNGWZqh8TFWEpXwyS2Aywik3eQI/YkSkO7/it+yn EFHsI60GtLoadjkzdh0WXIOLZ+p5pebUkQSfacCrYhUCEgk9N5uVLad2wYRlqK6YzNf8 Kc5AEA5hw78ntDnDChcO/it2WP+XHMa2l0KRmtk2sTBODRqfMR65qGyHNK0DHq6iMTV9 3BrPBLA4L6vvYA2M4JJEGMtjaGw7a61S62HCKSXzkN4rj03M+9CD9URSGaochBaWExmG MrXQ== X-Gm-Message-State: AOAM5302TqcqlxS1qdYPqYRb7uF0clVhYS3g3hTSUlfiyWOKZtXtwwgH TXAnrIQeOQevErRzonKW1pYPlaToqXfrk40X X-Google-Smtp-Source: ABdhPJy+s6VbGLeMj+4FFxNVXwVTdKZOpxQHKVYz8KqxIUQAenrUX/2ZYj4naqSduL+mTNqLovCNew== X-Received: by 2002:a05:622a:1756:: with SMTP id l22mr5203569qtk.280.1628182093920; Thu, 05 Aug 2021 09:48:13 -0700 (PDT) Received: from raisin ([2607:fad8:4:6:235e:8579:8464:aacc]) by smtp.gmail.com with ESMTPSA id g24sm2449741qtr.86.2021.08.05.09.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 09:48:13 -0700 (PDT) From: Maxim Cournoyer References: <87wnylhll7.fsf@systemreboot.net> <87mtpwmv71.fsf@gmail.com> Date: Thu, 05 Aug 2021 12:48:12 -0400 In-Reply-To: (Efraim Flashner's message of "Thu, 5 Aug 2021 11:00:51 +0300") Message-ID: <87bl6b96sz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44678-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628182151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=trV+2/fQQM3BmXTnDSLxM6PhnYECcFKn64KjrCtzqWU=; b=h+d6Ovm+6hDaYTcMjDLSsuZhlRWCwq87D/O01toAI7YvpnVfmoszOdwPaa2c1uKXcEMD/j sLPmEtl7kbHzxzefNSiqnRo/AQrNig+QPCgHNPzaeRdPD0OxZyj/aX5QSXGWcmL8P7pDDT bByUPclYgiOgv+iICC2gcL8YgwfPtGF/HxFIBCRhKJuTSDELMXntN02iqop1LpDt24Uplj zjcQTsL1PjirIzcXzLscTeB7yvob6AnNU4QWxRiYg5u0LuFss3ZEB4eNw/pnGCNmMz04No GIf2dkkclm2b6QiWmgiL/XsC5Rdin8gT3SJGxU5r5lg7HziNsm0B3j1TFLVIsA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628182151; a=rsa-sha256; cv=none; b=NkKhVXKU0FZCad94pkKhTdsuUda4DGPBkTX9pDMNpAUDdYgURpJEpJIrapitmGi+kNpc8N DfMLip2qidfOC7LaB60jPl3KtgRlTv5A2AldZlFkDqp/wUyJ6ORPD2q/laHlJjjvUKVN8D 2pq1yob4YYw2EP+Oq2jkWMftXLcynERYp1NIFd+PHYWD5ugPiC1NDWl6tzn5TJMhiDgueE fkpz/hxotiPq95cE6iuIFSxnleDd2BD4DGoeZB8vewN/3Nyab/glnASwFavNLrOKrVCbl9 1ZXYY88nltgi0e8EFA3L5ALmtYrl94Id/5dA6P9b5P+aIugoNnLjlm5P4VhWSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=jX5YxnR+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=jX5YxnR+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 506972EEBE X-Spam-Score: -1.32 X-Migadu-Scanner: scn1.migadu.com X-TUID: s61iKB/UZgC0 Hello, Efraim Flashner writes: > On Wed, Aug 04, 2021 at 11:22:58PM -0400, Maxim Cournoyer wrote: >> Hi Arun, >> >> Arun Isaac writes: >> >> > Hi, >> > >> > Many sites---jitsi among many others---don't work properly when they see >> > an Icecat user agent. Instead, when the user agent is set to a Firefox >> > user agent, these sites work as expected. Users can do this manually by >> > installing user agent switching extensions such as uaswitcher, but it >> > would be much better if our Icecat package, by default, came with a >> > Firefox user agent, and everything worked normally without any user >> > intervention. >> > >> > This bug report arose out of a discussion on help-guix. See >> > https://lists.gnu.org/archive/html/help-guix/2020-11/msg00082.html >> > >> > I would normally volunteer a patch, but building Icecat takes too long >> > (> 24 hours) on my slow computer. It would be nice if someone with a >> > faster build machine handled this. >> >> I thought the default user agent was already that of Firefox for Windows >> (!), purportedly to make it less unique (thus making fingerprinting of >> browsers/users more difficult). >> >> Isn't it the case? I changed mine long ago so I don't remember (to >> please some broken site). >> >> Thank you, >> >> Maxim > > I remember a discussion forever ago about making the User-Agent Guix > specific but we ended up not going that way in order to try to provide > more anonymity. I don't believe I've changed my user agent ever, and > here's what I'm told mine is: > > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 > > If you want to experiment with it you can send a patch (and tag me) and > I'll build icecat locally and check it out and let you know how it goes. > Icecat builds fairly quickly for me. Thanks for the information. I got curious and did some archeology in the gnuzilla repository [0] and found the commit that made Windows NT user agent string go away: --8<---------------cut here---------------start------------->8--- a25c630a21d78be6515648d8d65cf13fb633c3b5 Author: Ruben Rodriguez AuthorDate: Thu Sep 13 20:47:06 2018 -0400 Commit: Ruben Rodriguez CommitDate: Thu Sep 13 21:02:13 2018 -0400 Parent: f70c9f0 Some customizations to the UI Contained: master Follows: v52.1.0 (21) Precedes: v60.2.0 (3) Preserve Firefox as UserAgent 1 file changed, 8 insertions(+), 2 deletions(-) makeicecat | 10 ++++++++-- modified makeicecat @@ -405,6 +405,11 @@ sed 's/mozilla-bin/icecat-bin/' -i build/unix/run-mozilla.sh find -type f | grep run-mozilla | xargs prename s/mozilla/icecat/ +# do not alter useragent/platform/oscpu/etc with fingerprinting countermeasure, it makes things worse +sed '/ShouldResistFingerprinting/,/}/s/^/\/\//' -i ./netwerk/protocol/http/nsHttpHandler.cpp +sed '/If fingerprinting resistance is on/,/}/s/^/\/\//' -i ./dom/base/Navigator.cpp + +# Leave user agent as Firefox sed "/MOZILLA_UAVERSION/ s:IceCat/:Firefox/:" -i netwerk/protocol/http/nsHttpHandler.cpp find . -name region.properties |xargs -i /bin/sed 's_https://www.mibbit.*__' -i {} @@ -421,9 +426,9 @@ cat << EOF >> browser/app/profile/icecat.js // Set useragent to Firefox compatible //pref("general.useragent.compatMode.firefox",true); // Spoof the useragent to a generic one -pref("general.useragent.compatMode.firefox",true); +//pref("general.useragent.compatMode.icecat",true); // Spoof the useragent to a generic one -pref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:${FFMAJOR}.0) Gecko/20100101 Firefox/${FFMAJOR}.0"); +//pref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:${FFMAJOR}.0) Gecko/20100101 Firefox/${FFMAJOR}.0"); pref("general.appname.override", "Netscape"); pref("general.appversion.override", "${FFMAJOR}.0"); pref("general.buildID.override", "Gecko/20100101"); @@ -433,6 +438,7 @@ EOF cat << EOF >> browser/confvars.sh # IceCat settings +MOZ_APP_UA_NAME=IceCat MOZ_APP_VENDOR=GNU MOZ_APP_VERSION=$FFVERSION MOZ_APP_PROFILE=mozilla/icecat --8<---------------cut here---------------end--------------->8--- Closing. Thanks, Maxim [0] git://git.savannah.gnu.org/gnuzilla.git