One-Click Ad Blocking Script for VPS

Linux Ad Filtering/Blocking Software — ADbyby One-Click Installation Script

System Requirements

CentOS 6+ / Debian 6+ / Ubuntu 14.04 +

Debian 7
x64 is recommended. This is the system I have always used, and my script has the lowest error rate on this system. It is relatively resource-intensive, so it is recommended for hosts with higher specifications.

Script Version

Ver: 1.0.0

Installation Steps

wget -N --no-check-certificate
https://softs.fun/Bash/adbyby.sh && chmod +x
adbyby.sh && bash adbyby.sh

# If the script above cannot be downloaded, try using the backup download:
wget -N --no-check-certificate
https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/adbyby.sh
&& chmod +x adbyby.sh && bash
adbyby.sh

Instructions

Go to the directory where the script was downloaded and run the script:

./adbyby.sh

Then simply choose the option you want to execute.

  1. Please enter a number to choose an option
  2.  
  3. 1. Install
    ADbyby
  4. 2. Uninstall
    ADbyby
  5. ————————————
  6. 3. Start
    ADbyby
  7. 4. Stop
    ADbyby
  8. 5. Restart
    ADbyby
  9. ————————————
  10. 6. Modify
    the configuration file
  11. ————————————
  12. Current status:
    Installed
    and
    started
  13.  
  14. Please enter a number
    [18]:

 

Other Notes

The ADbyby script supports starting on boot.

The effectiveness of ADbyby’s ad filtering depends on how complete the ad filtering rules are. The default rules are not very comprehensive, so if you want better filtering results, please add ad filtering rule URLs yourself!

Add ad filtering/blocking rule URLs

In the default configuration file, I have already added four URL rules. ADbyby will automatically update them on a schedule. If you want to add or remove these URL rules, you can run the script and then choose option 6 .

Then the configuration file will open. Under the final [exrule] section,
simply add/delete ad filtering URL rules, one per line.

In the script, I use the vim
editor to open the configuration file. After opening it, press the I key to enter edit mode, and then you can make changes (be careful not to use the numeric keypad on the keyboard).

After making changes, press the ESC key to exit edit mode, then enter :wq to save and exit. If you do not want to save, use :q! to force quit without saving.

You can add the following ad filtering rule URLs as needed:
https://easylist-downloads.adblockplus.org/easylistchina.txt
https://easylist.to/easylist/easylist.txt
https://easylist-downloads.adblockplus.org/easyprivacy.txt
https://easylist-downloads.adblockplus.org/malwaredomains_full.txt
https://raw.githubusercontent.com/xinggsf/Adblock-Plus-Rule/master/ABP-FX.txt

If you see errors like wget: unknown host “softs.fun”

This means my domain name cannot be resolved, most likely due to a DNS issue. Please change the DNS to Google DNS (copy the following two lines together
and run them together).

  1. echo e “nameserver 8.8.8.8
  2. nameserver 8.8.4.4″
    >
    /etc/resolv.conf

Error message: wget: command not found

This means your system has been stripped down too much and wget is not installed, so you need to install wget.

  1. # CentOS system:
  2. yum install y
    wget
  3.  
  4. # Debian/Ubuntu system:
  5. aptget install y wget

Upgrade script

To upgrade the script, you only need to download the script file again, and it will automatically overwrite the original file.

Leave a Comment

Your email address will not be published. Required fields are marked *

中文 EN
🚀

RedGate VPN

免费节点太挤太慢?
升级高速稳定专线

立即体验 →

告别卡顿

RedGate VPN
全球高速节点

免费下载 →
Scroll to Top