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!

Update to 4.1.0 no drama at all.... Like the new blocking file format.... nice work as always
 
I'd like to add a bump in support of the 'fw' (wife filter) feature. Now besides just the wife's iphone, I've had issues with my son's xbox flooding my router with requests for microsoft telemetry servers. No gaming achievements were blocked so far (AFAIK anyways), but I'm wearing my hard hat in case that issue comes to the surface. My win10 devices are protesting any whitelisting methods. This is such a 1st world problem, lol, but nonetheless a problem that diligent coding might solve. ;)

I’m having issues with achievements not unlocking on my Xbox One. Ran its networks tests and was not able to complete them, even though my NAT Type is “Open” and I can play online just fine.

How were you able to solve that? I’m running both Diversion and Skynet scripts on my AC86U.
 
I've been playing around with awk a bit lately, this might be useful :)
Code:
write_blockinglist(){ awk '{if(NR%20==0){a=a" "$0;print b a; a=""}else a=a" "$0}END{if(a)print b a}' b="$blockingIP" "${blockinglist}.tmp" > "${blockinglist}"; }

Code:
$ echo "a b c d e f g h i j k l m n o p q r s t u v w x y z" | sed "s/ /\n/g" | awk '{if(NR%5==0){a=a" "$0;print b a; a=""}else a=a" "$0}END{if(a)print b a}' b="0.0.0.0"
0.0.0.0 a b c d e
0.0.0.0 f g h i j
0.0.0.0 k l m n o
0.0.0.0 p q r s t
0.0.0.0 u v w x y
0.0.0.0 z
 
I've been playing around with awk a bit lately, this might be useful :)
Code:
write_blockinglist(){ awk '{if(NR%20==0){a=a" "$0;print b a; a=""}else a=a" "$0}END{if(a)print b a}' b="$blockingIP" "${blockinglist}.tmp" > "${blockinglist}"; }

Code:
$ echo "a b c d e f g h i j k l m n o p q r s t u v w x y z" | sed "s/ /\n/g" | awk '{if(NR%5==0){a=a" "$0;print b a; a=""}else a=a" "$0}END{if(a)print b a}' b="0.0.0.0"
0.0.0.0 a b c d e
0.0.0.0 f g h i j
0.0.0.0 k l m n o
0.0.0.0 p q r s t
0.0.0.0 u v w x y
0.0.0.0 z
Way to go!
I like that, far better than what I came up with.
Yours has the advantage of setting the domain count easily. I removed the extra spaces so the domains are separated by a single space as this affects el and other functions.
Though I would not recommend going much higher than 20 domain mappings, I tested it and 27 seems to be the absolute max one can go. 20 is a good compromise.
I'll credit your contribution in the file with the next update. Thanks!

$dpl is domains per line
Code:
write_blockinglist(){ awk '{if(NR%'"$dpl"'==0){a=a""$0;print b a; a=""}else a=a""$0}END{if(a)print b a}' b="$blockingIP" "${blockinglist}.tmp" > "${blockinglist}"; }
 
They should have already been separated by a single space, are you sure you didn't remove the space entirely?
They are separated by two spaces with your function. This will not do ;)
 
Ah that'd be where I was getting confused then. Also, I think 'a=a""$0' is the same as 'a=a $0'.

Another thing I noticed is that after uninstalling Diversion, post-mount.div is still in the jffs scripts folder. That's fine since it's doing entware stuff, but perhaps it should have a check for the Diversion lines.
Code:
if [ -x /opt/bin/diversion ]; then
   service restart_dnsmasq
   diversion ash_history
fi
 
I’m having issues with achievements not unlocking on my Xbox One. Ran its networks tests and was not able to complete them, even though my NAT Type is “Open” and I can play online just fine.

How were you able to solve that? I’m running both Diversion and Skynet scripts on my AC86U.

Have you whitelisted the following domains?

v10.events.data.microsoft.com
v10.vortex-win.data.microsoft.com
settings-win.data.microsoft.com
v10c.events.data.microsoft.com
vortex-win.data.microsoft.com
web.vortex.data.microsoft.com
 
Another thing I noticed is that after uninstalling Diversion, post-mount.div is still in the jffs scripts folder. That's fine since it's doing entware stuff, but perhaps it should have a check for the Diversion lines.
As you noted, post-mount.div remains, sourced in post-mount if Entware is left installed.
In both cases, "1. Uninstall Diversion and Entware" and "2. Uninstall Diversion, leaving Entware installed" during the uninstall process Diversion properly removes all relevant lines in the /jffs/scripts/ directory. That includes both lines you think were not removed:
Code:
service restart_dnsmasq
diversion ash_history

The code when leaving Entware installed is:
Code:
sed -i '/started Entware/d' /jffs/scripts/post-mount.div
sed -i '/restart_dnsmasq/d' /jffs/scripts/post-mount.div
sed -i '/ash_history/d' /jffs/scripts/post-mount.div

Yours is not what post-mount.div looks like. This is not created by Diversion:
Code:
if [ -x /opt/bin/diversion ]; then
   service restart_dnsmasq
   diversion ash_history
fi
 
Ive had all sorts of problems with PiHole recently so have just switched over to Diversion (by chance I found it while checking something else) and so far Im super impressed. Will see how it goes over the next few weeks but it looks like it will be much more reliable which is awesome!

I look forward to seeing the reliability over the next few weeks (and after a firmware update). Is the USB disk used for logs? I didnt see any options to use it during installation, though did format it using amtm as suggested.

Thanks again
 
I look forward to seeing the reliability over the next few weeks (and after a firmware update).
I've had Diversion and its predecessors running on my router(s) since January 2014. I call that reasonably reliable ;).
 
In both cases, "1. Uninstall Diversion and Entware" and "2. Uninstall Diversion, leaving Entware installed" during the uninstall process Diversion properly removes all relevant lines in the /jffs/scripts/ directory. That includes both lines you think were not removed:
I must have been looking at a cat from before uninstalling :(

Yours is not what post-mount.div looks like. This is not created by Diversion
Yea, that was a suggestion but deleting the lines is so much better.
 

Latest threads

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