Auto download Steven Black's hosts file

This commit is contained in:
M66B 2020-08-18 18:07:06 +02:00
parent f9d5a61ca9
commit 4cf8bc3ff3
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ public class ServiceExternal extends IntentService {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
String hosts_url = prefs.getString("hosts_url", null);
if ("https://www.netguard.me/hosts".equals(hosts_url))
hosts_url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
File tmp = new File(getFilesDir(), "hosts.tmp");
File hosts = new File(getFilesDir(), "hosts.txt");