Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari support #42

Closed
michaelnordmeyer opened this issue Apr 20, 2018 · 7 comments
Closed

Safari support #42

michaelnordmeyer opened this issue Apr 20, 2018 · 7 comments

Comments

@michaelnordmeyer
Copy link

@michaelnordmeyer michaelnordmeyer commented Apr 20, 2018

This code doesn’t have Safari support. Old ghostery versions up to 5.4.11 supported Safari.

Do you have an pointers on how to re-introduce Safari support? Are you interested to get Safari support into this code base at all?

@christophertino
Copy link
Member

@christophertino christophertino commented Apr 23, 2018

Unfortunately, Safari doesn't support the extension standard that we use for Chrome, FF, Edge, etc. On top of that, they deprecated the handler that we use to intercept web requests, in favor of their new Content Blocking format.

Earlier OS X content-blocking methodology used the onbeforeload event and canLoad message. Both those elements have been deprecated. If you provide a content-blocking rules file for your extension you can not access the onbeforeload event and canLoad message. Source

The problem for us with Content Blockers is that they do not have a way to provide feedback to the UI when a filter matches. That means we won't be able to show a list of trackers in Ghostery, like we currently do.

We're most likely going to build a slimmed-down version of Ghostery for Safari with just an on/off switch for Ad Blocking and another for Ghostery privacy protection. It will be a separate open-source project.

@michaelnordmeyer
Copy link
Author

@michaelnordmeyer michaelnordmeyer commented Apr 24, 2018

There was a closed-source iOS Safari content blocker called Peace created by Marco Arment. It used Ghostery as a backend.

After two successful days on the app store, Marco removed it from the app store with consent from Ghostery (see: https://marco.org/2015/09/18/just-doesnt-feel-good and https://marco.org/2015/09/16/peace-content-blocker). After some time he gave the source code to Ghostery, which he mentioned on some podcast. But they never released the source.

I think Safari content blockers on iOS and macOS are about the same. So if you have access to Peace’s source code with a proper license, you could use it for a start.

@christophertino
Copy link
Member

@christophertino christophertino commented Apr 24, 2018

I remember the Peace app, that was a crazy couple of days. To your point, we are currently in the process of building a new Ghostery iOS app using content blockers. It's based on the Firefox code base. You can see that code here.

The tentative release date for this and a similar Android app is early June. So far we've had success getting the Ghostery tracker list to display in iOS using content blockers.

@dwaite
Copy link

@dwaite dwaite commented Jul 24, 2018

@christophertino Is that the correct codebase? I didn't see mention of SFContentBlockerManager in the code; instead it looks like it is doing script injection by wrapping WebKit.

@christophertino
Copy link
Member

@christophertino christophertino commented Jul 31, 2018

@dwaite yes, that is the working repository for the new Ghostery iOS browser. Our devs came up with a way to use the Content Blocker but still allow users to see the Ghostery tracker list, which is of course our major feature. If you'd like more info feel free to open an issue on that repo and they'll be happy to help. We're also looking for Test Flight testers if you're interested.

cc: @naira-cliqz

@naira-cliqz
Copy link

@naira-cliqz naira-cliqz commented Aug 2, 2018

@dwaite SFContentBlockerManager is for MacOS, for iOS content blocker works based on WKContentRuleList, which we use. Added UserScripts are for another reason, not for contentBlocking. New Safari extension with SFContentBlockerManager is coming soon :)

@christophertino
Copy link
Member

@christophertino christophertino commented Aug 22, 2019

The Ghostery Lite app extension source code for Safari is available here:

https://github.com/ghostery/GhosterySafari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants