Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rokibhasansagar/f1cdca38d46ea79b350da0706a888748 to your computer and use it in GitHub Desktop.
Save rokibhasansagar/f1cdca38d46ea79b350da0706a888748 to your computer and use it in GitHub Desktop.

[AIO] Ultimate AdBlocking+AdBypassing Guide (Firefox/Chrome/Brave - Windows/Linux)

Last Updated: September 12, 2023

Why We Need To Block Ads From Internet?

The Internet is a vast space of infinite knowledge. We can store and access those knowledge, those data from everywhere and from any device. We just need to use correct words or phrases to find them. But often what we get is not exactly Safe to See, it's not annoyance-free.

That's why we need to filter out the annoyance and bad things. That's why we use Ad-Blockers.

Although some sites resist the users to use Ad-Blockers because the Site Owners gain revenue from the Ads to Pay their Domain+Hosting Bills.

How Do We Get An Annoyance-Free Better Open Internet For All?

There are two common ways to shut off the annoyance.

  1. Block the known Domains or their IP Addresses through hosts file inclusion.

In Windows, C:\Windows\System32\drivers\etc\hosts or In Linux, /etc/hosts

  1. Use AdBlock Browser Extensions and Userscripts to Block Specific Sites and their Scripts to be loaded inside any Website.

This is the Recommended Method

To do so, you need to follow the bellow steps as exactly as I written. Do not tell me if you can't find a button to press or so.

A Few Not-So-Simple Steps To Get Started With

0. Install Web Browser

  1. If your system is new/fast, and if you use 8GB+ RAM with SSD, I recommend using Chrome-based Browsers.
  2. If your system is old/slow, and if you use 2/4GB RAM with mechanical hard drive and/or Windows 10 or later, I recommend using Firefox.

[Recommended] Method #1, If you are looking for the too easy way

Brave Browser

^ Install Brave Browser. Because as they say, "You deserve a better Internet."

This browser is built upon Google Chrome, but with tons of customization done to make it faster and private. It natively blocks Ads, and you can also earn Brave Attention Token (BAT) as Reward (Now, Only available for Redeeming in Selected Countries Only). Read More on their website. You can install the scripts and filters over Brave Browser for True Ultimate AdBlocking+AdBypassing.

[Recommended] Method #2, By the use of Browser Extensions and AdBlock Filters

A. You need to Install 3 browser extensions

  1. For Firefox, install Greasemonkey, uBlock Origin and FastForward.
  2. For Chrome-based Browsers, install Tampermonkey, uBlock Origin and FastForward.

B. After you install the extensions, you have to install three Userscripts. Usable in either browser.

  1. Anti-Adblock Killer (Script) - A script to outthrow the Anti-Adblock parts from the websites,
  2. AAK-Cont (Script) - An updated form of previous Anti-Adblock Killer Script,
  3. AdsBypasser - To skip countdown ads & prevent ad pop-up.

C. Now, the (really) hard part. You have to add some filters to uBlock Origin which can eleminate specific Ad Domains and Scripts.

  1. Click on the 'uBlock Origin' Icon from the toolbar of your browser's toolbar. Then click the Settings Icon which says 'Open the dashboard' when mouse is hovered.
  2. Go on the "Filter lists" Tab. Scroll down & Tick the [ ] import... checkbox and add these lines bellow:
    https://raw.githubusercontent.com/rokibhasansagar/anti-adblock-killer-fork/master/anti-adblock-killer-filters.txt
    https://raw.githubusercontent.com/rokibhasansagar/AAK-Cont-fork/master/dist/aak-cont-list-ubo.txt
    https://easylist-downloads.adblockplus.org/antiadblockfilters.txt
    
    Click Apply changes.
  3. If you want to block Pornographic Sites in Browsers, Go to Step #C(2) and add the below line (~58K entries) in the [ ] import... section:
    https://raw.githubusercontent.com/ZeoRexDevs/EnergizedProtection-block/master/extensions/porn-lite/formats/filter
    
  4. If you want to block more Annoyance Sites, using an updated tracker, Go to Step #C(2) again and add either one of the below two lines in the [ ] import... section:
    • If your Desktop/PC is old and running on very low CPU/RAM power, add the bellow line (~69K entries) - https://o0.pages.dev/Lite/adblock.txt
    • If your PC is new and have enough CPU/RAM power to simultaniously multitask smoothly, add the below line (~142K entries) - https://o0.pages.dev/Pro/adblock.txt
@VFDan
Copy link

VFDan commented Aug 5, 2019

Amazing! Maybe you can add a site to preview?

@zafira1
Copy link

zafira1 commented May 12, 2020

works perfectly !

@DDL56x
Copy link

DDL56x commented Oct 17, 2020

The developer of Nano Adblocker/Defender has sold both to two as yet obscure techies who apparently live in Turkey earlier this month. The affected browsers are Chrome-Chromium (based). The Firefox fork maintainer for the two still is doing so, but now independently. I don't use the Brave browser, so I don't know if it is affected. There is no longer any extension listing for Nano Defender on the Chrome Store. See announcement linked below:

NanoAdblocker/NanoCore#362

@rokibhasansagar
Copy link
Author

rokibhasansagar commented Oct 18, 2020

@DDL56x, I did Not see that coming! Thanks for the Alert.

I don't use the Brave browser, so I don't know if it is affected.

Well, Brave is overlay-ed Chrome. So yaah, they are now affected.

NanoAdblocker/NanoCore#362

I'll remove those NanoAdblocker parts from the Gist for everybody's sake.

So there might not be any security flaw for the new users who haven't installed them yet.
But I would also recommend everyone to remove NanoAdblocker as-well-as their filters if they use any.

Less filters means less CPU + RAM usage. Besides, Energized Protection filters alone are great at blocking so many unwanted sites.

@DDL56x
Copy link

DDL56x commented Oct 28, 2020

@rokibhasansagar-You're welcome..the only reason that I became aware of what happened was b/c I had his GitHub project on watch and browsed to it that week..then remembered your Gist.

Nano Defender is still available for download in Microsoft's Chromium-based Edge browser from the Microsoft Store with the extension name of Nano Defender Pro. The version currently available (15.0.0.205) was the last before the developer (jspenguin2017) sold his 2 Nano projects. I am going to take a wild guess and post that M$ will not assign anyone from their developer staff to maintain it independently gratis for their Edge browser users. I discovered that two Chromium-based browsers on my *Windows 7 Ultimate OS (Slimjet & Cent) where I had installed Nano Defender were not updated and disabled with the warning that it was now malware.

*Windows 7 x86 & x64 still receive security updates for a fee to business customers, and will for about 2.years and 2.3 months longer, but only will work for home users by using a hack and manual installs.

@VFDan
Copy link

VFDan commented Oct 28, 2020

Note that the Firefox version is still safe.

@DDL56x
Copy link

DDL56x commented Oct 28, 2020

I recommend reading and watching the Firefox Nano Defender addon maintainer/porter LiCybora's comment thread "Future of Nano Project Firefox Port" if you are using that browser, Personally I don't see how he can keep it viable for very long, unless he intends to switch to uBO as its base. BTW...RIP uMatrix, whose red/green block/allow web interface was far better. Basilisk, a browser developed by the Palemoon staff, is like the last legacy Firefox version 52.0.9 that also has uBO and what they named "nMatrix" however no Nano port that I have found in their repository or in the "Classic Addons Archive".

LiCybora/NanoDefenderFirefox#187

@NinjaQuince
Copy link

AAK-Cont (Script) is now hidden by the author. Please change the link.

@rokibhasansagar
Copy link
Author

Guide is Slightly updated as of today.

@ItsProfessional
Copy link

@rokibhasansagar Please do not recommend people to use anti-adblock bypassing userscripts. They conflict with uBlock Origin and only make things worse. Most of the scripts you recommend are also outdated.

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