Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Safari Support (new safari API) #5121

Closed

Description

@jellyfishcoder

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.

Activity

  1. J0WI commented on Jun 23, 2016

    @J0WI
    Contributor

    Is this also for iOS Safari?

  2. jellyfishcoder commented on Jun 23, 2016

    @jellyfishcoder
    Author

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

  3. heubergen commented on Sep 18, 2016

    @heubergen

    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?

  4. dato commented on Sep 21, 2016

    @dato

    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!

  5. Saklad5 commented on Nov 15, 2016

    @Saklad5

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

  6. Hainish commented on Nov 24, 2016

    @Hainish
    Member

    Related, this from email to our info@eff.org:

    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.

  7. Saklad5 commented on Nov 25, 2016

    @Saklad5

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

  8. CaioBianchi commented on Dec 23, 2016

    @CaioBianchi

    Any follow-up on this?

  9. edlebert commented on Dec 30, 2016

    @edlebert

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

  10. javabean commented on Dec 30, 2016

    @javabean

    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

  11. edlebert commented on Dec 31, 2016

    @edlebert

    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.

  12. Saklad5 commented on Dec 31, 2016

    @Saklad5

    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.

  13. javabean commented on Jan 1, 2017

    @javabean

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

  14. CaioBianchi commented on Jan 11, 2017

    @CaioBianchi
  15. 19 remaining items

  16. bouk commented on Nov 3, 2017

    @bouk
    Contributor

    Hi everyone

    I've been working on an iOS app version of HTTPS everywhere. For doing so I've created this script which processes the rulesets to extract a list of hosts that just require a 'simple' redirect: https://gist.github.com/bouk/bc4b1f406c3d4e83d28ade3f1b18a4e0

    This list can then be inserted into a rule like

    [
      {
        "action": {
          "type": "make-https"
        },
        "trigger": {
          "url-filter": ".*",
          "if-domain": [
    "*3cdn.net",
    "*3scale.net",
    etc.
    }
    ]

    Which also supports more than the 50k rule limit, it seems there is no limit on the number in if-domain.

    It would be good to hunt down overly complicated rulesets, essentially everything generated by make-trivial-rule is supported while others can't be guaranteed

  17. Saklad5 commented on Nov 3, 2017

    @Saklad5

    @bouk That’s great! Safari’s content blockers are platform-agnostic as I understand it, so that will work on the Mac too!

  18. Revod commented on Nov 9, 2017

    @Revod

    Any news/updates about this?

  19. Hainish commented on Nov 9, 2017

    @Hainish
    Member

    @Revod unfortunately, after legal review we found the Apple Developer License Agreement contains provisos that EFF is unable to comply with. This is for reasons similar to what we stated in this 2014 blog post.

    We don't want to encourage others to sign the agreement. Third party implementations of HTTPS Everywhere using our rulesets certainly don't run afoul of our licensing of the project, but there's a caveat.

    I'm not a lawyer, but my understanding is that Apple enforces restrictions on redistribution via its Licensing Agreement. So posting the project on the Safari store seems to be a violation of the GPL. So it seems that any contributor who had code merged under the GPL could appeal it's listing in the Safari store. This is an unfortunate outcome of being licensed restrictively, and this has been done in the past.

    So I'm not a licensing expert, but I think if anyone chose to list HTTPS Everywhere in the Safari store it would be on shaky grounds.

  20. bouk commented on Nov 13, 2017

    @bouk
    Contributor

    @Hainish thank you for the reply.

    Since the only part of the of the iOS app that would require GPL licensing is the ruleset, which is essentially just a .txt file with a list of hosts, it might be possible to make that file accessible and redistributable from the app, and license the rest of the app under Mozilla Public License. It seems that this would mean that people can redistribute the GPL-licensed part of the app as much as they want. The question is of course whether that's legally sound, or whether having that list of hosts be GPL-licensed means that the whole app needs to be GPL, which we would need legal advice on.

    I think I will proceed with that plan, and we'll just see what happens.

  21. Hainish commented on Nov 16, 2017

    @Hainish
    Member

    @bouk Something that may be helpful here: the way I understand it, the stipulations of the GPL are such that the restrictiveness only applies to code which is included in the same program. This differs from, say, the AGPL, which extends to network interaction. So here's what may interest you:

    We plan on delivering the rulesets out-of-band of the extension itself, making it available on the web (along with a signature), so that the mainline HTTPS Everywhere extension as well as any third-party can download and apply these rules. If an iOS extension were to be developed, it could pull in the rulesets (which have been pre-compiled and provided on a webserver) at runtime, and not run afoul of the GPL.

  22. Hainish commented on Nov 16, 2017

    @Hainish
    Member

    @Chris1000 unfortunately it won't be in the same format as iOS content blockers.

  23. bouk commented on Nov 21, 2017

    @bouk
    Contributor

    I have a working app now, the source code can be found here: https://github.com/bouk/HTTPS4All
    This is the tool I use to convert the rules into a hosts list: https://github.com/bouk/https-everywhere-host-list. This is the uploaded to https://hosts.https4all.org/hosts.txt, which the app downloads every time it's opened.

    I have a build up on testflight, please email my at the email on my GitHub profile if you would like to give it a shot.

  24. bouk commented on Jan 7, 2018

    @bouk
    Contributor

    Hey everyone, just an update. I’ve released the iOS version, and you can now download it here: https://itunes.apple.com/gb/app/https4all/id1305430042?mt=8

  25. wryanthomas commented on Jan 29, 2018

    @wryanthomas

    Thanks 'bouk'. That's awesome.

    Anyone know of (similar) progress on a Safari for Mac extension?

  26. pipboy96 commented on Mar 26, 2019

    @pipboy96
  27. bouk commented on Mar 26, 2019

    @bouk
  28. pipboy96 commented on Mar 28, 2019

    @pipboy96
    Contributor

    I guess this is ok to close since EFF already said they can't enter a required contract with Apple, and there will be no official version of HTTPS Everywhere for Apple.

  29. fuzzy76 commented on Sep 3, 2020

    @fuzzy76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions