I noticed on some sites they are trying to pull in a lot of .js (javascript) files for animated ads. It does block them but the site itself gets stuck in a loop and the site keeps requesting multiple files over and over and over.
Ok, now that I have it running, some feedback.
I noticed on some sites they are trying to pull in a lot of .js (javascript) files for animated ads. It does block them but the site itself gets stuck in a loop and the site keeps requesting multiple files over and over and over. I guess getting a image back when it asked for a .js file makes it angry. Suggestion is that if the request is for a .js file just feed it a empty blank.js file, or even the same filename it asked for, but blank.
Unless it is doing that already?
#ifndef TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY(expression) \
(__extension__ \
({ long int __result; \
do __result = (long int) (expression); \
while (__result == -1L && errno == EINTR); \
__result; }))
#endif
Very nice port/improvement of pixelserv @kvic !
Found it a few days ago while looking at what forks that was made of Pixelserv.
I've been using HunterZ version until now on a TP-Link Archer C5 (V1) running OpenWrt. Unfortunately the pre-compiled mips binaries for pixelserv-tls does not run on my router so I've spent some time making them compile.
Compiling using "uClibc" works for the "dynamic" versions but not the "static" versions.
When compiling using "musl" the TEMP_FAILURE_RETRY macro is unknown and therefore linking fails.
This can be resolved be adding the follow to the top of "pixelserv.c"
After adding the code "static" builds work (these were tested on "chaos calmer" and "trunk" - I did not test the "dynamic" versions compiled using "musl" but I assume they work)Code:#ifndef TEMP_FAILURE_RETRY #define TEMP_FAILURE_RETRY(expression) \ (__extension__ \ ({ long int __result; \ do __result = (long int) (expression); \ while (__result == -1L && errno == EINTR); \ __result; })) #endif
pixelserv version: V35.HZ12.Kg compiled: Dec 24 2015 11:35:33 options: 192.168.1.1
uts: Uptime 7 days 19:37
req: Total # of requests 39832
avg: Avg size of reqs 729 bytes
rmx: Max size of reqs 44687 bytes
tav: Avg process time 540 ms
tmx: Max process time 10120 ms
err: # of error reqs 0
tmo: # of client timeout 551
cls: # of client shutdown 683
nou: # of reqs w/o URL 0
pth: # of invalid URL 0
nfe: # of missing file ext 6612
ufe: # of unknown file ext 3374
gif: # of GIF reqs 236
bad: # of unknown HTTP methods 388
txt: # of TXT reqs 17481
jpg: # of JPG reqs 22
png: # of PNG reqs 10
swf: # of SWF reqs 2
ico: # of ICO reqs 1
slh: # of HTTPS /w a good cert 4566
slm: # of HTTPS w/o a cert 8
sle: # of HTTPS /w a bad cert 0
slu: # of unrecognized HTTPS 29
sta: # of HTML stats 1
stt: # of text stats 0
204: # of HTTP/204 (no content) 0
rdr: # of redirects 8747
pst: # of POST method 1724
hed: # of HEAD method 0
Proceed to setup auto run of pixelserv on startup by deploying the init.d script in post #1.
Could you please explain a little bit more detailed how to setup auto run?
I made by this path /opt/etc/init.d/ a file S81pixelserv-custom with your script from the post #1, but after reboot it doesn't start... What do I do wrong?
Sorry for the late response... I assume you have Entware up and running. If so, check permission on the script. You can add execute perm by "chmod a+x /opt/etc/init.d/S81pixelserv-custom"
The Entware rc.unslung won't pick up init scripts that lack execute perm.
Log said:Jan 20 17:01:36 dnsmasq-dhcp[446]: DHCPREQUEST(br0) 192.168.1.83 f4:09:d8:f4:22:29
Jan 20 17:01:36 dnsmasq-dhcp[446]: DHCPACK(br0) 192.168.1.83 f4:09:d8:f4:22:29 android-509a45de26a67851
Jan 20 17:01:42 dnsmasq-dhcp[446]: DHCPDISCOVER(br0) 70:ee:50:02:69:f0
Jan 20 17:01:42 dnsmasq-dhcp[446]: DHCPOFFER(br0) 192.168.1.132 70:ee:50:02:69:f0
Jan 20 17:01:42 dnsmasq-dhcp[446]: DHCPDISCOVER(br0) 70:ee:50:02:69:f0
Jan 20 17:01:42 dnsmasq-dhcp[446]: DHCPOFFER(br0) 192.168.1.132 70:ee:50:02:69:f0
Jan 20 17:01:42 dnsmasq-dhcp[446]: DHCPREQUEST(br0) 192.168.1.132 70:ee:50:02:69:f0
Jan 20 17:01:42 dnsmasq-dhcp[446]: DHCPACK(br0) 192.168.1.132 70:ee:50:02:69:f0
Jan 20 17:01:49 dnsmasq-dhcp[446]: DHCPRELEASE(br0) 192.168.1.132 70:ee:50:02:69:f0
1. How can I manage black and white lists for this server? I didn't find information about it.
2. Is it possible to run the server with possibility of full logging of all connections and web sites visited?
So with Pixelserv you can find and add required sites to dnsmaq to block it, right?Pixelserv doesn't do whitelist/blacklist by itself. Those two functions are part of the process you generate config files for dnsmasq.
Do you mean can not find it in pixelserv logs and need to install an additional service?Full web access log can be obtained by deploying a web proxy such as privacy. I think Adaptive QoS when enabled also provides limited web logging.
Where by default pixelsrv store it's log? The logs I provided were from syslog.logThe logs u provided aren't from pixelserv. I believe u took it from dnsmasq.
What parameters can you recommend to use for pexelsrv to monitor hosts that were connected through the router?When -l is used, pixelserv logging by default goes to syslog.log. It will easily flood your syslog. Hence -l only recommended when u are fixing a broken website caused by excessive blocking.
Actually why I started all of this. I would like to block youtube ads from my tv, so I tried many methods and it still shows. SO I would like to find finally required hosts and block it. Maybe you have some thoughts how to do it?
UPD.: I tried to run the server with -l and no additional information in syslog.log. The same as I mentioned before... what do I do wrong? . I disabled adaptive QoS...
That's expected because I think you didn't change ip address in your blacklist to point to 192.168.1.1. So your ad requests go to 0.0.0.0, and not hitting 192.168.1.1 where pixelserv listens in your run.
.
Where can I change it? Anyway as it installed so will get some statistics.
Thanks, kvic, for your work on this project.
I'm having an issue whereby the CA doesn't show up in the certification path of the generated certificates, causing the browser to throw either a CERTIFICATION_AUTHORITY_INVALID (chrome) or unknown issuer (firefox).
The CA certificate has been imported on the client, in the OS and in the respective browsers.
Am I missing something here, or do the browsers have more stringent certificate checks than before?
Thread starter | Title | Forum | Replies | Date |
---|---|---|---|---|
C | Diversion Pixelserv replacement | Asuswrt-Merlin AddOns | 2 | |
L | Is Diversion better than NextDNS, PiHole or AdGuard Home? | Asuswrt-Merlin AddOns | 10 |
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!