AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home/overview.html
GNU General Public License v3.0
25.76k stars 1.85k forks source link

Different client filter configuration #435

Open Kleinhirn opened 6 years ago

Kleinhirn commented 6 years ago

Hi,

is it possible to add a function for different client filter configuration. I want to set different filters for my pc`s in network - do you can make this?

Thanks

RainmakerRaw commented 10 months ago

Six years later... It's such a shame, because per-client filter list selection is the one killer feature AGH is missing. I ended up giving up, and now run Blocky on my LAN. It too is a single GO binary, one static YAML file, and I can list filters and assign clients or groups to them. Now ads and malware are blocked by default, but for kids also gambling, NSFW, enforced safesearch and piracy sites are blocked. I really hope you guys manage to finally integrate this some day, whether in the current AGH or the (at some point) AG DNS based rewrite.

privacy-advo commented 10 months ago

Six years later... It's the one killer feature AGH is missing.

@ameshkov @ainar-g Any chance we will see this? Maybe even a cancellation would help people. We really are waiting for it.

ainar-g commented 10 months ago

It is still planned. The main challenge is that the current filtering infrastructure is not designed to work with any custom engines. The design for a new system is ongoing, but it's still a challenge, as there are a lot of things to take into account, including some of the features being in conflict with each other. Simply copying filtering engines for each client would increase RAM consumption, for example, and we're already having issues reported about that every once in a while. Additionally, there are requirements of thread safety and general performance, e.g. filters updating must not block DNS processing for all other clients or that two clients shouldn't end up with different snapshots of the same filter.

In the meantime, there are workarounds:

AnthonyBe commented 10 months ago

Thanks @ainar-g , appreciate the explanation.

Equally, AG 'made' this problem by building some key features of AGH's functionality around the presumption of people using it's built-in DHCP server. Ironically, the built-in DHCP server cannot be used by users of AGH on Windows (feature not supported), so this isn't even a matter of choice as to whether to use AGH DHCP (yes, I could choose to use a different OS, but that is now compounding a bigger problem/solution).

Your community of users (including myself here https://github.com/AdguardTeam/AdGuardHome/issues/961) flagged this back in 2019, as a design direction that would create a lot of limitations (to put it politely :) ). There was ample time and opportunity to change course of AGH development. But you didn't. So, here we (still) are.

I am in no way implying that this is an easy problem to solve. I've been using AG products for a lot of years and I know you don't shy away from tough challenges. I imagine this is a conversation that more likely resolved around time, effort, priority, ROI, breadth of benefit, etc. I've worked in IT most of my life, so I get it. I am half-expecting the "we need to re-write the AGH code from scratch, to fix this, pull in a lot of the on-going development features from the public AG DNS product, and allow AGH and AG DNS to share common feature through more common code between the products".

privacy-advo commented 9 months ago

Thanks @ainar-g I'm very happy about $client. Not being able to use different configs made me write a 5k+ regex $client list myself over the years. : ) Nevertheless this eats up a lot of time, highly anticipate the feature. Good to hear it's still on the horizon.

(If AG paid DNS wouldn't have a 1k limit, I would use it. But when using default deny, 1k is not enough.)

hoang-rio commented 8 months ago

I'm try implementting this feature by my self at https://github.com/abpvn/AdGuardHome/releases This implement just like run multiple AdGuardHome server by clone current filtering engine per client. It's will got performance issue (memory leak, high CPU ussage) when running with a lot of client.

Someone does not enough pattient to waiting for new optimized filtering engine for per client filter list can try my implement. It's not the best but it work

ubergeek77 commented 3 weeks ago

Would it be reasonable in the current filtering system to, say:

Is that the best approach for now, or is $client an expensive operation that should only be used sparingly?

Happy to hear any clever workarounds people have thought of as well.