1

I'm using the Privoxy proxy on my PC.

What is the rewrite rule in the user.action file to rewrite e.g.: http://foo.org to https://foo.org? Note that I want to rewrite, not redirect.

So if I search google for foo.org then on the search page there would be https://foo.org.

Would the rewrite work on e.g.: https://encrypted.google.com/?

Or is redirecting better because there could be e.g.: <img src="foo.org/pic.jpg"></img>?

slm
  • 363,520
  • 117
  • 767
  • 871
LanceBaynes
  • 39,295
  • 97
  • 250
  • 349
  • You may also want to consider (instead) using this on your clients: https://www.eff.org/https-everywhere – mattdm Mar 14 '11 at 19:10

1 Answers1

3

The reason why you need to redirect that URL rather than rewrite is because you are visiting an unencrypted web page with the http:// (plaintext) URL, and the proxy needs to tell the browser to talk to the https:// URL. If the connection was simply redirected at the SSL port, your browser wouldn't know what to do with an SSL response if it were somehow directed to the secure port using the HTTP protocol. (Sadly, I'm not sure if anyone uses http-starttls, which should be able to handle that, but that's a separate question)

By using a redirect, the proxy uses HTTP return codes to tell the browser to open a new connection, using HTTPS instead of HTTP.

jsbillings
  • 24,006
  • 6
  • 56
  • 58
  • So the safest method would be the redirect: http://pastebin.mozilla.org/1164461 ? [in the user.action] ok! Thank you!! – LanceBaynes Mar 15 '11 at 10:12