<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>Very big fan of Squid software, trying to get to know it better.<br><br></div><div>A current use case of mine that I require is would be for squid to be able to block as it currently does via acl url_regex badurl, just that not from a string inside the configuration file or a file containing the strings on the OS, but from a MySQL database. (Imagine a simple table = sites, with rows = badurl1, badurl2, badurl3. If client matches badurl1 they get blockpage)</div><div><br></div><div>1.1) Would this be possible? <br>1.2) Would this be ''efficient''? (imagining a lot of various traffic and for each one querying the DB)</div><div><br></div><div>And another question - </div><div>I'm attempting to write a prototype for a helper in python<br><div><br>ext_py_acl:</div><div>#!/usr/bin/python</div><div><br></div><div>import sys</div><div><br></div><div>while True:</div><div>    line = sys.stdin.readline()</div><div>    if (line.find("badstring") == -1):</div><div>        sys.stdout.write( 'ERR\n' )</div><div>    else:</div><div><span style="white-space:pre">     </span>sys.stdout.write( 'OK\n' )</div></div><div><br>squid.conf:<br>external_acl_type blockscript %URI /usr/local/squid/libexec/ext_py_acl </div><div> <br></div><div>2.1) When running this not with squid I pass random strings and it gives me OK via stdout and if i pass on something with 'badstring' I receive an ERR - according to all the docs i've read - should work on squid.</div><div>What actually happens is the helper processes begin spawning, 1/5, then another 1/5, until they fill up to 5/5 (tried setting max to 50 - they filled up to 50) and seem to somehow hang. <br>When passing -k shutdown to squid I see some weird gibberish logs e.g.:<br><div>[Errno 32] Broken pipe[Errno 32] Broken pipesys.stdout.write( 'ERR\n' )</div><div><br></div><div>Could someone advise on how to troubleshoot this further and get the helpers running? Or is there something im lacking here?<br><br>Regards,</div><div>Lukas</div><br></div><div><br></div></div></div></div></div>