<div dir="ltr"><div>very clever, so you bunch all the acls up <br></div><div><br></div><div>
acl NoSSLInterceptAnyOf any-of NoSSLInterceptDstDom NoSSLInterceptDstDomFile NoSSLInterceptRegEx NoSSLInterceptRegExFile <br></div><div><br></div><div>the key word is "any-of" ie if the url hits any one do that first</div><div><br></div><div>what about instead of making it <br></div><div><br></div><div>
ssl::server_name_regex <br></div><div><br></div><div>i make it</div><div><br></div><div>
<strong>dstdom_regex</strong></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 29 Jun 2023 at 01:38, <<a href="mailto:ngtech1ltd@gmail.com">ngtech1ltd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Rob,<br>
<br>
The first thing is to allow the domain in the http_acces just to be sure and use a basic deny all bottom line.<br>
Let me try to simplify your squid.conf<br>
In a link:<br>
<a href="https://gist.github.com/elico/b49f4a28d4b5db5ba882b10d40872d5e" rel="noreferrer" target="_blank">https://gist.github.com/elico/b49f4a28d4b5db5ba882b10d40872d5e</a><br>
<br>
In plain text:<br>
## START OF FILE<br>
# SSL Interception  basic rules<br>
acl DiscoverSNIHost at_step SslBump1<br>
<br>
acl NoSSLInterceptRegEx ssl::server_name_regex (^|.*\.)redshift3d\.com$<br>
acl NoSSLInterceptRegExFile ssl::server_name_regex "/usr/local/squid/etc/no-intercept-ssl-regex.txt"<br>
<br>
acl NoSSLInterceptDstDom ssl::server_name .<a href="http://redshift3d.com" rel="noreferrer" target="_blank">redshift3d.com</a><br>
acl NoSSLInterceptDstDomFile ssl::server_name "/usr/local/squid/etc/no-intercept-ssl-dstdom.txt"<br>
<br>
## Any of will test what ever rule match first in a first match/hit fasion<br>
acl NoSSLInterceptAnyOf any-of NoSSLInterceptDstDom NoSSLInterceptDstDomFile NoSSLInterceptRegEx NoSSLInterceptRegExFile<br>
<br>
ssl_bump peek DiscoverSNIHost<br>
ssl_bump splice NoSSLInterceptAnyOf<br>
ssl_bump bump all<br>
<br>
#SSL Bump port<br>
http_port 3128 ssl-bump cert=/usr/local/squid/etc/ssl_cert/myCA.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB<br>
sslcrtd_program /usr/local/squid/libexec/security_file_certgen -s /var/lib/ssl_db -M 4MB<br>
<br>
## http_access acls, will apply on incomming requests and not on responses<br>
acl special_url_regex url_regex https?://(^|.*\.)redshift3d\.com\/<br>
acl special_url_regex_file url_regex "/usr/local/squid/etc/special_url_regex.txt"<br>
<br>
acl special_url_dst_dom dstdomain .<a href="http://redshift3d.com" rel="noreferrer" target="_blank">redshift3d.com</a><br>
acl special_url_dst_dom_file dstdomain "/usr/local/squid/etc/special_url_dstdom.txt"<br>
<br>
acl special_url_any_of any-of special_url_dst_dom special_url_dst_dom_file special_url_regex special_url_regex_file<br>
<br>
acl localnet src <a href="http://192.168.0.0/16" rel="noreferrer" target="_blank">192.168.0.0/16</a><br>
acl localnet src <a href="http://10.0.0.0/8" rel="noreferrer" target="_blank">10.0.0.0/8</a><br>
<br>
http_access allow localnet special_url_any_of<br>
http_access deny all<br>
## END OF FILE<br>
<br>
 Once the above will work try to add other http_access rule like reply access rules<br>
