mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 05:44:14 +00:00
Auto download Steven Black's hosts file
This commit is contained in:
parent
f9d5a61ca9
commit
4cf8bc3ff3
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ public class ServiceExternal extends IntentService {
|
||||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
|
||||||
String hosts_url = prefs.getString("hosts_url", null);
|
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 tmp = new File(getFilesDir(), "hosts.tmp");
|
||||||
File hosts = new File(getFilesDir(), "hosts.txt");
|
File hosts = new File(getFilesDir(), "hosts.txt");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue