What's new

AB-Solution 1.05 is out!

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

thelonelycoder

Part of the Furniture
AB-Solution is now Diversion
Please check the Diversion website for latest version and discussion link.

Welcome to AB-Solution Ad-blocking and Dnsmasq logging!


The important part:
Log into your router with an ssh client and enter:
Code:
wget https://raw.githubusercontent.com/decoderman/AB-Solution/master/ab-solution.sh --no-check-certificate
Then start the install / upgrade with:
Code:
sh ab-solution.sh
Make sure you have a USB Stick with ext2, ext3 or ext4 formatted filesystem plugged in your router.
It needs to be permanently plugged in if you install AB-Solution.

You can also download the latest version from GitHub and place the file ab-solution.sh onto a ext2, ext3 or ext4 formatted USB Stick.
Then plug it into the router, open an ssh terminal and start the install with
Code:
sh ab-solution.sh
Your path may be different but for many it is sh /tmp/mnt/sda1/ab-solution.sh
Within a few minutes the installation is finished and ads are blocked.

For more installation instructions see this post.

Release notes:
Bugfixes from Version 1.0:
- Fixed UI date issue when installing without logging
- Changed wording of console output when enabling the logging
- Changed update-hosts day Sunday to be 0 instead of 7

New in this version:
- Sorted out config file link and location, was a mess before
- Detection of previous install improved, detects tampering of files or folders
- Check config against device path (check device has same name after reboot)
- Show white- and blacklist file
- Make backup of manual install files (from a manual install)
- Copy script file from /root/ to adblocking-device
- Additional hosts file type added
- Following the log file: Three verbosity settings
- Upgrade from a previous version (including beta version) runs with fewer questions.

What's with AB-Solution 1.1 and all the promises?
In light of a very recent discovery of how to make an integrated Asuswrt-Merlin GUI version of AB-Solution, I have decided to release version 1.05 instead, without the add-ons.
I have halted development of Add-ons (and more features) for the time being until I have a clear picture of how this exciting new find might turn out.
Stay tuned.

Screenshot of the current version, log verbosity set to blocked domains:

GCXcrxJ.png
 
Last edited:
Last edited:
Last edited:
Worked like a charm. Detected my existing (non-absolution) install, saved it to a backup. Following the log is easy and nifty.

I think the earlier implementations sorted the blocked hosts alphabetically, but this doesn't?
 
I think the earlier implementations sorted the blocked hosts alphabetically, but this doesn't?
I have ditched the sort function. Processing takes too long with a larger file. And people may think the router is hung up when it takes that long to generate it when installing.
 
Just a quick note.. I needed the 666 command from the menu to overwrite the ab-solution 1.0 saved to the pendrive.
 
Just a quick note.. I needed the 666 command from the menu to overwrite the ab-solution 1.0 saved to the pendrive.
Did you have errors during install / upgrade?
You would have gotten a red "AB-Solution install or upgrade failed!" message.
If not, then this is interesting, could you post your install log, it might say why.

Hitting 666 triggers the same function as the install / upgrade runs on line no. 1251 in the script.
 
I have ditched the sort function. Processing takes too long with a larger file. And people may think the router is hung up when it takes that long to generate it when installing.
Perhaps add it as an option in the menu? It can be somewhat convenient when trying to see what domains are in the list and what might need to be blocked/unblocked. If you are running it from the menu, separate from updating you would know the router is busy.
 
@thelonelycoder Hi And thanks for the great work, you working really fast on this proyect, I have an issue with dnscrypt, to have everything clean I placed in the dnsmasq.postconf the 2 lines that make dnscrypt work
When I upgraded they were gone

no-resolv
server=127.0.0.1#65053

Is there a way that I dont have to include them manually or do I have to go the dnsmasq.conf.add route?
Thanks
 
@thelonelycoder Hi And thanks for the great work, you working really fast on this proyect, I have an issue with dnscrypt, to have everything clean I placed in the dnsmasq.postconf the 2 lines that make dnscrypt work
When I upgraded they were gone

no-resolv
server=127.0.0.1#65053

Is there a way that I dont have to include them manually or do I have to go the dnsmasq.conf.add route?
Thanks
You can safely re-add them to the new file. It will not be changed, no matter what you do in AB-Solution.
Out of laziness, I simply make a backup of the file to the backup-dir before it gets overwritten by v1.05+.
Unless you run the uninstaller that comes with the upcoming v1.06...
 
