foxyproxy / browser-extension

Version 8 and above. Browser extension source code for Firefox, Chrome, and other Chromium-based browsers
GNU General Public License v2.0
199 stars 29 forks source link

Add an option to spoof timezone in tabs where proxy is enabled [feature request] #90

Closed selivan closed 6 months ago

selivan commented 6 months ago

Some sites detect using proxy by comparing browser timezone and IP geolocation. Indeed, Astana timezone with Netherlands IP address looks suspicious.

I suggest to add on option to proxy configuration: spoof timezone to given one in tabs, where tab URL matches proxy pattern, or if the proxy is enabled globally.

Extensions spoofing timezone exist for both Firefox and Chrome, so it should be doable.

erosman commented 6 months ago

Spoofing timezone in Tabs is achieved by injecting a script into the page and run some JavaScript. A userscript can perform a similar action.

Dealing with the content of a page is beyond the scope of a proxying extension which deals with the web request before it reaches a tab.

selivan commented 6 months ago

@erosman I agree, this is beyond a scope of proxying extension. But it would be really useful for people, who use FoxyProxy in conjunction with other tools to circumvent censorship.

erosman commented 6 months ago

There are other considerations.

Many sites prevent injection of scripts into their page by extensions. Any site that is interested in identifying users, would probably do that. Therefore, such feature will not work in those sites.

There is vytal-extension which works without injecting a script but that does not work in Firefox.

MasterKia commented 6 months ago

Many sites prevent injection of scripts into their page by extensions.

CSP does not affect extensions. On Firefox you can reliably inject scripts using blob: -- https://github.com/uBlockOrigin/uBlock-issues/issues/235#issuecomment-1344313926.

erosman commented 6 months ago

In MV2, CSP affects extension content scripts and API. There are talks about changes in MV3.

See also:

selivan commented 6 months ago

There is vytal-extension which works without injecting a script but that does not work in Firefox.

Thank you, I'll look into it. Shame it doesn't work on Firefox.