TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.27k stars 418 forks source link

Advanced Blocking - TXT file with a collection of URLs not working #600

Open dannykorpan opened 1 year ago

dannykorpan commented 1 year ago

Hi,

if I define a URL to a TXT blocking list which includes a collection of blocking lists, blocking is not working e.g. with this list https://v.firebog.net/hosts/lists.php. But in Settings -> Blocking -> Allow/Block List URLs it's working.

Kind Regards, Danny

ShreyasZare commented 1 year ago

Thanks for the post. From what I understand, you configured a URL which returns a list of block list URLs? In that case its not going to work. The DNS Server is expecting a URL that returns list of domain names to block.

dannykorpan commented 1 year ago

That's correct. But within the Settings -> Blocking are it's working. Otherweise it's a suggestion for improvement.

ShreyasZare commented 1 year ago

You can just copy those URLs and paste them in the settings directly. How will this feature help since its not like you need to change the block list URLs frequently?

dannykorpan commented 1 year ago

The URLs in the list will change frequently.

PonchoPowers commented 1 year ago

I just want to pipe in and say consistency is a good idea too, either both work by parsing URL's for domains, or both parse domains only, having an inconsistent approach is only going to confuse people, resulting in more issues being logged.

ShreyasZare commented 1 year ago

Like what @BonnieSoftware said about inconsistency being one issue, the other issue is that it can cause cyclic dependency like a list of URLs where one of the URL returns a list of URLs.

For such specific requirements, its best that you write a small bash script that uses curl to call the HTTP API and update the block list URLs. You can then run this script with cron and it will keep it updated automatically.

dannykorpan commented 1 year ago

Thank you for the tip, I think there is still room for improvement. For a URL where one of the URL returns a list of URLs could be an acceptable restriction.

ShreyasZare commented 1 year ago

Thank you for the tip, I think there is still room for improvement. For a URL where one of the URL returns a list of URLs could be an acceptable restriction.

This is a very specific requirement which is not commonly needed and so is not justifying having a full feature support. Give a try with bash script, it will be quite easy to get it to work.

dannykorpan commented 1 year ago

A bash script is totally fine for me, but possibly not for others. If you want a sustainable product with included blocking feature, it's a must have function.

ShreyasZare commented 1 year ago

Ok so lets keep this idea open for a while which will allow more time to think on it.