1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Diversion - the Router Ad-Blocker

Discussion in 'Asuswrt-Merlin' started by thelonelycoder, Aug 25, 2018.

  1. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,420
    Location:
    Manchester, United Kingdom
  2. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,405
    Location:
    USA
    o_O Not his baby. Not his girlfriend. It’s the oisd.nl guy’s baby. :)
     
    QuikSilver, PeterR, a5m and 2 others like this.
  3. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    Noted and rejected.
    1. Skynet does not have a wildcard whitelist (Diversion and Skynet auto-share their lists)
    2. I expect endless discussion why *exampledomain.com is not blocked
    3. A lot of work for me to implement
    4. Other reasons I may not remember at the moment
     
  4. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    Thanks Martin but it reached the wrong person :D
     
    L&LD likes this.
  5. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,420
    Location:
    Manchester, United Kingdom
    Oh bollox! Too late! I did look for a header on that box and not seeing it assumed it was thelonycoder’s. “Never assume: check”
     
    a5m, jsbeddow, L&LD and 1 other person like this.
  6. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,420
    Location:
    Manchester, United Kingdom
    Enjoy anyway. You sure deserve it.
     
  7. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,405
    Location:
    USA
    That would be a complicated relationship... :rolleyes:
     
    QuikSilver, L&LD and martinr like this.
  8. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    Going to donate your donation to a good cause.
     
    QuikSilver, a5m, ^Tripper^ and 3 others like this.
  9. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,420
    Location:
    Manchester, United Kingdom
    Ok but only if you can think of a better cause than yourself.
     
  10. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    You and I just made a donation to Terre des hommes.
     
  11. martinr

    martinr Part of the Furniture

    Joined:
    Nov 27, 2014
    Messages:
    2,420
    Location:
    Manchester, United Kingdom
    Wonderful! Thank you, Martin.
     
  12. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    Quoc Huynh, HorseCalledHorse and L&LD like this.
  13. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    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
    
     
    jrmwvu04 and L&LD like this.
  14. jrmwvu04

    jrmwvu04 Very Senior Member

    Joined:
    Mar 29, 2016
    Messages:
    603
    Location:
    United States
    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.
     
    thelonelycoder and a5m like this.
  15. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    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.
     
  16. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    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.
     
    Asad Ali likes this.
  17. Asad Ali

    Asad Ali Very Senior Member

    Joined:
    May 25, 2017
    Messages:
    676
    Location:
    Pakistan
    You know you have the veto power here.

    BTW one more vote for Minimal default list.
     
    a5m likes this.
  18. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,464
    Location:
    Switzerland
    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.

    [​IMG]
     
  19. no_name

    no_name Regular Contributor

    Joined:
    Sep 11, 2018
    Messages:
    146
    Location:
    UK
    Thank you for keeping the blocking list as standard and have a great holiday


    Sent from my iPad using Tapatalk
     
    L&LD likes this.
  20. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    11,437
    Updated to Diversion 4.1.10, no issues. Have a well-deserved getaway @thelonelycoder! :)
     
    QuikSilver, Makaveli and no_name like this.