Hi,
hm, I don’t really think so.
From a web proxy perspective, the cloaked domains are not to spot as such unless the CNAME resolving chain is taken into account. Squid, as far as I am aware, does not support such additional DNS inspections, and given the fact that many legitimate sites resolve via a couple of CNAMEs as well, this would be a tedious job to do.
Blocking the IP address of the advertising/tracker server is possible, but I would expect professional tracking services to host their stuff behind large CDNs, making them unblockable via the IP addresses, since one IP serves thousands of websites. (Someone once said Cloudflare is today’s biggest darknet, and in a way, that’s true…
)
Therefore, I am afraid the web proxy won’t really help here unless it has an up-to-date list of these tracking subdomains at hand. The rest is up to the browsers, and in doubt, I think putting the shields up there is more worth the effort.
Thanks, and best regards,
Peter Müller