I have set up Squid to block pages on my own system (i.e not on a network), and I'm trying to get SSL to work with page blocking. To this end, I've set up ssl-bump and installed the certificate to my browser.
I want to block
*.reddit.com/* (on both HTTPS and HTTP), but I want to allow the child URL
*.reddit.com/r/LearnJapanese only (on both HTTP and HTTPS)
Here is part of my squid.conf file:
acl bad_domain url_regex "/usr/local/squid/etc/block.acl" acl good_domain url_regex "/usr/local/squid/etc/allow.acl" http_access deny bad_domain !good_domain http_access allow good_domain http_access allow localnet http_access allow localhost http_access deny all # Squid normally listens to port 3128 http_port 3128 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=10MB cert=/usr/local/squid/etc/squid.pem ssl_bump allow all sslproxy_cert_error allow all sslproxy_flags DONT_VERIFY_PEER
Contents of block.acl:
Contents of allow.acl:
It works fine of HTTP (i.e reddit.com/r/LearnJapanese can be accessed, but the rest of Reddit cannot), but I don't have the same luck with HTTPS.
When I access Reddit over HTTPS, the pages are not blocked at all, but they should be (except for reddit.com/r/LearnJapanese of course).
How can I block access to all of Reddit (aside from .reddit.com/r/LearnJapanese/) over both HTTP and HTTPS? Thank you.