Safari Support (new safari API)
The new safari API seems like it may support https-everywhere. https://developer.apple.com/library/prerelease/content/documentation/NetworkingInternetWeb/Conceptual/SafariAppExtension_PG/index.html#//apple_ref/doc/uid/TP40017319 is the documentation. It is currently for the new safari 10 in macOS Sierra. I believe it may allow for an extension to rewrite HTTP requests as HTTPS, but Im not completely sure.
Is this also for iOS Safari?
@J0WI, not yet, still only content blockers for ios, but it looks like extensions may be a future possibility.
As far as I understand, the functionality could be done now under iOS with the make-https action as noticed here. Can we have any comment from the devs about that?
In particular, the above linked What’s New in Safair 10.0 says:
The make-https action is now available for iOS content blockers.
Just above that, it also says:
You can now create macOS-native Safari app extensions to sell and distribute in the App Store. Content Blockers for iOS can be easily ported to macOS. [Emphasis mine.]
Thanks in advance for investigating!
Could we have an answer as to the feasibility of HTTPS Everywhere using this new API?
Related, this from email to our [email protected]:
I’m contacting you about your HTTPS Everywhere extension. You wrote in your FAQ : « if you happen to know a way to perform secure request rewriting in [Safari], feel free to let us know »
Well, there is now a way. In May 2016, Safari Content Blocking API has been improved to be able to force HTTPS when available. It was then tested in Safari Developer Preview. Eventually, the feature became available to everyone in Safari 10 (iOS and macOS).
Here is the webkit thread : https://bugs.webkit.org/show_bug.cgi?id=148966
Apple mentions the « make-https » action in Safari 10 at the bottom of this page : https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html
Have you tried this ? Are you planning on a Safari version of HTTPS everywhere ?
So it seems the answer is that it seems possible for at least the trivial rulesets. I'd have to investigate if it is possible for more complicated rulesets.
Even just the trivial rulesets would be better than nothing, right?
Any follow-up on this?
I tried to get a safari extension built with the new content-blocker action, but I have never tried to build a safari extension before and I could not get it to work. :(
Should you want to play with a Safari Content Blocker Extension, you may want to start with the simple, no-frill https://github.com/krishkumar/BlockParty
A more advanced one (and probably overkill for research): https://github.com/AdguardTeam/AdguardForiOS
I have it working locally. There are some other limitations: 1) New safari extensions need to be packaged with a native app, and I don't have that working yet. 2) This will only work with simple rules. It will not work for rewriting to different hosts, which is pretty common in HTTPS Everywhere. 3) It does nothing for secure cookies. 4) I don't have a developer account so my local extension cannot be distributed. But once I get a download-and-install version working I'll put up a github project for everyone.
Thanks for the attempt, despite the caveats.
I really wish Apple would just implement such functionality themselves if they aren’t willing to open up the API enough. This sort of feature is helpful for literally anyone using Safari, and Apple could easily fork HTTPS Everywhere and do this themselves.
@edlebert @Saklad5 you should probably create 2 issues (one for the redirection rules, one for the secure cookies) at https://bugreport.apple.com to let Apple know of the required functionality. It doesn't mean they will abide by your request, but at least they will know there is a functional need. ;-)
Webkit shipped Safari TP21 today: https://webkit.org/blog/7265/release-notes-for-safari-technology-preview-21/
Bugfix (?): https://trac.webkit.org/changeset/209821
@edlebert do you have an update of this? Perhaps you could post whatever you have now on github?
Any updates on this? Any comments from Apple?
With the passage of SJ Res 34 today, having Safari support for HTTPS Everywhere is most welcome.
@ecliptik Um, that was a few days ago, and isn’t binding until the House of Representatives passes it. However, since both chambers are apparently mostly comprised of people that are dangerously and inexcusably ignorant when it comes to technological security and privacy, your point is valid.
HTTPS won’t stop ISPs from monitoring what webpages you visit, though. For that, a VPN or proxy like Tor is necessary as well. macOS is very good at handling system-wide SOCKS proxies, so this isn’t too difficult. Homebrew makes it even easier to go that route.
@saklad5 it was voted on in the house today, all that's left is for the president to sign it into law,
https//www.eff.org/deeplinks/2017/03/congress-sides-cable-and-telephone-industry
The EFF warns about broken encryption due with ISPs using Explicit Trust Proxies for MiTM attacks with it, we could use all the help we could get right now,
https//www.eff.org/deeplinks/2017/03/five-ways-cybersecurity-will-suffer-if-congress-repeals-fcc-privacy-rules
AFAIK, deep packet inspection is way too much work for ISPs just for tracking users (the volume of packets is too high). So they probably stick to tracking DNS lookups, which HTTPS does not prevent. Changing DNS-server probably helps though. Just don't change to another provider that already sells your data, like the worlds largest advertising company or something.