<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1464992752115_16871"><span style="color: rgb(20, 20, 20); font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 20.5333px;" id="yui_3_16_0_ym19_1_1464992752115_16872">So I have squid (latest) running in a a jail, and I am able to use it communicate with it via the browser. But I am trying to set it up so that I can use a proxy.pac file. I have the proxy.pac configured. Firefox is being used as my testbed. When I switch over the pac file I get nothing in the logs. Not sure why. Below is my config.</span></div><div style="font-family: Calibri, sans-serif;" id="yui_3_16_0_ym19_1_1464992752115_16873"><span style="color: rgb(20, 20, 20); font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 20.5333px;" id="yui_3_16_0_ym19_1_1464992752115_16874"><br id="yui_3_16_0_ym19_1_1464992752115_16875"></span></div><div style="font-family: Calibri, sans-serif;" dir="ltr" id="yui_3_16_0_ym19_1_1464992752115_16876"><pre style="padding: 10px; font-family: Consolas, "Courier New", Courier, monospace; line-height: 1.24; word-wrap: normal; font-size: 10pt; border-radius: 5px; overflow: auto; min-height: 30px; max-height: 500px; direction: ltr; color: rgb(20, 20, 20);" id="yui_3_16_0_ym19_1_1464992752115_16877">root@proxy:/usr/local/etc/squid # cat squid.conf
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl our_networks src 10.150.1.0/24
#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports
# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
# Only allow cachemgr access from localhost
http_access allow localhost manager our_networks
http_access deny manager
# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port 3128
# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/squid/cache 100 16 256
# Leave coredumps in the first cache dir
coredump_dir /var/squid/cache
#
# Add any of your own refresh_pattern entries above these.
#
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
visible_hostname proxy01.borg.local
access_log /var/log/squid/access.log squid
#logformat custom %{%Y-%m-%d %H:%M:%S}tl %03tu %>a %tr %ul %ui %>Hs %mt %rm %ru %rv %st %Sh %Ss
logformat squid %tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
client_db on
dns_defnames on
httpd_suppress_version_string on
retry_on_error on
uri_whitespace strip
strip_query_terms off
#pipeline_prefetch on
cache deny all
#cache_dir null /tmp
ident_lookup_access deny all
## disable ads ( <a href="http://pgl.yoyo.org/adservers/" target="_blank" rel="nofollow" style="color: rgb(102, 0, 0); text-decoration: none; border-radius: 5px; padding-right: 3px; padding-left: 3px;" id="yui_3_16_0_ym19_1_1464992752115_16878">http://pgl.yoyo.org/adservers/</a> )
acl adsites url_regex -i "/usr/local/etc/squid/ad_block.txt"
http_access deny adsites
deny_info <a href="http://proxy.borg.local/blocked.html" target="_blank" rel="nofollow" style="color: rgb(102, 0, 0); text-decoration: none; border-radius: 5px; padding-right: 3px; padding-left: 3px;" id="yui_3_16_0_ym19_1_1464992752115_16879">http://proxy.borg.local/blocked.html</a> adsites
root@proxy:/usr/local/etc/squid #
Proxy.pac
function FindProxyForURL(url, host) {
//Don't proxy connections to the UTM web interface
if (shExpMatch(url, "<a target="_blank" rel="nofollow" style="color: rgb(102, 0, 0); text-decoration: none; border-radius: 5px; padding-right: 3px; padding-left: 3px;" id="yui_3_16_0_ym19_1_1464992752115_16880" href="">https://${asg_hostname}*</a>")) return "DIRECT";
if (shExpMatch(url, "https://" + dnsResolve(host) + "*")) return "DIRECT";
//Exclude non-fqdn hosts from being proxied
if (isPlainHostName(host)) return "DIRECT";
//Don't proxy connections to the exempted URL matches
if (shExpMatch(url, "*borg.local*")) return "DIRECT";
if (isInNet(myIpAddress(), "10.150.0.0", "255.255.0.0")) {return "PROXY proxy.borg.local:3128" ;}
return "DIRECT";
}</pre></div></div></body></html>