Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block/redirect before a request is about to occur to *.translate.goog proxy #2

Open
lnoss opened this issue Dec 19, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@lnoss
Copy link
Owner

lnoss commented Dec 19, 2023

Context

In the Chromium world, Google search results can be auto translated and that's all. The span button is there to reverse the translation. But in Firefox... Google Search is MiTMing the results by rewriting the URLs to use their Google Translate proxy, without notice.

I don't know why, but this difference in behavior is the umpteenth discrimination to be added to the user agent's list of abuses.

Current application

Currently the extension still loads their proxied content for a second in order to be able to get the window.document.baseURI value.

Solution

One solution would be to block any request to *.translate.goog and redirect to the original URL. The problem is that the Firefox extension is based on the top of Manifest v2, and the Chromium ones on the of Manifest v3.

Need to chose between:

  1. Testing and trying to build a firefox-mv3 extension with the same base code for every browser ;
  2. Playing around with old Manifest v2 usages and deadcode eliminate unnecessary parts for each browser family when building packages.

The first solution is the most elegant and long term, but the second one could save me from the unexpected, cause I'm not sure about the differences in support between the two versions.

Documentation

Manifest V3 became generally available in Firefox 109.

At the present time, the Wikimedia Foundation User Agent Breakdowns states that Firefox has 3.3% share of the market (sad)... and 99 % of the Firefox user base is using ≥ Firefox 115.

@lnoss lnoss added the enhancement New feature or request label Dec 19, 2023
@lnoss lnoss assigned lnoss and unassigned lnoss Dec 19, 2023
@lnoss
Copy link
Owner Author

lnoss commented Dec 20, 2023

I think that I am not going to work it until june 2024 (new MV2 deadline from Google ; who knows what could change on the APIs until). If you are using Google Search, you don't really care about loading proxied content for a second before the direction. The likelihood of someone sharing a Google Translate proxy link with you directly remains low, and at worst would be a conscious choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant