All Projects → AdguardTeam → Adguardforsafari

AdguardTeam / Adguardforsafari

Licence: gpl-3.0
AdGuard for Safari app extension

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Adguardforsafari

Stay
Stay is a local userscript manager and an extension sample for Safari on iOS/iPadOS.
Stars: ✭ 672 (+23.53%)
Mutual labels:  safari-extension, safari, adblock
Ublock
uBlock: a fast, lightweight, and lean blocker for Chrome, Firefox, and Safari.
Stars: ✭ 8,075 (+1384.38%)
Mutual labels:  adblock, safari, safari-extension
Adguardforios
The most advanced ad blocker for iOS
Stars: ✭ 812 (+49.26%)
Mutual labels:  adblock, open-source, safari
SponsorBlockSafari
Safari web-extension glue code for SponsorBlock
Stars: ✭ 27 (-95.04%)
Mutual labels:  safari-extension, safari, adblock
Ultratabsaver
The open source Tab Manager Extension for Safari.
Stars: ✭ 178 (-67.28%)
Mutual labels:  open-source, safari, safari-extension
Safari Extensions
Awesome Safari extensions
Stars: ✭ 252 (-53.68%)
Mutual labels:  safari, safari-extension
Blockparty
Ad Blocker App for iOS, macOS
Stars: ✭ 722 (+32.72%)
Mutual labels:  adblock, safari-extension
Adguardfilters
AdGuard Content Blocking Filters
Stars: ✭ 915 (+68.2%)
Mutual labels:  adblock, open-source
Adguardbrowserextension
AdGuard browser extension
Stars: ✭ 1,018 (+87.13%)
Mutual labels:  adblock, open-source
snoozz-tab-snoozing
A Web Extension to declutter windows by snoozing tabs for later
Stars: ✭ 105 (-80.7%)
Mutual labels:  safari-extension, safari
session-buddy
An ultra-light Safari extension helps you save open tabs as collections that can be easily restored later
Stars: ✭ 108 (-80.15%)
Mutual labels:  safari-extension, safari
github-toc
📖 Browser extension that adds a table of contents to GitHub repos, wikis and gists.
Stars: ✭ 71 (-86.95%)
Mutual labels:  safari-extension, safari
Select Like A Boss For Safari
Extension for Safari that allows you to select text inside links.
Stars: ✭ 30 (-94.49%)
Mutual labels:  safari, safari-extension
Userscripts
An open-source userscript editor for Safari
Stars: ✭ 261 (-52.02%)
Mutual labels:  safari, safari-extension
GithubTower
This browser extension allows you to use Github's "Clone in Desktop" button with Tower
Stars: ✭ 48 (-91.18%)
Mutual labels:  safari-extension, safari
xcloud-keyboard-mouse
Chrome extension for controlling Xbox Cloud Gaming (Project xCloud) using a keyboard and mouse
Stars: ✭ 78 (-85.66%)
Mutual labels:  safari-extension, safari
Polyglot
🌏 The missing Safari extension that translates selected text into your native language.
Stars: ✭ 387 (-28.86%)
Mutual labels:  safari, safari-extension
Wellcommerce
Open-source E-Commerce software
Stars: ✭ 499 (-8.27%)
Mutual labels:  open-source
Bpmn Engine
BPMN 2.0 execution engine. Open source javascript workflow engine.
Stars: ✭ 519 (-4.6%)
Mutual labels:  open-source
Instantsearch Ios
⚡️ A library of widgets and helpers to build instant-search applications on iOS.
Stars: ✭ 498 (-8.46%)
Mutual labels:  open-source

 

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 Latest beta



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 12.2 or above
  • Xcode Command Line Tools
  • Node.js v13.10.0 or higher
  • Yarn
  • JQ

Also, you need to install these packages globally:

yarn global add electron-packager 
yarn global add node-gyp 
yarn global add electron-osx-sign

How to build

To run application in development mode

cd ElectronMainApp

Install local dependencies by running:

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

Preparing and building Adguard.

Environment requirements

  • MacOS 10.14.4+
  • Xcode 10.2+
  • Dev account on developer.apple.com and Adguard Software Limited membership, enabled App Store Connect
  • Certificates Developer ID Application: Adguard Software Limited (TC3Q7MAJXF) and Developer ID Installer: Adguard Software Limited (TC3Q7MAJXF) in keychain

Check certificates names in Scripts/ExportOptions.plist

Building

SafariConverterLib dependency

For converting rules to content-blocker format we use an external library as a binary built from https://github.com/AdguardTeam/SafariConverterLib/, that ConverterTool binary should be placed in ./libs/.

You use ./Scripts/download-lib.sh to download the latest release version of that binary from Github.

Preparation - notarization

In case we need to notarize the app, we will need to do it.

Register in App Connect and create a password for altool.

"Because App Store Connect now requires two-factor authentication (2FA) on all accounts, you must create an app-specific password for altool, as described in Using app-specific passwords. To avoid including your password as cleartext in a script, you can provide a reference to a keychain item, as shown in the previous example. This assumes the keychain holds a keychain item named altool_access with an account value matching the username [email protected]. Note that altool can’t access your iCloud keychain for security reasons, so the item must be in your login keychain. You can add a new keychain item using the Keychain Access app, or from the command line using the security utility:

security add-generic-password -a "[email protected]" -w <secret_password> -s "altool_access"

Create Scripts/.devconfig.json with created username and keychain item.

Common issues

https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution/resolving_common_notarization_issues

Use fixed electron-osx-sign

npm install -g electron-userland/electron-osx-sign#timestamp-server

How to release standalone builds

  • update version package.json and AdGuard/standalone.xcconfig or AdGuard/standalone-beta.xcconfig
  • build apps
  • notarize builds
  • publish release on Github
  • refresh updates/updates.json and release.json in gh-pages branch

Build application

./build.sh <channel> [--notarize=0]

Arguments:

  • <channel> -- updates channel:
    • mas -- Mac App Store
    • beta -- standalone beta
    • release -- standalone release
  • [--notarize=0] -- optional parameter to skip notarization

Output directory build contains:

  • Adguard for Safari.app -- signed and notarized app.
  • Adguard for Safari.app.zip -- zip of signed and notarized app.
  • Adguard for Safari.xcarchive -- app archive.
  • Adguard for Safari.xcarchive.zip -- zip of app archive
  • version.txt -- version info (CI requirement).
  • updates.json -- json file with updates info.
  • release.json -- json file with updates info.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].