Feature #9466
Check how FoxyProxy injects content to the Firefox error pages
100%
Description
In the “The proxy server is refusing connections” page FoxyProxy injects something like an ad: “Consider using fast and reliable proxy servers from FoxyProxy. (Hint: Please disable your current proxy if you get this error page while trying to load FoxyProxy’s proxy service website)”
Let’s see how it’s done, and if we can use the same method to add a useful message to the “Unable to connect” page shown when trying to access LAN in the Tor Browser. Bonus points if the message is only shown when trying to access the LAN instead of all the time.
Subtasks
History
#1 Updated by anonym 2015-05-26 08:49:16
- Description updated
#2 Updated by anonym 2015-05-26 10:21:14
- Status changed from Confirmed to Resolved
- Assignee deleted (
anonym) - % Done changed from 0 to 100
For FoxyProxy’s method, see src/content/overlay.js
, the errorPageCheck
function. Note that whatever message we want added can be translated!
So if we want to do this we should instead of about:neterror?e=proxyConnectFailure
modify the page for about:neterror?e=connectionFailure
. We could even look further in the URI for the destination and look if it’s a LAN address and only add the message in that case. For reference, this is the full URI I got when trying to open 10.1.1.1
(without prefixing it with http://
) in Tor Browser:
about:neterror?e=connectionFailure&u=http%3A//10.1.1.1/&c=UTF-8&f=regular&d=Firefox%20can%27t%20establish%20a%20connection%20to%20the%20server%20at%2010.1.1.1.
(To see it yourself, open the Developer Tools -> Console -> window.content.document.documentURI
)