<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">This is my squid3.conf</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>#Recommended minimum configuration:<br>
<br>
#acl manager proto cache_object<br>
http_port 3128<br>
cache_dir ufs /var/spool/squid3 2048 16 256<br>
maximum_object_size 100 MB<br>
cache_swap_low 90<br>
cache_swap_high 95<br>
<br>
#--------------- Reglas de Autorizacion -------------<br>
auth_param basic program  /usr/bin/php /root/squid_helper2.php<br>
auth_param basic children 20<br>
auth_param basic realm Proxy Quijada Usuario Y Clave<br>
auth_param basic credentialsttl 5 hours<br>
#----------------------------------------------------<br>
acl AuthenticatedUsers proxy_auth REQUIRED<br>
http_access allow AuthenticatedUsers<br>
#-------------------- ACL Puertos --------------------<br>
acl SSL_ports port 443<br>
acl Safe_ports port 80          # http<br>
acl Safe_ports port 21          # ftp<br>
acl Safe_ports port 443         # https<br>
acl Safe_ports port 70          # gopher<br>
acl Safe_ports port 210         # wais<br>
acl Safe_ports port 1025-65535  # unregistered ports<br>
acl Safe_ports port 280         # http-mgmt<br>
acl Safe_ports port 488         # gss-http<br>
acl Safe_ports port 591         # filemaker<br>
acl Safe_ports port 777         # multiling http<br>
<br>
acl CONNECT method CONNECT<br>
<br>
#---------------------- HTTP ACCES DEFAULT-------------<br>
#http_access allow manager localhost<br>
#http_access deny manager<br>
#http_access deny !Safe_ports<br>
<br>
#http_access deny to_localhost<br>
#icp_access deny all<br>
#htcp_access deny all<br>
<br>
<br>
<br>
</div>
<br>
<p></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> squid-users <squid-users-bounces@lists.squid-cache.org> on behalf of Antony Stone <Antony.Stone@squid.open.source.it><br>
<b>Sent:</b> Monday, December 11, 2017 9:27 PM<br>
<b>To:</b> squid-users@lists.squid-cache.org<br>
<b>Subject:</b> Re: [squid-users] Helper doent authentify</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Monday 11 December 2017 at 22:19:53, Edwin Quijada wrote:<br>
<br>
> Hi!<br>
> I am trying to do a helper for use with Squid. I did my helper but it<br>
> doesnt authentify<br>
> <br>
> <?php<br>
> <br>
> $f = fopen("php://stdin", "r");<br>
> while (!(feof($f)))<br>
> {<br>
>     $line = fgets($f);<br>
>     if ($line)<br>
>      {<br>
>         $fields = explode(' ', trim($line));<br>
>         $username = rawurldecode($fields[0]);<br>
>         $password = rawurldecode($fields[1]);<br>
> <br>
>         if ($username=="edwin" &&  $password=="1234")<br>
>          fwrite(STDOUT, "OK\n");<br>
>         else<br>
>          fwrite(STDOUT, "ERR\n");<br>
>     }<br>
> }<br>
> ?><br>
> <br>
> when I put the values it continues asked me user/password<br>
<br>
I think "$f" might be your problem.<br>
<br>
See <a href="http://freesoftwaremagazine.com/articles/authentication_with_squid/" id="LPlnk147843" previewremoved="true">
http://freesoftwaremagazine.com/articles/authentication_with_squid/</a> for
<div id="LPBorder_GT_15130295615680.8018080152429012" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15130295615630.5125536345680759" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="TextCell_15130295615650.5503471636695072" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15130295615650.606998951878155"></div>
<div id="LPTitle_15130295615650.6861709935044179" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15130295615660.8162161060843649" style="text-decoration: none;" href="http://freesoftwaremagazine.com/articles/authentication_with_squid/" target="_blank">How to build squid authentication helpers</a></div>
<div id="LPMetadata_15130295615670.636656824858096" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
freesoftwaremagazine.com</div>
<div id="LPDescription_15130295615670.9023132416205352" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Have you ever tried to figure out how to make Squid authenticate users according to your own exotic rules? Users are in a DB? Are you using an ActiveDirectory?</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
what might be a clue (sorry, I'm not really a PHP coder).<br>
<br>
<br>
Antony.<br>
<br>
-- <br>
Why is "dylexia" so difficult to spell, and why can I never remember "aphasia" <br>
when I want to?<br>
<br>
                                                   Please reply to the list;<br>
                                                         please *don't* CC me.<br>
_______________________________________________<br>
squid-users mailing list<br>
squid-users@lists.squid-cache.org<br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" id="LPlnk476946" previewremoved="true">http://lists.squid-cache.org/listinfo/squid-users</a>
<div id="LPBorder_GT_15130295616620.5159632751665033" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15130295616590.8500171286998929" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);" role="presentation" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="TextCell_15130295616590.16983093518756232" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" colspan="2">
<div id="LPRemovePreviewContainer_15130295616600.86739464444574"></div>
<div id="LPTitle_15130295616600.7988795178602608" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15130295616600.2927020635258505" style="text-decoration: none;" href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank">squid-users Info Page</a></div>
<div id="LPMetadata_15130295616610.40914686697076896" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.squid-cache.org</div>
<div id="LPDescription_15130295616610.4817637094095626" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
squid-users -- General discussion relating to Squid. The membership of this list is thousands of Squid users from around the world About squid-users</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>