routedns
routedns copied to clipboard
RouteDNS exits when using an URL "source" that generates an error
When using a source
pointing to an URL, and the download fails (for example 404: Does not exist), RouteDNS exits.
Would it be possible to exit more gracefully, or have an option to ignore the error and retry again later? And stay running?
I think you can download to local disk by a script, and load from local disk.
It's possible to do that, just need to figure out a way to do it elegantly. This is already working if the file disappears, routedns will keep running and use the old content until it's able to refresh again. I deliberately wanted to make it fail if the blocklist isn't there on startup, but that could probably be made configurable.
use the cache-dir
statement, so in most caches it reverts to the local version when not expired. But sometimes when I start from scratch, and maybe made a typo in the URL, or it is unavailable due to whatever reason (404 for example, or timeout).
It might be handy indeed to have an option to "continue" anyway. The reload/refresh should still be done, but maybe at a shorter/definable interval in that case? In that case maybe a retry option makes sense as well.
Or to keep it closer to today, retry a couple of times before abort?
Ping!
If we can make this configurable, to make it continue when an error happens on download? Perhaps with a fail-over/backup using multiple sources?
Yup, I can get that in the next few days. Just been quite short on time.
No hurries!
Ping! :-)
Pong? :-)
@cbuijs I think I can work on it. Give me a couple of days but that will free up @folbricht's time
I whipped up a quick draft implementation in https://github.com/folbricht/routedns/pull/259 This only addresses the domain
loader, not the other 2 yet. There's a new allow-fail-on-startup
option on the list config.
blocklist-source = [
{format = "domain", source = "https://raw.githubusercontent.com/cbuijs/accomplist/master/deugniets/routedns.blocklist.domain.list1", allow-fail-on-startup = true},
It's completely un-tested. @charlieporth1 Would you like to take care of the other loaders? You can see from that PR how I planned on dealing with it. Any suggestions are welcome. Feel free to push to the same branch.
I would like to
Works.
Reverting the first attempt in https://github.com/folbricht/routedns/pull/292
Opened a new PR for this in https://github.com/folbricht/routedns/pull/293 but I'll likely abandon this attempt and instead simply add an option to a blocklist source like allow-load-failure = true
or similar. It's a much cleaner implementation that way without some of the side-effects of https://github.com/folbricht/routedns/pull/293 Stay tuned
This has been re-implemented on the issue-153-3
branch by adding a new allow-failure
flag.
blocklist-source = [
{format = "domain", source = "https://raw.githubusercontent.com/cbuijs/accomplist/master/deugniets/routedns.blocklist.domain.list", allow-failure = true},
]
Would you be able to try it out? This is a more flexible (and safe) way of doing this.
Looking good, no issues so far, and it un-fails nicely when an URL is not available.
Works.