For a generalized ad blocker, importing and updating filter lists is probably the most challenging bit. https://kb.adguard.com/en/general/adguard-ad-filters AdGuard has an amazing blog, their content is impressively broad and deep https://adguard.com/en/blog/how-ad-blocking-is-done.html