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

[tor-talk] Firefox on Android - phony modification



Hi!

i was playing around with tor and firefox on android. I was following
https://guardianproject.info/apps/firefoxprivacy/ and installed all
mentioned extensions. Unfortunately when i visited EFF's panopticlick i
realized that could be tracked by browser headers since the phony
extension is quite outdated and sends a FF 19 header (or something).

I modified phony in order to mimic current tor browser which worked nice
for the user agent but not for http accept header.

Any ideas how to resolve this?
I'll attach the code and the modified phony xpi.

Best,
Michael

bootstrap.js from phony
=========
...
const prefName = "general.useragent.override";
const prefName_accept_def = "network.http.accept.default";
const prefName_accept = "network.http.accept";
// http accept header for tor browser 28
const http_accept_header =
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 gzip,
deflate en-us,en;q=0.5";
let gWin;

function isNativeUI() {
  let appInfo =
Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
  return (appInfo.ID == "{aa3c5121-dab2-40e2-81ca-7ea25febc110}");
}

let Phony = {
  set useragent(value) {
    if (value){
      Services.prefs.setCharPref(prefName, value);
      Services.prefs.setCharPref(prefName_accept, http_accept_header);
      Services.prefs.setCharPref(prefName_accept_def, http_accept_header);
    }
    else if (Services.prefs.prefHasUserValue(prefName)){
      Services.prefs.clearUserPref(prefName);
      Services.prefs.clearUserPref(prefName_accept);
      Services.prefs.clearUserPref(prefName_accept_def);
    }
  },
...
========

and

========
...
let uas = [
  ["Default", ""],
  ["Tor Browser 24", "Mozilla/5.0 (Windows NT 6.1; rv:24.0)
Gecko/20100101 Firefox/24.0"]
];
....
=====

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
tor-talk mailing list - tor-talk@xxxxxxxxxxxxxxxxxxxx
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk