Diversion Diversion - the Router Ad-Blocker v4.2.x

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

thelonelycoder

Part of the Furniture
Welcome
This is Diversion - the Router Ad-Blocker for Asuswrt-Merlin


All install and update infos are on the Diversion website.

September 26 2021
Diversion 4.2 is now available

What's new in Diversion 4.2

NEW: Option to set alternate upstream name server(s) for Alternate blocking list in b, 6. Thanks @latenights
NEW: Option to force IPv6 entries even though IPv6 support is disabled on the router in b, 9. Thanks to @dobri
NEW: Option to opt out to support smallnetbuilder.com ads in el, 1, Hard coded whitelist setting.
NEW: Option to enable blocking list update error email when update fails in c.
CHANGED: email settings and password files moved to /jffs/addons/amtm/mail
CHANGED: Improved WebUI. It's not complete but will do for now.
CHANGED: YouTube video ad-blocking more options for tinkering (I know...).
CHANGED: openssl ecryption error for newer version 1.1.1x, password encryption is auto-updated.
CHANGED: el correctly processes added and removed domains. Thanks to @pioneerfreq
CHANGED: Numerous fixes and improvements

Important
  • Use the SSH UI to update to this latest version. The Diversion 4.1.12 WebUI update function will fail.
  • The email password is auto-re-encrypted if the routers openssl version requires it. Please check email function after the update. You may have to re-enter the password if my logic failed.
  • Third party scripts that use the Diversion email settings need to update the path to email.conf and the password decryption code.

Diversion is free to use under the GNU General Public License version 3 (GPL-3.0).
If you like Diversion and find it useful, you can help it's further development with a donation.
Thank you!
 

thelonelycoder

Part of the Furniture
Reserved
 

dave14305

Part of the Furniture
Very nice!

1632665364790.png
 

Wallace_n_Gromit

Senior Member
+▒▒▒sʖ:▒U▒▒▒ <-- current password
^[[?6c
Edit password now? [1=Yes e=Exit] 1

input is not an option

Edit password now? [1=Yes e=Exit] 1

Enter new Password: [e=Exit] ****************
____________________________________________________

Your email credentials are saved in:
/jffs/addons/amtm/mail/email.conf

If you have Two Factor Authentication (2FA)
enabled, use an App password, or get a new email
address without 2FA (not recommended).

Common SMTP Server settings
Provider Server Port Protocol
------------------------------------------------
Gmail smtp.gmail.com 465 smtps
mail.com smtp.mail.com 587 smtp
Yahoo! smtp.mail.yahoo.com 465 smtps
outlook.com smtp-mail.outlook.com 587 smtp

1. Edit From address: [email protected]
2. Edit To name: My Asus Router
3. Edit To address: [email protected]
4. Edit Router name: AsusRTAC86U_66
5. Edit User name: [email protected]
6. Edit Password: select Edit to view
7. Edit SMTP Server: smtp.gmail.com
8. Edit Server port: 465
9. Edit Protocol: smtps
10. Edit SSL flag: Set to --insecure if curl problems occur
11. Send testmail to confirm settings

Enter your selection [1-11 e=Exit] 11
____________________________________________________

This will send a testmail from:

[email protected] to:
My Asus Router <[email protected]>

Continue? [1=Yes e=Exit] 1

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (67) Login denied

✖ sending testmail failed

Note the curl: error above and check your settings

! Press Enter to return to menu

I did indeed, have to update the email password. When I try to send a test email it fails. Nevertheless, the GUI looks very nice.

EDIT: Oops! :oops: I updated my app password to an older app password. Now that I've updated to the correct one looks like smooth sailing. The test email was sent and received.
 
Last edited:

Jack Yaz

Part of the Furniture
Welcome
This is Diversion - the Router Ad-Blocker for Asuswrt-Merlin


All install and update infos are on the Diversion website.

September 26 2021
Diversion 4.2 is now available

What's new in Diversion 4.2

NEW: Option to set alternate upstream name server(s) for Alternate blocking list in b, 6. Thanks @latenights
NEW: Option to force IPv6 entries even though IPv6 support is disabled on the router in b, 9. Thanks to @dobri
NEW: Option to opt out to support smallnetbuilder.com ads in el, 1, Hard coded whitelist setting.
NEW: Option to enable blocking list update error email when update fails in c.
CHANGED: email settings and password files moved to /jffs/addons/amtm/mail
CHANGED: Improved WebUI. It's not complete but will do for now.
CHANGED: YouTube video ad-blocking more options for tinkering (I know...).
CHANGED: openssl ecryption error for newer version 1.1.1x, password encryption is auto-updated.
CHANGED: el correctly processes added and removed domains. Thanks to @pioneerfreq
CHANGED: Numerous fixes and improvements

Important
  • Use the SSH UI to update to this latest version. The Diversion 4.1.12 WebUI update function will fail.
  • The email password is auto-re-encrypted if the routers openssl version requires it. Please check email function after the update. You may have to re-enter the password if my logic failed.
  • Third party scripts that use the Diversion email settings need to update the path to email.conf and the password decryption code.

Diversion is free to use under the GNU General Public License version 3 (GPL-3.0).
If you like Diversion and find it useful, you can help it's further development with a donation.
Thank you!
In theory connmon and dn-vnstat will cope with the email change. If not, I might have to end my sabbatical earlier than anticipated! (and by sabbatical I mean enjoying my shiny new Sonos system)
 
Last edited:

anonimo

Occasional Visitor
I’m using Merlin v384.19 and when I select Diversion from the SSH UI it seems to stop. A long wait or is v386.x required?
 

thelonelycoder

Part of the Furniture
Looks familiar :D
Nice one!
All one sees in the WebUI has been coded in early 2021. Except for a few changes due to omitting additional tabs and functions, that code has not changed since then. It’s original work, just like yours :)
 

thelonelycoder

Part of the Furniture
I’m using Merlin v384.19 and when I select Diversion from the SSH UI it seems to stop. A long wait or is v386.x required?
384.19 works just fine. Might want to reboot the router first.
 

Stephen Harrington

Senior Member
In theory connmon and dn-vnstat will cope with the email change. If not, I might have to end my sabbatical earlier than anticipated! (and by sabbatical I mean enjoying my shiny new Sonos system)

They did indeed, although as mentioned by @thelonelycoder in the release notes I DID, in my case, have to re-enter my email password in the Diversion settings.

Go back to enjoying your Sonos! :)

(Had Sonos gear since 2009, still one of my favourite “gadgets” ever … )
 

anonimo

Occasional Visitor
384.19 works just fine. Might want to reboot the router first.

Tried rebooting the router, but it still hangs when selecting Diversion. Able to update Skynet and entware, so not a general issue. I'll try again after I update the router to v386.4 (might be a wait as the GPL hasn't been released for merge).
 

dev_null

Senior Member
In theory connmon and dn-vnstat will cope with the email change. If not, I might have to end my sabbatical earlier than anticipated! (and by sabbatical I mean enjoying my shiny new Sonos system)
I'm seeing a vnStat-on-Merlin communication issue on my testbed router (AC66U_B1).

This is not a Diversion error, it's a dn-vnstat issue.

I've reached out to Jack to try to see if he has the same problem.

Any further communication issues should be captured in the appropriate vnStat-on-Merlin or Connmon threads, please. I'll add more detail there, including any progress.
 

CriticJay

Senior Member
Sorting the Whitelist causes the operation to crash within diversion, with the following message:

Sort the file now? [1=Yes e=Exit] 1
awk: cmd. line:1: Unexpected end of string


After which the whitelist is completely wiped (0 entries).

Any ideas?
(obviously I just restored the whitelist from backups, just pointing this out in case it's an obvious bug)
 

Stephen Harrington

Senior Member
Sorting the Whitelist causes the operation to crash within diversion, with the following message:

Sort the file now? [1=Yes e=Exit] 1
awk: cmd. line:1: Unexpected end of string

Can confirm I'm seeing the same error - although in my case I had no entries in my whitelist to start with anyway ....
 

Wallace_n_Gromit

Senior Member
In theory connmon and dn-vnstat will cope with the email change. If not, I might have to end my sabbatical earlier than anticipated! (and by sabbatical I mean enjoying my shiny new Sonos system)
I am able to get a test/email message from Diversion 4.2.0. When I disable/enable [Toggle emails for daily summary stats] on dn-vnstat I get this: (even after a router reboot)

##################################################
## ##
## vnStat on Merlin ##
## for AsusWRT-Merlin routers ##
## ##
## v2.0.1 on RT-AC86U ##
## ##
## https://github.com/de-vnull/vnstat-on-merlin ##
## ##
##################################################


A choice of emails is available:
1. HTML (includes images from WebUI + summary stats as attachment)
2. Plain text (summary stats only)

e. Exit to main menu

Choose an option: 2

dn-vnstat relies on Diversion to send email summaries, and email settings have not been configured

Navigate to amtm > 1 (Diversion) > c (communication) > 5 (edit email settings, test email) to set this up

Press enter to continue...

I just noticed @dev_null's post:
I'm seeing a vnStat-on-Merlin communication issue on my testbed router (AC66U_B1).

This is not a Diversion error, it's a dn-vnstat issue.

I've reached out to Jack to try to see if he has the same problem.

Any further communication issues should be captured in the appropriate vnStat-on-Merlin or Connmon threads, please. I'll add more detail there, including any progress.

Not sure if my issue is in that context. ADD: After perusing the vnStat-on-Merlin thread I see that it is.

 
Last edited:

latenights

Occasional Visitor
I'm not certain but I think this might be due to the updated version. None of my guest wireless networks are receiving a DNS server via DHCP. I've had to add the following to dnsmasq.conf.add:

dhcp-option=br1,6,192.168.101.1
dhcp-option=br2,6,192.168.102.1
 

anonimo

Occasional Visitor
Tried rebooting the router, but it still hangs when selecting Diversion. Able to update Skynet and entware, so not a general issue. I'll try again after I update the router to v386.4 (might be a wait as the GPL hasn't been released for merge).

Out of curiosity I disabled Diversion via SSH and attempted a SSH re-install and it stopped at “Checking white and blacklists -> Whitelist”. (I'm unable to access Diversion through amtm.) I use the default Whitelist, so an odd place to stop. Skynet, my only other script, is working fine. I’m not using VPN. Anyone else have this issue?
 

Twiglets

Senior Member
Sorting the Whitelist causes the operation to crash within diversion, with the following message:

Sort the file now? [1=Yes e=Exit] 1
awk: cmd. line:1: Unexpected end of string


After which the whitelist is completely wiped (0 entries).

Any ideas?
(obviously I just restored the whitelist from backups, just pointing this out in case it's an obvious bug)
Seeing the same error when sorting wc_blacklist.

Sort the file now? [1=Yes e=Exit] 1
awk: cmd. line:1: Unexpected end of string


After which the wc_blacklist is completely wiped also.
 

Ubimo

Senior Member
I don't understand "set alternate upstream name server(s) for Alternate blocking list".
Can someone please ELI5?
 

dave14305

Part of the Furniture
I don't understand "set alternate upstream name server(s) for Alternate blocking list".
Can someone please ELI5?
You can use Quad9 for the main dnsmasq/diversion instance, and OpenDNS Family for the Alternate blocking list instance, for example.

 

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