tarampampam / random-user-agent

😎 Browser extension that automatically replaces the User-Agent with a randomized one
https://random-user-agent.com
MIT License
570 stars 74 forks source link

Random `Accept-Language` and `Accept` headers #434

Open tobyink opened 1 year ago

tobyink commented 1 year ago

Is there an existing issue for this?

Describe the problem to be solved

There are probably a number of different reasons people use this plugin, but for many it will be to avoid browser fingerprinting. Sites can create a hash of a user's User-Agent and various other HTTP headers, along with values discovered from Javascript, such as screen width, and use the hash to uniquely identify a user.

Varying the User-Agent header is a way to combat this.

But it would be nice to also be able to vary some other headers. For example, all my HTTP requests include:

Accept-Language: en-GB,en;q=0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8

Changing or removing existing values from these lists can break sites, but adding random additional values with very low "q" scores should keep sites working while confounding efforts to fingerprint users.

For example:

Accept-Language: en-GB,en;q=0.5,fr;q=0.01,de;q=0.01
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8,application/x-f7gt8gjg;q=0.01

Suggest a solution

Add checkboxes to the preferences allowing these headers to be randomized. The browser's genuine Accept-Language and Accept headers would be appended to, so the original values remain.

Accept-Language should have one or two additional valid ISO language codes included with q=0.01. As an additional level of randomness, q=0.02 and q=0.03 could be used occasionally.

Accept should have a random application/x-foo media type included with q=0.01, where foo is a random alphanumeric string. As additional levels of randomness, a second dummy media type could occasionally be included, and q=0.02 and q=0.03 could be used.

These would be randomized on the same schedule as the User-Agent string.

Additional context

https://amiunique.org/fp

tarampampam commented 4 months ago

I think this request is a bit out of the scope of this extension, what do you think? And sorry for the delayed response, my bad :(

Wuemeli commented 3 months ago

You could add it as an option