https-everywhere icon indicating copy to clipboard operation
https-everywhere copied to clipboard

Safari Support (new safari API)

Open jellyfishcoder opened this issue 10 years ago • 47 comments

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.

jellyfishcoder avatar Jun 14 '16 15:06 jellyfishcoder

Is this also for iOS Safari?

J0WI avatar Jun 23 '16 12:06 J0WI

@J0WI, not yet, still only content blockers for ios, but it looks like extensions may be a future possibility.

jellyfishcoder avatar Jun 23 '16 12:06 jellyfishcoder

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?

heubergen avatar Sep 18 '16 18:09 heubergen

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!

dato avatar Sep 21 '16 18:09 dato

Could we have an answer as to the feasibility of HTTPS Everywhere using this new API?

Saklad5 avatar Nov 15 '16 02:11 Saklad5

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.

Hainish avatar Nov 24 '16 02:11 Hainish

Even just the trivial rulesets would be better than nothing, right?

Saklad5 avatar Nov 25 '16 03:11 Saklad5

Any follow-up on this?

CaioBianchi avatar Dec 23 '16 03:12 CaioBianchi

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. :(

edlebert avatar Dec 30 '16 18:12 edlebert

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

javabean avatar Dec 30 '16 18:12 javabean

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.

edlebert avatar Dec 31 '16 21:12 edlebert

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.

Saklad5 avatar Dec 31 '16 21:12 Saklad5

@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. ;-)

javabean avatar Jan 01 '17 10:01 javabean

Webkit shipped Safari TP21 today: https://webkit.org/blog/7265/release-notes-for-safari-technology-preview-21/

Bugfix (?): https://trac.webkit.org/changeset/209821

CaioBianchi avatar Jan 11 '17 18:01 CaioBianchi

@edlebert do you have an update of this? Perhaps you could post whatever you have now on github?

infused-kim avatar Feb 19 '17 21:02 infused-kim

Any updates on this? Any comments from Apple?

freediverx avatar Mar 24 '17 12:03 freediverx

With the passage of SJ Res 34 today, having Safari support for HTTPS Everywhere is most welcome.

ecliptik avatar Mar 28 '17 22:03 ecliptik

@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 avatar Mar 29 '17 02:03 Saklad5

@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

ecliptik avatar Mar 29 '17 02:03 ecliptik

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.

fuzzy76 avatar Mar 29 '17 07:03 fuzzy76