claustromaniac / httpz

Fat-free hardenable opportunistic encryption for Firefox
https://addons.mozilla.org/firefox/addon/httpz/
GNU General Public License v3.0
62 stars 5 forks source link

handle gateway/proxy errors #33

Closed claustromaniac closed 5 years ago

claustromaniac commented 5 years ago

HTTPZ does not currently treat gateway errors as errors, but this would be of use in some scenarios. I want to do one of two things. Either:

  1. allow users to specify that they are behind a forward proxy, via a checkbox in the options, or...
  2. check the browser's proxy settings and act accordingly

1 requires user interaction, but 2 is useless to users behind transparent proxies routing traffic at the OS level or in the local network, etc. 1 sounds like a better idea.

Madis0 commented 5 years ago

What if you check the browser's proxy settings first to set the checkbox value and then the user can disable (or enable) it if they are using a different method.

claustromaniac commented 5 years ago

Yeah, I thought that too. I also considered adding a third option (enabled, disabled, auto) and make the auto one the default, but I prefer to leave just enabled and disabled (a checkbox) because not all proxies will necessarily send back a standard response when such errors happen (depends on the implementation) and even when they respond with status codes 502 or 504, HTTPZ does not have any way to determine if the one who sent that response was a forward proxy or a reverse proxy. So, I prefer to leave that decision to users entirely.