I got a block list from winhelp2002.mvps.org/hosts.htm and added it to the etc/hosts file using WinSCP. That works fine - but I find the messages saying url cannot be found in place of the ads still annoying.
I wanted to implement a pixelserv from proxytunnel.sourceforge.net/pixelserv.php, but I can't get it to run. In /etc/init.d/pixelserv I have the (set to be executable) code
Code: Select all
#!/bin/sh /etc/rc.common
START=100
SERVICE_DAEMONIZE=1
start() {
service_start /sbin/pixelserv.pl
}
Code: Select all
#! /usr/bin/perl -Tw
use IO::Socket::INET;
$crlf="\015\012";
$pixel=pack("C*",qw(71 73 70 56 57 97 1 0 1 0 128 0 0 255 255 255 0 0 0 33 249 4 1 0 0 0 0 44 0 0 0 0 1 0 1 0 0 2 2 68 1 0 59));
$sock = new IO::Socket::INET ( LocalHost => '0.0.0.0',
LocalPort => '80',
Proto => 'tcp',
Listen => 30,
Reuse => 1);
if (!defined($sock)) {
print "error : cannot bind : $! exit\n";
exit(1);
}
while ($new_sock = $sock->accept()) {
while (<$new_sock>) {
chop;chop;
# print "$_\n";
if ($_ eq '') { last; }
}
print $new_sock "HTTP/1.1 200 OK$crlf";
print $new_sock "Content-type: image/gif$crlf";
print $new_sock "Accept-ranges: bytes$crlf";
print $new_sock "Content-length: 43$crlf$crlf";
print $new_sock $pixel;
shutdown($new_sock,2);
undef($new_sock);
}
close($sock);
exit(0);
If it's too difficult to setup on the router - I also have a synology nas that might be able to host it, but I'm not sure how that would be done.
Any ideas?