[squid-users] Wpad
Jonathan Lee
jonathanlee571 at gmail.com
Sun Dec 1 22:03:33 UTC 2024
this is the wpad file I am using
function FindProxyForURL(url, host)
{
url = url.toLowerCase();
host = host.toLowerCase();
if (isPlainHostName(host))
{
return 'DIRECT';
}
if (isResolvable(host))
{
var hostIP = dnsResolve(host);
if (isInNet(hostIP, '0.0.0.0', '255.0.0.0') || isInNet(hostIP, '10.0.0.0', '255.0.0.0') ||
isInNet(hostIP, '127.0.0.0', '255.0.0.0') || isInNet(hostIP, '169.254.0.0', '255.255.0.0') ||
isInNet(hostIP, '172.16.0.0', '255.240.0.0') || isInNet(hostIP, '192.168.0.0', '255.255.0.0') ||
isInNet(hostIP, '198.18.0.0', '255.254.0.0') || isInNet(hostIP, '224.0.0.0', '240.0.0.0') ||
isInNet(hostIP, '240.0.0.0', '240.0.0.0'))
{
return 'DIRECT';
}
if (false)
{
return 'DIRECT';
}
}
if (url.substring(0, 5) == 'http:' || url.substring(0, 6) == 'https:' ||
url.substring(0, 4) == 'ftp:')
{
return 'PROXY 192.168.1.1:3128';
}
return 'DIRECT';
}
> On Dec 1, 2024, at 13:58, Jonathan Lee <jonathanlee571 at gmail.com> wrote:
>
> this is what I have tried it also fails
>
> acl wpad urlpath_regex ^/wpad.dat$
> acl wpad urlpath_regex ^/proxy.pac$
> deny_info 200:/usr/local/www/wpad.dat wpad
> deny_info 200:/usr/local/www/proxy.pac wpad
> http_access deny wpad
>
> reply_header_access Content-Type deny wpad
> reply_header_replace Content-Type application/x-ns-proxy-autoconfig
>
> when you run squid -k parse it take the config file
>
>
> What I want to do is when it sees that reg ex to send it to this URL
> https://192.168.1.1:8080/wpad.dat
>
>
>
>> On Dec 1, 2024, at 09:01, Jonathan Lee <jonathanlee571 at gmail.com> wrote:
>>
>> Thank you again this works perfectly for my issues I had
>>
>>> On Oct 2, 2024, at 20:51, Amos Jeffries <squid3 at treenet.co.nz> wrote:
>>>
>>> On 2/10/24 05:05, Jonathan Lee wrote:
>>>> Hello fellow squid users,
>>>> 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 https://192.168.1.1:8080/wpad.dat 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,
>>>> It works on the iMac for auto config proxy I can access the url file within the redirect.
>>>> My question is how can this be managed directly with squid custom config ?? Is there a way to have squid manage a simple wpad?
>>>
>>>
>>> acl wpad urlpath_regex ^/wpad.dat$
>>> deny_info 200:/etc/squid/wpad.dat wpad
>>> http_access deny wpad
>>>
>>> reply_header_access Content-Type deny wpad
>>> reply_header_replace Content-Type application/x-ns-proxy-autoconfig
>>>
>>>
>>>
>>> HTH
>>> Amos
>>> _______________________________________________
>>> squid-users mailing list
>>> squid-users at lists.squid-cache.org
>>> https://lists.squid-cache.org/listinfo/squid-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20241201/b784b4a7/attachment.htm>
More information about the squid-users
mailing list