[squid-users] squid3.4 - MySQL, PHP script - block websites

Antony Stone Antony.Stone at squid.open.source.it
Sun Nov 15 15:15:19 UTC 2015


On Sunday 15 November 2015 at 15:53:56, Jens Kallup wrote:

> Hello,
> 
> Now, I use the follow script.
> But, it ends in endless search - web browser site search.
> 
> #!/usr/bin/python
> 
> import sys
> import time
> 
> def grant ():
>        sys.stdout.write( 'OK\n' )
> 
> def deny ():
>        sys.stdout.write( 'ERR\n' )
> 
> while True:
>      line = sys.stdin.readline()
>      if (line.find("web.de") > -1):
>          grant()
>      else:
>          deny()
>          time.sleep(1)

1. What are you trying to achieve with the above (or, alternatively, what do 
you believe it should do)?

2. I think you should deal with the following messages in the squid log before 
trying to use the service:

2015/11/15 15:48:33 kid1| ERROR: listen( FD 28, 192.168.178.79 [ job2], 
16383): (98) Address already in use

3. While you're at it, it would be worth correcting the following warnings as 
well:

2015/11/15 15:48:33 kid1| WARNING: log name now starts with a module 
name. Use 'stdio:/sap/squid/log/access.log'
2015/11/15 15:48:33 kid1| WARNING: log name now starts with a module 
name. Use 'stdio:/sap/squid/log/store.log'


Regards,


Antony.

-- 
The first fifty percent of an engineering project takes ninety percent of the 
time, and the remaining fifty percent takes another ninety percent of the time.

                                                   Please reply to the list;
                                                         please *don't* CC me.


More information about the squid-users mailing list