What's new

Diversion Diversion - the Router Ad-Blocker v4.2.x (see new thread for 4.3.x)

  • 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
Welcome
This is Diversion - the Router Ad-Blocker for Asuswrt-Merlin


All install and update info's are on the Diversion website.

Juli 10 2022
Diversion 4.3.1 is now available
See this post for what's new.

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 its further development with a donation.
Thank you!

e4gdc5wpg4r.png
 
Last edited:
Reserved
 
+▒▒▒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: Diversion@Myrouter.com
2. Edit To name: My Asus Router
3. Edit To address: MyAsusRouter@gmail.com
4. Edit Router name: AsusRTAC86U_66
5. Edit User name: MyAsusRouter@gmail.com
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:

Diversion@Myrouter.com to:
My Asus Router <MyAsusRouter@gmail.com>

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:
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:
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?
 
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 :)
 
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.
 
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 … )
 
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).
 
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.
 
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)
 
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 ....
 
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:
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
 
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?
 
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.
 
I don't understand "set alternate upstream name server(s) for Alternate blocking list".
Can someone please ELI5?
 

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