<div dir="auto">Squid provides the acl login or username.<div dir="auto"><a href="http://www.squid-cache.org/Doc/config/acl/">http://www.squid-cache.org/Doc/config/acl/</a></div><div dir="auto"><br></div><div dir="auto">should have maybe ident.</div><div dir="auto">you will need to include a usernames file which contains them.</div><div dir="auto"><br></div><div dir="auto">I believe a note in a helper should do that better.</div><div dir="auto"><br></div><div dir="auto">Eliezer</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 10, 2021, 17:33 roee klinger <<a href="mailto:roeeklinger60@gmail.com">roeeklinger60@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey,<br><div><br></div><div>I am trying to figure out the best way to select cache peers based on the client username, I have read extensively but I cannot figure out the best way to do it.</div><div><br></div><div>so far I have:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font size="1">external_acl_type user_whitelist_external children-max=20 ttl=300 %>lp %>a script.sh</font></div><div><font size="1">acl whitelisted_users external user_whitelist_external</font></div><div><font size="1">http_access allow whitelisted_users</font></div></blockquote><div><br></div><div>and:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font size="1">nonhierarchical_direct off</font></div><div><font size="1">never_direct allow all</font></div><div><font size="1">cache_peer 192.168.8.1 parent 101 0 proxy-only default name=proxy1</font></div><div><font size="1">cache_peer_access proxy1 allow whitelisted_users</font></div><div><font size="1">cache_peer_access proxy0.2 deny all</font></div><div><font size="1">cache_peer 192.168.8.2 parent 102 0 proxy-only default name=proxy2</font></div><div><font size="1">cache_peer_access proxy2 allow whitelisted_users</font></div><div><font size="1">cache_peer_access proxy0.3 deny all</font></div><div><br></div></blockquote>ideally, script.sh checks if the request is authinticated and if it is, it selects the cache peer to use, is there some kind of way to achieve this with "<span style="color:rgb(30,30,30);font-family:courier;font-size:12px">Defined keywords"</span><span style="color:rgb(30,30,30);font-size:12px"><font face="arial, sans-serif"> to select which cache peer to use or am I looking at this the wrong way?</font></span><div><span style="color:rgb(30,30,30);font-size:12px"><font face="arial, sans-serif"><br></font></span></div><div><font color="#1e1e1e" face="arial, sans-serif"><span style="font-size:12px">What would be the best way to accomplish this?</span></font></div></div>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank" rel="noreferrer">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>