1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-22 07:43:15 +00:00

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

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");