<br>
Let me know what happens,<br>
Eliezer<br>
<br>
From: robert k Wild <<a href="mailto:robertkwild@gmail.com" target="_blank">robertkwild@gmail.com</a>> <br>
Sent: Tuesday, June 27, 2023 09:36<br>
To: <a href="mailto:ngtech1ltd@gmail.com" target="_blank">ngtech1ltd@gmail.com</a><br>
Cc: Squid Users <<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a>><br>
Subject: Re: [squid-users] make URL bypass squid proxy<br>
<br>
Hi Eliezer,<br>
<br>
this is a snippet of my whitelist and no intercept SSL config<br>
<br>
#SSL Interception<br>
acl DiscoverSNIHost at_step SslBump1<br>
acl NoSSLIntercept ssl::server_name_regex "/usr/local/squid/etc/interceptssl.txt"<br>
ssl_bump peek DiscoverSNIHost<br>
ssl_bump splice NoSSLIntercept<br>
ssl_bump bump all<br>
#<br>
#SSL Bump<br>
http_port 3128 ssl-bump cert=/usr/local/squid/etc/ssl_cert/myCA.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB<br>
sslcrtd_program /usr/local/squid/libexec/security_file_certgen -s /var/lib/ssl_db -M 4MB<br>
#<br>
#deny up MIME types<br>
acl upmime req_mime_type "/usr/local/squid/etc/mimedeny.txt"<br>
#<br>
#deny URL links<br>
acl url_links url_regex "/usr/local/squid/etc/linksurl.txt"<br>
#<br>
#allow special URL paths<br>
acl special_url url_regex "/usr/local/squid/etc/urlspecial.txt"<br>
#<br>
#deny down MIME types<br>
acl downmime rep_mime_type "/usr/local/squid/etc/mimedeny.txt"<br>
#<br>
http_reply_access allow special_url<br>
http_reply_access deny downmime<br>
#http_access deny upmime<br>
#http_access deny url_links<br>
#<br>
#HTTP_HTTPS whitelist websites<br>
acl whitelist ssl::server_name_regex "/usr/local/squid/etc/urlwhite.txt"<br>
#<br>
http_access allow activation whitelist<br>
http_access deny all<br>
<br>
so basically no SSL interception<br>
<br>
#SSL Interception<br>
acl DiscoverSNIHost at_step SslBump1<br>
acl NoSSLIntercept ssl::server_name_regex "/usr/local/squid/etc/interceptssl.txt"<br>
ssl_bump peek DiscoverSNIHost<br>
ssl_bump splice NoSSLIntercept<br>
ssl_bump bump all <br>
<br>
and whitelisting<br>
<br>
#HTTP_HTTPS whitelist websites<br>
acl whitelist ssl::server_name_regex "/usr/local/squid/etc/urlwhite.txt" <br>
<br>
in both txt files ie<br>
<br>
/usr/local/squid/etc/interceptssl.txt <br>
/usr/local/squid/etc/urlwhite.txt <br>
<br>
i have a URL that first i have to whitelist and then if i want squid not to inspect the url traffic i put it in the SSL interception (i do this as some websites dont like MITM )<br>
<br>
but even putting the URL in question in both files im still having issues with this website ie its still being detected that its passing through a proxy<br>
<br>
thanks,<br>
rob<br>
<br>
On Mon, 26 Jun 2023 at 23:35, <mailto:<a href="mailto:ngtech1ltd@gmail.com" target="_blank">ngtech1ltd@gmail.com</a>> wrote:<br>
Hey Robert,<br>
<br>
I am not sure what forward proxy setup you have there.<br>
A simple forward proxy?<br>
What tool are you using for whitelisting?<br>
You can use an external acl helper to allow dynamic updates of the whitelists or<br>
to periodic update your lists and reload.<br>
It will depend on the size of your lists.<br>
What OS are you using for your squid proxy?<br>
<br>
More details will help us help you.<br>
<br>
Eliezer<br>
<br>
From: squid-users <mailto:<a href="mailto:squid-users-bounces@lists.squid-cache.org" target="_blank">squid-users-bounces@lists.squid-cache.org</a>> On Behalf Of robert k Wild<br>
Sent: Monday, June 26, 2023 22:25<br>
To: Squid Users <mailto:<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a>><br>
Subject: [squid-users] make URL bypass squid proxy<br>
<br>
hi all,<br>
<br>
i have set up squid for url whitelisting and no intercept SSL (see below)<br>
<br>
<a href="https://wiki.squid-cache.org/ConfigExamples/Caching/AdobeProducts" rel="noreferrer" target="_blank">https://wiki.squid-cache.org/ConfigExamples/Caching/AdobeProducts</a><br>
<br>
but some websites i want the client to bypass the squid proxy and go straight to the website as i think this is why a url isnt working even when i add the url to both files ie urlwhite and no intercept SSL<br>
<br>
<br>
<br>
thanks,<br>
rob<br>
<br>
-- <br>
Regards, <br>
<br>
Robert K Wild.<br>
<br>
<br>
-- <br>
Regards, <br>
<br>
Robert K Wild.<br>
<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Regards, <br><br>Robert K Wild.<br></div></div>