localadmin@squid:~$ cat /etc/squid/squid.conf
[...]
acl notracking dstdomain "/etc/squid/notracking_blocklist.acl"
http_access deny notracking
http_access deny notracking CONNECT
[...]
localadmin@squid:~$ sudo crontab -l
50 * * * * cd /opt/hosts-blocklists/ && git pull > /opt/git_pull.log 2>&1
55 * * * * squid-translator -d /opt/hosts-blocklists/domains.txt -s /etc/squid/notracking_blocklist.acl
0 * * * * systemctl reload squid.service
loc target/release/squid-translator
--------------------------------------------------------------------------------
Language Files Lines Blank Comment Code
--------------------------------------------------------------------------------
Rust 1 105 12 9 84
--------------------------------------------------------------------------------
Total 1 105 12 9 84
--------------------------------------------------------------------------------
file target/release/squid-translator
target/release/squid-translator: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=82026bcabea94f4752c5238e8fd210f632a14e28, stripped
size target/release/squid-translator
text data bss dec hex filename
1875027 141224 4456 2020707 1ed563 target/release/squid-translator
ls -alh target/release/squid-translator
[...] 2.0M Aug 21 10:59 target/release/squid-translator
localadmin@squid:~$ sudo squid-translator -h
Squid NoTracking Translator 1.0
Matthew Knight <[email protected]>
Converts https://github.com/notracking/hosts-blocklists to Squid compatible blocklist
USAGE:
squid-translator --domain_blocklist <DOMAIN_BLOCKLIST> --squid_blocklist <SQUID_BLOCKLIST>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-d, --domain_blocklist <DOMAIN_BLOCKLIST> Sets the filename for the dnsmasq compatible domain blocklist
-s, --squid_blocklist <SQUID_BLOCKLIST> Sets the filename for the translated Squid compatible domain blocklist