Giter Site home page Giter Site logo

haxine / adguardforsafari Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adguardteam/adguardforsafari

0.0 1.0 0.0 7.67 MB

AdGuard for Safari app extension

License: GNU General Public License v3.0

Objective-C 23.58% JavaScript 70.45% Shell 0.51% Python 0.37% Objective-C++ 0.93% CSS 2.96% HTML 1.02% C 0.19%

adguardforsafari's Introduction

ย 

AdGuard for Safari

The most advanced ad blocking extension for Safari

Free and open source, highly customizable and lightning fast ad blocking extension.

AdGuard.com | Reddit | Twitter | Telegram

Download on the AppStore Latest release



AdGuard for Safari

Ad blocking extensions for Safari are having hard time since Apple started to force everyone to use the new SDK. AdGuard extension is supposed to bring back the high quality ad blocking back to Safari.

Unlike other major ad blockers, AdGuard provides some extra features you are used to have with the traditional (now deprecated) extensions:

  • Managing protection from Safari
  • Choose among popular filter subscription
  • Custom filters
  • Creating your own filtering rules
  • Manual blocking tool
  • Whitelisting websites

AdGuard for Safari is based on the Safari native content blocking API, which makes it lightning fast, but somewhat limited in capabilities. For instance, Safari limits the number of rules a content blocker can have.

Better yet, there is a full-fledged AdGuard for Mac

With all above said, there is a solution that is even more effective than AG Safari extension. I mean, of course, AdGuard for Mac. It can:

  • filter your traffic in all browsers and apps on your Mac
  • have an unlimited number of filter rules
  • provide a better filtering quality (due to the lack of browser API restrictions)

You can try it out for free.

How to build AdGuard for Safari

AdGuard for Safari consists of three parts:

  • An Electron application.
  • Safari Content Blocker extension
  • Safari Toolbar icon extension

Prerequisites

  • MacOS 10.13 or above
  • Xcode 9.4 or above
  • Xcode Command Line Tools
  • Node.js v8.9.4 or higher
  • Yarn

Also, you need to install these packages globally:

npm install -g electron-packager 
npm install -g node-gyp 
npm install -g electron-osx-sign

How to build

To run application in development mode

cd ElectronMainApp

Install local dependencies by runnning:

yarn install

How to debug the app

Debug window

Launch the application via:

yarn start

Open menu View -> Toggle Developer Tools

Debug main process

Launch the application via

yarn inspect

Open URI chrome://inspect in Chromium

Then add a network target localhost:5858 via button "Configure" and select this target below.

Build and run in production mode

Replace the following line in file ./AdGuard/Config.xcconfig

AG_SIGN = <YOUR APPLE DEVELOPER COMMON NAME>

where <YOUR APPLE DEVELOPER COMMON NAME> is your codesign identity

Make sure your system Nodejs version higher v8.9.4.

Steps to check it: if you use nvm run

nvm use system
node -v

otherwise

node -v

Open AdGuard.xcworkspace in Xcode and run building project

How to run tests

cd ElectronMainApp
yarn test

How to update translations

Before updating translations you need to install dependencies.

To do this, you can build project in xCode or run the following commands:

cd ElectronMainApp
yarn install

Create directory private in the root of the project and put file oneskyapp.json in it.

Example of oneskyapp.json

{
    "url": "https://platform.api.onesky.io/1/projects/",
    "projectId": <PROJECT ID>,
    "apiKey": <API KEY>,
    "secretKey": <SECRET KEY>
}

Exporting translations

sh SupportingScripts/localizations/export.sh .

Importing translations

sh SupportingScripts/localizations/import.sh .

Change . to path to your project if you not in the root.

adguardforsafari's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.