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:
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);
|
||||
|
||||
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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue