What's new
  • 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!

It’s been long enough ago that I forget the culprit, but one of the popular lists at the time was including a very unusual character (it looked like a “G” and was blocking a fake Google.com) in one of its blocked domains that was making dnsmasq fail to load similarly. I went to a sed line to strip the non standard stuff, I’m curious about how you handle it.
Code:
sed -i 's/[^a-zA-Z0-9#-.]//g' blocklist
It's in there somewhere :D , copied from update-bl.div:
Code:
dos2unix "${hf_inuse}" || true
if expr "$(grep -m1 "^[^#]" "${hf_inuse}" | awk '{print $1}')" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; then
   echo " file is in hosts file format (IP-domain pair)"
   /opt/bin/grep "^[^#]" "${hf_inuse}" \
   | sed -e "s/^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/X/g" | /opt/bin/grep -P '^[[:ascii:]]+$' \
   | /opt/bin/grep -w "^X" | awk '{print " "$2}' | /opt/bin/grep -E '[[:alnum:]]+[.][[:alnum:]_.-]+' \
   | awk '!/ [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/' | awk '!/[:?\/;]/' >"${hf_inuse}.tmp"
else
   echo " file is in domain only format"
   /opt/bin/grep "^[^#]" "${hf_inuse}" | /opt/bin/grep -P '^[[:ascii:]]+$' \
   | awk '{print " "$1}' | /opt/bin/grep -E '[[:alnum:]]+[.][[:alnum:]_.-]+' \
   | awk '!/ [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/' | awk '!/[:?\/;]/' >"${hf_inuse}.tmp"
fi
 
For what it’s worth I would vote for the minimal list on out of the box installs. Reasoning being, less chance to break things for people who don’t know why it’s broken or that they can configure it. Users who know what they’re doing can change to a more advanced blocking scheme.
 
For what it’s worth I would vote for the minimal list on out of the box installs. Reasoning being, less chance to break things for people who don’t know why it’s broken or that they can configure it. Users who know what they’re doing can change to a more advanced blocking scheme.
Hence the call to voice opinions here: https://www.snbforums.com/threads/diversion-the-router-ad-blocker.48538/page-274#post-555920

I favor the Minimal list too. But replies so far are towards the status quo with the Standard preset list.
 
@thelonelycoder When adding/deleting any domains in the hosted wildcard list or blacklist file it doesn't update the Line in the header of Diversion which tells us "Xxx blocked domains in xx hosts file(s)" even after we process the lists. The change does take effect after file processing but that counter only updates after we do a blocklist update using b>4

So it's a cosmetic bug.
No bug, it works as intended, every time the Diversion ui is drawn they get counted:
Code:
lc=$(/opt/bin/grep "^[^#]" "${DIVERSION_DIR}/list/$HL" | wc -l)
wlc=$(/opt/bin/grep "^[^#]" "${DIVERSION_DIR}/list/whitelist" | wc -l)
blc=$(/opt/bin/grep "^[^#]" "${DIVERSION_DIR}/list/blacklist" | wc -l)
[ "$(nvram get ipv6_service)" != "disabled" ] && blc="$((blc/2))"
wcblc=$(/opt/bin/grep "^[^#]" "${DIVERSION_DIR}/list/wc_blacklist" | wc -l)
Edit, correct, the [number] blocked domains by [number] hosts file(s) is only updated after a blocking list(s) update.
 
I favor the Minimal list too. But replies so far are towards the status quo with the Standard preset list.

You know you have the veto power here. [emoji1787][emoji1787]

BTW one more vote for Minimal default list.
 
  • Like
Reactions: a5m
Diversion 4.1.10 is now available

What's new in Diversion 4.1.10
- Added u for Diversion update check to main menu.
- Uses built-in openssl binary for encrypting/decrypting email password. Thanks @kernol for reporting.
- Removed "export PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH" line in all files, same as amtm since v3.0.0.
- el and b accept non-Unix End-of-line EOL remote files.
- Does not use temporary pgl.yoyo.org file while updating when blocking list(s) are below 1050KB in size.
- New predefined blocking list "Minimal" in b to choose from, uses winhelp2002.mvps.org.
- Domains per line (dpl) setting in blocking list(s) is no longer a hidden setting in b. Auto updates blocking list(s) if change is detected.
- Fixed near match(es) search in el by requiring above setting to be 1 domain per line.
- Reviewed hard coded SNB whitelist, thanks @dave14305 for tagging me. See the new list at https://diversion.ch/diversion/use/hard-coded-whitelist.html
- Swap file size selection and removal now in sync with amtm and Skynet functions.
- No change of default blocking list setting "Standard" for new installs, thanks all for your posted opinions.
- Fixed no bugs, did not improve performance, donated @martinr's "newborn" donation to Terre des Hommes and I'm going on a vacation someplace nice tomorrow. See ya!

How to update
Use u to update to this latest version.

4jsJ1XW.png
 
Thank you for keeping the blocking list as standard and have a great holiday


Sent from my iPad using Tapatalk
 
Updated to Diversion 4.1.10, no issues. Have a well-deserved getaway @thelonelycoder! :)
 
Shouldn't the blocked domains match in the UI (on the left) and the real count in diversion (on the right)? It looks like the UI doubles the count.
upload_2020-3-1_8-55-48.png
 
Shouldn't the blocked domains match in the UI (on the left) and the real count in diversion (on the right)? It looks like the UI doubles the count.
View attachment 21688
IPv6 is enabled, uiDivStats counts both IPv4 and IPv6 entries, Diversion no longer does that.
 
What can have happened here?
update.png
disabled.png

Code:
> mount | grep usb
/dev/sda1 on /tmp/mnt/usb type ext4 (rw,nodev,relatime,data=ordered)
 
Does the disc check run in AMTM?
Last run is from a couple of days ago:
Code:
 Mon Feb 24 20:38:21 CET 2020 Probing 'ext4' on device /dev/sda1
 Running disk check v2.8, with command 'e2fsck -p' on /dev/sda1
 usb: clean, 4708/1880480 files, 744874/7507964 blocks
 Mon Feb 24 20:38:21 CET 2020 Disk check done on /dev/sda1
 

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