<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Courier;
        panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>You should use a note acl for that.<o:p></o:p></p><p class=MsoNormal>When you return the whitelisted client you should add a note which can be 1-100 or any other static string.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>It works just out of the box.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>----<o:p></o:p></p><p class=MsoNormal>Eliezer Croitoru<o:p></o:p></p><p class=MsoNormal>Tech Support<o:p></o:p></p><p class=MsoNormal>Mobile: +972-5-28704261<o:p></o:p></p><p class=MsoNormal>Email: <a href="mailto:ngtech1ltd@gmail.com"><span style='color:blue'>ngtech1ltd@gmail.com</span></a><o:p></o:p></p><p class=MsoNormal>Zoom: Coming soon<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> squid-users <squid-users-bounces@lists.squid-cache.org> <b>On Behalf Of </b>roee klinger<br><b>Sent:</b> Sunday, January 10, 2021 5:33 PM<br><b>To:</b> squid-users@lists.squid-cache.org<br><b>Subject:</b> [squid-users] cache_peer selection based on username<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hey,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>so far I have:<o:p></o:p></p></div><blockquote style='margin-left:30.0pt;margin-right:0in'><div><p class=MsoNormal><span style='font-size:7.5pt'>external_acl_type user_whitelist_external children-max=20 ttl=300 %>lp %>a script.sh</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>acl whitelisted_users external user_whitelist_external</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>http_access allow whitelisted_users</span><o:p></o:p></p></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>and:<o:p></o:p></p></div><blockquote style='margin-left:30.0pt;margin-right:0in'><div><p class=MsoNormal><span style='font-size:7.5pt'>nonhierarchical_direct off</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>never_direct allow all</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>cache_peer 192.168.8.1 parent 101 0 proxy-only default name=proxy1</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>cache_peer_access proxy1 allow whitelisted_users</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>cache_peer_access proxy0.2 deny all</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>cache_peer 192.168.8.2 parent 102 0 proxy-only default name=proxy2</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>cache_peer_access proxy2 allow whitelisted_users</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:7.5pt'>cache_peer_access proxy0.3 deny all</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></blockquote><p class=MsoNormal>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='font-size:9.0pt;font-family:Courier;color:#1E1E1E'>Defined keywords"</span><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#1E1E1E'> to select which cache peer to use or am I looking at this the wrong way?</span><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:#1E1E1E'>What would be the best way to accomplish this?</span><o:p></o:p></p></div></div></div></body></html>