<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#464646" bgcolor="#FFFFFF">
<font face="monospace">Hi Jonathan<br>
<br>
Using squid as a PAC proxy provider is not an efficient solution.<br>
- Squid cache error pages, which may cause problems when modifying
the source.<br>
- The PAC proxy will generate events in squid that are polluting
for troubleshooting.<br>
- If squid has issues or is stopped ( disk full, false config..) ,
it will be difficult to provide an alternative way.<br>
<br>
To this end, we're offering a free, open-source service dedicated
to PAC proxies, with the distinctive feature of offering several
PAC proxies depending on the client source and browser.<br>
A web-based management console lets you build the Proxy PAC, test
your rules and view access events.<br>
This solution is independent, leaving the squid free to focus on
its designated mission.<br>
<br>
<a class="moz-txt-link-freetext" href="https://wiki.articatech.com/en/proxy-service/proxy-pac">https://wiki.articatech.com/en/proxy-service/proxy-pac</a><br>
<br>
regards<br>
</font><br>
<br>
<div class="moz-cite-prefix">Le 09/12/2024 à 14:40,
<a class="moz-txt-link-abbreviated" href="mailto:ngtech1ltd@gmail.com">ngtech1ltd@gmail.com</a> a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:044a01db4a3f$f6c2d3c0$e4487b40$@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}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]-->
<div class="WordSection1">
<p class="MsoNormal">Hey Jonathan,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can you give more details on the setup?<o:p></o:p></p>
<p class="MsoNormal">I am unsure how this setup work.<o:p></o:p></p>
<p class="MsoNormal">Is this an intercept proxy or a simple
forward proxy?<o:p></o:p></p>
<p class="MsoNormal">Is the 192.168.1.1 the proxy ip and port?
Also is the client on the same subnet?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I understand that you are trying to use the
proxy to serve the wpad file somehow.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Eliezer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> squid-users
<a class="moz-txt-link-rfc2396E" href="mailto:squid-users-bounces@lists.squid-cache.org"><squid-users-bounces@lists.squid-cache.org></a> <b>On
Behalf Of </b>Jonathan Lee<br>
<b>Sent:</b> Monday, December 2, 2024 12:04 AM<br>
<b>To:</b> Jonathan Lee <a class="moz-txt-link-rfc2396E" href="mailto:jonathanlee571@gmail.com"><jonathanlee571@gmail.com></a><br>
<b>Cc:</b> squid-users
<a class="moz-txt-link-rfc2396E" href="mailto:squid-users@lists.squid-cache.org"><squid-users@lists.squid-cache.org></a><br>
<b>Subject:</b> Re: [squid-users] Wpad<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">this is the wpad file I am using <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">function FindProxyForURL(url, host) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">url = url.toLowerCase();<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">host = host.toLowerCase();<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">if (isPlainHostName(host)) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> return 'DIRECT';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">if (isResolvable(host)) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">var hostIP = dnsResolve(host);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">if (isInNet(hostIP, '0.0.0.0',
'255.0.0.0') || isInNet(hostIP, '10.0.0.0', '255.0.0.0')
||<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">isInNet(hostIP, '127.0.0.0',
'255.0.0.0') || isInNet(hostIP, '169.254.0.0',
'255.255.0.0') ||<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">isInNet(hostIP, '172.16.0.0',
'255.240.0.0') || isInNet(hostIP, '192.168.0.0',
'255.255.0.0') ||<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">isInNet(hostIP, '198.18.0.0',
'255.254.0.0') || isInNet(hostIP, '224.0.0.0',
'240.0.0.0') ||<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">isInNet(hostIP, '240.0.0.0',
'240.0.0.0')) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> return 'DIRECT';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">if (false) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> return 'DIRECT';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">if (url.substring(0, 5) == 'http:' ||
url.substring(0, 6) == 'https:' ||<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">url.substring(0, 4) == 'ftp:') <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">{<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> return 'PROXY 192.168.1.1:3128';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">return 'DIRECT';<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">}<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Dec 1, 2024, at 13:58, Jonathan
Lee <<a href="mailto:jonathanlee571@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">jonathanlee571@gmail.com</a>>
wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">this is what I have tried it also
fails <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">acl wpad urlpath_regex
^/wpad.dat$<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">acl wpad urlpath_regex
^/proxy.pac$<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">deny_info
200:/usr/local/www/wpad.dat wpad<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">deny_info
200:/usr/local/www/proxy.pac wpad<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">http_access deny wpad<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">reply_header_access
Content-Type deny wpad<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">reply_header_replace
Content-Type application/x-ns-proxy-autoconfig<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">when you run squid -k parse
it take the config file<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What I want to do is when it
sees that reg ex to send it to this URL <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a
href="https://192.168.1.1:8080/wpad.dat"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://192.168.1.1:8080/wpad.dat</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote
style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Dec 1, 2024, at 09:01,
Jonathan Lee <<a
href="mailto:jonathanlee571@gmail.com"
moz-do-not-send="true"
class="moz-txt-link-freetext">jonathanlee571@gmail.com</a>>
wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Thank you again this
works perfectly for my issues I had<br>
<br>
<br>
<o:p></o:p></p>
<blockquote
style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">On Oct 2, 2024, at
20:51, Amos Jeffries <<a
href="mailto:squid3@treenet.co.nz"
moz-do-not-send="true"
class="moz-txt-link-freetext">squid3@treenet.co.nz</a>>
wrote:<br>
<br>
On 2/10/24 05:05, Jonathan Lee wrote:<br>
<br>
<o:p></o:p></p>
<blockquote
style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello fellow squid
users,<br>
Can you please help? I am attempting
to run wpad on the same machine as
squid however port 80 443 is blocked,
I have a url redirect
192.168.1.1/wpad.dat to <a
href="https://192.168.1.1:8080/wpad.dat" moz-do-not-send="true"
class="moz-txt-link-freetext">https://192.168.1.1:8080/wpad.dat</a>
this is done with use of squid guard,
however you must disable bypass for
192.168.1.1 on squid. Squid resides on
192.168.1.1:3128,<br>
It works on the iMac for auto config
proxy I can access the url file within
the redirect.<br>
My question is how can this be managed
directly with squid custom config ??
Is there a way to have squid manage a
simple wpad?<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
<br>
acl wpad urlpath_regex ^/wpad.dat$<br>
deny_info 200:/etc/squid/wpad.dat wpad<br>
http_access deny wpad<br>
<br>
reply_header_access Content-Type deny
wpad<br>
reply_header_replace Content-Type
application/x-ns-proxy-autoconfig<br>
<br>
<br>
<br>
HTH<br>
Amos<br>
_______________________________________________<br>
squid-users mailing list<br>
<a
href="mailto:squid-users@lists.squid-cache.org" moz-do-not-send="true"
class="moz-txt-link-freetext">squid-users@lists.squid-cache.org</a><br>
<a
href="https://lists.squid-cache.org/listinfo/squid-users"
moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.squid-cache.org/listinfo/squid-users</a><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
squid-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a>
<a class="moz-txt-link-freetext" href="https://lists.squid-cache.org/listinfo/squid-users">https://lists.squid-cache.org/listinfo/squid-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
David Touzeau - Artica Tech France
Development team, level 3 support
----------------------------------
P: +33 6 58 44 69 46
www: <a class="moz-txt-link-freetext" href="https://wiki.articatech.com">https://wiki.articatech.com</a>
www: <a class="moz-txt-link-freetext" href="http://articatech.net">http://articatech.net</a> </pre>
</body>
</html>