celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.99k stars 152 forks source link

Blocklist update when it fails, disables blocklists #266

Closed ignoramous closed 3 years ago

ignoramous commented 3 years ago

It shouldn't when the existing blocklists are up and working fine.

04-12 13:51:52.634  5105  5105 D RethinkDNS: Settings Fragment- Check for local download, url - https://download.bravedns.com/update/blocklists?tstamp=1617790825318&vcode=15
04-12 13:51:52.647   729 27195 E ResolverController: No valid NAT64 prefix (141, <unspecified>/0)
04-12 13:51:52.697  5105 27194 I RethinkDNS: Settings Fragment- onFailure -  false, true
hussainmohd-a commented 3 years ago

App crashes when the local blocklist is enabled in SettingsFragment. Some cases, the DownloadManager returns the status as STATUS_SUCCESSFUL even if the file size is 0. The previous check was dependent on the download manager status.

New logic for the download validation - Post the check for number of files downloaded validation, validate the downloaded files by create localBraveDNS object. If the object is returned by the Dnsx then valid. Null/exception will be invalid.

beb2948885f3ee2d4b0dead7a894eb390880bf7f