Thanks for the sort! The 6 meg version (191,000 lines) takes about 2 seconds to sort on my 87U. But I like your warning about it taking a while.
 
Did you have errors during install / upgrade?
You would have gotten a red "AB-Solution install or upgrade failed!" message.
If not, then this is interesting, could you post your install log, it might say why.

Hitting 666 triggers the same function as the install / upgrade runs on line no. 1251 in the script.

Sure - same thing happened again with 1.06.

Code:
--------------------------------------------------
  AB-Solution 1.06 installation / upgrade
--------------------------------------------------

This script will guide through the installation.
It will install files in the /adblocking/ directory on
the device you select during install.

A previous AB-Solution* installation will be upgraded.
Some entries will be written to /jffs/scripts.

A backup of existing scripts will be made in the
backup directory on the device.

*) Includes Adblock WCHFA, the former name of this script

--------------------------------------------------

[1] --> /tmp/mnt/PENDRIVE
Select the device to install AB-Solution on. (0 to Exit)
Enter device: [0-1]  Input: 1

--------------------------------------------------
Installing AB-Solution on: /tmp/mnt/PENDRIVE
Please confirm: [1=Yes 2=Exit]  Input: 1

Using /tmp/mnt/PENDRIVE to install AB-Solution

--------------------------------------------------
Select the type of amalgamated hosts file to use.

Note: The file type can be changed anytime later.

1. Standard: Combines these hosts files:
    winhelp2002.mvps.org, someonewhocares.org, pgl.yoyo.org.
    Restricted blocking of Ads. If unsure, start here.
    Filesize: ~750 KB, ~28'000 blocked hosts.

2. Medium: Standard files plus: malwaredomainlist.com.
    Blocks malware domains. A good choice.
    Filesize: ~800 KB, ~30'000 blocked hosts.

3. shooter40sw's choice: Medium files plus:
    hosts-file.net: emd, grm, mmt, ad_servers.
    And adaway.org/hosts.txt
    Filesize: ~6 MB, ~201'000 blocked hosts.

4. Large: Medium files plus: Two hpHosts files:
    hosts-file.net and hphosts-partial (always latest).
    Be careful, this blocks a lot! Use it only if you
    know how to use the whitelist. You have been warned!
    Filesize: ~12 MB, ~384'000 blocked hosts.

Enter hosts file type: [1-4, 5=Exit]  Input: 2
Writing medium update-hosts.sh file

--------------------------------------------------
Dnsmasq can create a log file of all DNS queries.
The log is helpful for experienced users.

Note: Logging can be enabled or disabled anytime later.

Do you want logging enabled now? [1=Yes 0=No]
Writing /tmp/mnt/PENDRIVE/adblocking/scripts/ab_dnsmasq_postconf.sh
(Adblocking on, logging off)
Writing the whitelist.txt and blacklist.txt files
to: /tmp/mnt/PENDRIVE/adblocking/

--------------------------------------------------
To support SmallNetBuilder.com, some entries were
added in the whitelist.txt file to allow ads on
their websites. Please do not remove them. Thanks.

--------------------------------------------------
Amalgamating the Medium hosts file.
This may take a little while to process.
Verbose output follows:



Done.
The hosts file will update every Monday @ 2:00 a.m.

To update manually, run this in a terminal:
sh /tmp/mnt/PENDRIVE/adblocking/scripts/update-hosts.sh

Doing final checks if AB-Solution installed properly

checking /jffs/scripts/dnsmasq.postconf
OK, file found
OK, file looks good

checking /jffs/scripts/post-mount
OK, file found
OK, file looks good

checking ab_dnsmasq_postconf.sh
OK, file found
OK, file looks good

checking hosts-adblock
OK, file found
OK, file looks good

checking ab-solution.cfg
OK, file found
OK, file looks good

checking update-hosts.sh
OK, file found
OK, file looks good
[0;92m--> Looking good, no problems found.[00m

--------------------------------------------------
[0;92m    AB-Solution install or upgrade complete![00m
--------------------------------------------------

The install log is saved here:
/tmp/mnt/PENDRIVE/adblocking/logs/AB-Solution-1.06-install.log

My new install is missing the main script too on the pendrive.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top