What's new

AB-Solution 2.0 is out! (v2.0.1)

  • 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: The Ad Blocking Solution

The News

Sep 29 2016: update-hosts.sh version 1.4 Hotfix released. Run the (cu) option to update. See the changelog in this post.
Sep 28 2016: update-hosts.sh version 1.3 released. Run the (cu) option to update. See the changelog in this post.
Sep 21 2016: update-hosts.sh version 1.1 released. Run the (cu) option to update. See the changelog in this post.
Sep 19 2016: log-stats.sh version 1.1 released. For changelog and how to update see the instructions here.
Sep 07 2016: Version 2.0.1 released, v2.0 users please update using the [cu] option.

The important part
- Have Asuswrt-Merlin firmware installed on a supported router
- Have an ext2, 3 or 4 formatted USB device plugged in
- Get more info's on the AB-Solution website: ab-solution.info

Installing with curl
Log into your router with an SSH client (same credentials as the Web-UI) and enter:
Code:
curl -O www.ab-solution.info/releases/latest/ab-solution.sh && sh ab-solution.sh
(that's an upper case -o)
This will start the install or update.

For more installation options look at the 1.07 release post:
http://www.snbforums.com/threads/ab-solution-1-07-is-out.31474/

Browser downloads
All downloads are on the website: ab-solution.info/releases/

How to start AB-Solution when installed
Log into your router with an SSH client.
If you are in /home/root, start AB-Solution with:
Code:
./ab-solution.sh
If you are outside the home dir, start AB-Solution with:
Code:
sh /tmp/mnt/<your device>/ab-solution.sh
Where <your device> is the device name AB-Solution is installed on.

Upgrading from previous versions
All previous AB-Solution versions can be updated running the installer.

Note: Manual installations of "Adblocking with combined hosts files" are no longer replaced with this version.

Release notes v2.0.1, Sep 07 2016
New: Green "IPv6" is shown in header when service is enabled
Fix: Removed falsely placed error message when running [22]
Fix: Changed IPv4 validation when selecting custom block IP. This caused a failed app restart
Fix: toggle weekly stats to [on] was not set correctly
General: Changed wording of post-mount and dnsmasq.postconf "Do not edit" warning
General: Code maintenance

Release notes v2.0
New: Toggle symlink from ab-solution.sh to /home/root/ab-solution.sh (by default activated)
New: Toggle shell history (persistent when rebooting)
New: Supports custom hosts files
New: Total count of blocked hosts in hosts file
New: Blocked hosts counter (only available when logging is on)
New: Current log stats, saved to file or in terminal. Many thanks to @eaz for the code
New: Toggle weekly stats, saved to file
New: Use custom block IP (e.g for pixelserv-tls)
New: New version check and install from within AB-Solution
New: Depending on system state, option to install, upgrade, re-install or new install

Improvment: App restart improved (no more random execution of code)
Improvment: Install routine
Improvment: Added Sub Menu to unclutter Main Menu
Improvment: Added info and hosts stats in menu header
Improvment: Completely rewritten update-hosts.sh, fallback to a working copy if errors during download, short stats
Improvment: Path to Adblocking USB device is now stored within ab-solution.sh (no more searching find_adblock_device necessary)
--> thanks @Brouno for the push to do it
Improvment: Copy script file to adblocking-device much improved
Improvment: Actual IP Adrress is shown in Menu
General: Code cleanup

Screenshots v2.0, Main and Sub Menu:

5cvPs7U.png


tZB6H75.png
 
Last edited:
does this support https blocking via pixelserv? install pixelserv then ab-solution.
You install pixelserv-tls, I provide the means to do it. The custom block IP function is meant for that. Good luck!
 
Nifty. I've been using pixelserv-tls with a custom IP and beta 1.8v2

1. I ran the new script and upgraded to 2.0. All good.
2. I changed the host file from medium to shooter40's. All good.
3. I set a custom IP address, which changed the host file fine, but then I got:

Code:
 Refreshing Menu...
[: sh: unknown operand
sh: can't open "/tmp/mnt/POP8G/ab-solution"

(POP8G being the name of my thumb drive.)

There did not seem to be an issue refreshing the menu after other steps, so I'm not sure what might have happened in line 1391 in the reload_app() module.
 
There did not seem to be an issue refreshing the menu after other steps, so I'm not sure what might have happened in line 1391 in the reload_app() module.
exec sh $adBlockingDevice/$appScript should run just fine. What router model are you using again?
Hitting 11 to reload the app will execute fine as well.
 
I @thelonelycoder I upgraded everything looks good but I have entware ad the installation overwrote the post-mount file, so the entware entries are gone, I get in the post-mount file and you have a big warning there about editing the file, so did you do something else so that entware starts or in my case I need to edit the file anyway? thanks!
 
I @thelonelycoder I upgraded everything looks good but I have entware ad the installation overwrote the post-mount file, so the entware entries are gone, I get in the post-mount file and you have a big warning there about editing the file, so did you do something else so that entware starts or in my case I need to edit the file anyway? thanks!
The big warning is there to leave the entries within alone so in future this file will not be replaced by AB-Solution. You can add as much as you like underneath it. The backup of your entware entries are in the /adblocking/backup/ directory. Copy and paste them into the file and reboot.
 
[: sh: unknown operand sh: can't open "/tmp/mnt/POP8G/ab-solution"
This restart bug is confirmed. The IP change is properly done, just the restart of the app hangs. Working on a fix and will push it asap.
 
The big warning is there to leave the entries within alone so in future this file will not be replaced by AB-Solution. You can add as much as you like underneath it. The backup of your entware entries are in the /adblocking/backup/ directory. Copy and paste them into the file and reboot.

I went pretty far afield and ended up deleting entware, pixelserv-tls and ab-solution and starting over, in part because I was a little uncertain about the warning. Partly that is because I start both entware and pixelserv from post-mount. I think it would be helpful if you changed the warning to add "You can add as much as you like underneath it" {and do you mean not above it?} because it would not be clear what the script checks for on an upgrade.

I see, TLC, that your post-mount script now starts with
Code:
 if [ -d "adBlockingDevice" ];then
instead of
Code:
 if [ $1="adBlockingDevice"];then
Not sure why, but that means when my second drive mounts the script sees the directory on the first drive exists and the link attempts to be created a second time.

Just to repeat the steps I took:

1. Reinstall entware. Reinstall pixelserv-tls. Reinstall ab-solution. Reset the pixelserv-tls IP address.

2. I needed to add the link of /opt to /entware in the beginning of post-mount using the $1 formula.

3. Then, I needed to fix SXXPixelserv with the time fix and its own IP to let the WebUI run on port 80:

Code:
export TZ=$(cat /etc/TZ)
ENABLED=yes
PROCS=pixelserv-tls
ARGS="192.168.0.3"
where 0.3 is my pixelserv-tls IP address.

4. Then, I needed to start entware, and I ended up going back to doing it in services-start.
 
The log stats in this version are a really nice addition!
 
Thanks for doing this.

So just so I am clear - I will need to manually install pixelserv and then run the menu option to use custom block IP?

Thanks
 
Thanks for doing this.

So just so I am clear - I will need to manually install pixelserv and then run the menu option to use custom block IP?

Thanks
Exactly, this is all pixelserv-tls needs to work.
 
I see, TLC, that your post-mount script now starts with
Code:
if [ -d "adBlockingDevice" ];then
instead of
Code:
if [ $1="adBlockingDevice"];then
Not sure why, but that means when my second drive mounts the script sees the directory on the first drive exists and the link attempts to be created a second time.
This code was only in the 1.08-beta2 version, and only used when pixelserv-tls was installed.
What would be the benefits?
Using this
Code:
if [ "$1" = "/tmp/mnt/sixteen" ];then
    service restart_dnsmasq
    logger "AB-Solution added entries via post-mount"
fi
vs
Code:
if [ -d "/tmp/mnt/sixteen" ];then
   service restart_dnsmasq
   logger "AB-Solution added entries via post-mount"
fi
would essentially bring the same result. Or would it not?
 
Last edited:
@elorimer unless $1 is tied to the device and -d would look for it again. As you mentioned.
Might have to change that.
 
Hi,
I've got issues with entware mainly, I don't know if related with absolution or not.
I've got R7000 router with xvortex asuswrt firmware, with an USB pendrive connected with one partition in EXT2. I'd like to install pixelserv-tls and absolution.
I did these steps:
- installed entware with "entware-setup.sh" script to my /mnt/sda1
- installed nano and pixelserv-tls packages with opkg install
- generated pixelserv certificate, edited S80pixelserv init.d script with my router LAN ip (10.0.0.1)
- started pixelserv-tls with init.d script
- installed absolution with logging on and setted ip to 10.0.0.1
- once rebooted I can't see pixelserv started, and my /opt symlink points to nothing...

What's wrong?
Thank you.
 
Hi,
I've got issues with entware mainly, I don't know if related with absolution or not.
I've got R7000 router with xvortex asuswrt firmware, with an USB pendrive connected with one partition in EXT2. I'd like to install pixelserv-tls and absolution.
I did these steps:
- installed entware with "entware-setup.sh" script to my /mnt/sda1
- installed nano and pixelserv-tls packages with opkg install
- generated pixelserv certificate, edited S80pixelserv init.d script with my router LAN ip (10.0.0.1)
- started pixelserv-tls with init.d script
- installed absolution with logging on and setted ip to 10.0.0.1
- once rebooted I can't see pixelserv started, and my /opt symlink points to nothing...

What's wrong?
Thank you.
Unless you've moved the webui off port 80, pixelserv won't start on the router LAN IP. You either need webui on https, or move theIP to something else in 10.0.0.xx.

Also, make sure in post-mount you have this, before or after the ab-solution lines:

Code:
if [ "$1" = "yourentwaredrive" ] ; then
  ln -nsf $1/entware /tmp/opt
fi
 
My webui is turned off. I missed those lines in post-mount script. I tried to add them but no success.

Edit: got it working with this:
Code:
if [ -d "/tmp/mnt/sda1/" ] ; then
    ln -nsf /tmp/mnt/sda1/entware /tmp/opt
fi

How can I check if pixelserv is currently working well, for http and https?
 
Last edited:
My webui is turned off. I missed those lines in post-mount script. I tried to add them but no success.

Edit: got it working with this:
Code:
if [ -d "/tmp/mnt/sda1/" ] ; then
    ln -nsf /tmp/mnt/sda1/entware /tmp/opt
fi

How can I check if pixelserv is currently working well, for http and https?
I look at the stats page [pixelserv IP address/servstats] to see if it is running and getting requests. You can also look in the syslog to see pixelserv logged being started.

If I understand it right, the call to the post-mount script has the parameter of the partition just mounted. So running
Code:
./post-mount start
is not the same as running
Code:
./post-mount start /tmp/mnt/sda1
The former will form the link with the -d version, but will try to form it when each partition is mounted, even if it is already formed, and even if entware isn't on it, while the $1 version will only try to form it when the right partition is mounted, and in a reboot. Also, a partition label helps to see it is the "right" partition.

EDIT: fixed what I think is the syntax of the post-mount call.
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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