<div dir="ltr">Hi,<div><br></div><div>Thanks for the links. So I tried what you suggested and for testing, I was using this simple config:-</div><div><br></div><div><div>http_port 8080</div><div>auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords</div><div>auth_param basic realm proxy</div><div>external_acl_type checkclient children-max=20 %MYADDR %LOGIN /usr/local/squidauth.py</div><div>acl authenticated external checkclient</div><div>http_access allow authenticated</div><div>cache deny all</div><div>forwarded_for delete</div><div>request_header_access Via deny all</div><div><br></div><div>I made sure that the squidauth.py file was executable and when debugging, I found that the helper processes were running. But nothing was getting passed to the helper processes. In the python code, I was running a loop which reads lines from the stdin and parses them and writes output to the stdout. I checked and it wasn't getting anything from stdin. (I added a line which reads the input line from stdin and sends it to another server through a http request to make sure if it was getting anything from stdin at all)</div><div><br></div><div>But, when I tried to use the proxy(and of course I was using a username and password that was stored in /etc/squid/passwords), I kept getting the error that authentication required, i.e. the server was sending back the header Proxy-Authenticate: Basic realm="proxy". I am not sure what I am doing wrong here.</div><div><br></div><div>With regards,</div><div>Sonya Roy</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 20, 2017 at 2:49 AM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 20/06/17 09:15, Amos Jeffries wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 20/06/17 03:20, Sonya Roy wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Since you are saying the IP that can be passed to the helpers is<br>
configurable, how would I pass the local IP of the server that the<br>
client connected to?<br>
<br>
I checked out the helpers you mentioned, there they check which IP the<br>
connection is coming from. Not the local IP of the server that the<br>
client is connected to and they are using %SRC for that.<br>
</blockquote>
<br>
The external ACL helpers don't know one IP from any other. They simply<br>
check what is given to them against some form of username+ip mapping.<br>
<br>
</blockquote>
<br></span>
[ with the correct links ]<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
<br>
In Squid-3.5 that would be %MYADDR<br></span>
<<a href="http://www.squid-cache.org/Versions/v3/3.5/cfgman/external_acl_type.html" rel="noreferrer" target="_blank">http://www.squid-cache.org/Ve<wbr>rsions/v3/3.5/cfgman/external_<wbr>acl_type.html</a>>.<span class="gmail-"><br>
<br>
In Squid-4+ it would be %>la<br></span>
<<a href="http://www.squid-cache.org/Versions/v3/3.5/cfgman/logformat.html" rel="noreferrer" target="_blank">http://www.squid-cache.org/Ve<wbr>rsions/v3/3.5/cfgman/logformat<wbr>.html</a>><br>
<br>
</blockquote><div class="gmail-HOEnZb"><div class="gmail-h5">
<br>
Amos<br>
______________________________<wbr>_________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.<wbr>org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">http://lists.squid-cache.org/l<wbr>istinfo/squid-users</a><br>
</div></div></blockquote></div><br></div></div></div>