mirror of https://github.com/M66B/NetGuard.git
parent
d72a170fe1
commit
2bfffec9bf
|
@ -5,8 +5,8 @@ Instructions:
|
||||||
|
|
||||||
* Download/install the latest NetGuard version [from GitHub](https://github.com/M66B/NetGuard/releases)
|
* Download/install the latest NetGuard version [from GitHub](https://github.com/M66B/NetGuard/releases)
|
||||||
* Enable the setting '*Filter traffic*' in the advanced options (always enabled on Android 5.0 or earlier)
|
* Enable the setting '*Filter traffic*' in the advanced options (always enabled on Android 5.0 or earlier)
|
||||||
* Import or download [a hosts file](https://en.wikipedia.org/wiki/Hosts_(file)) using the NetGuard backup settings
|
|
||||||
* Enable the setting '*Block domain names*' in the advanced options (default enabled)
|
* Enable the setting '*Block domain names*' in the advanced options (default enabled)
|
||||||
|
* Import or download [a hosts file](https://en.wikipedia.org/wiki/Hosts_(file)) using the NetGuard backup settings
|
||||||
* Disable browser compression (Chrome: three dot menu > Settings > Data Saver > Off)
|
* Disable browser compression (Chrome: three dot menu > Settings > Data Saver > Off)
|
||||||
* Wait 10 minutes to let the Android DNS cache time out
|
* Wait 10 minutes to let the Android DNS cache time out
|
||||||
* Test if it works by opening [this page](http://www.netguard.me/test)
|
* Test if it works by opening [this page](http://www.netguard.me/test)
|
||||||
|
|
|
@ -270,8 +270,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
||||||
cat_backup.removePreference(pref_hosts_download);
|
cat_backup.removePreference(pref_hosts_download);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pref_block_domains.setEnabled(new File(getFilesDir(), "hosts.txt").exists());
|
|
||||||
|
|
||||||
String last_import = prefs.getString("hosts_last_import", null);
|
String last_import = prefs.getString("hosts_last_import", null);
|
||||||
String last_download = prefs.getString("hosts_last_download", null);
|
String last_download = prefs.getString("hosts_last_download", null);
|
||||||
if (last_import != null)
|
if (last_import != null)
|
||||||
|
@ -310,7 +308,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
||||||
prefs.edit().putString("hosts_last_download", last).apply();
|
prefs.edit().putString("hosts_last_download", last).apply();
|
||||||
|
|
||||||
if (running) {
|
if (running) {
|
||||||
getPreferenceScreen().findPreference("use_hosts").setEnabled(true);
|
|
||||||
pref_hosts_download.setSummary(getString(R.string.msg_download_last, last));
|
pref_hosts_download.setSummary(getString(R.string.msg_download_last, last));
|
||||||
Toast.makeText(ActivitySettings.this, R.string.msg_downloaded, Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivitySettings.this, R.string.msg_downloaded, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
@ -947,7 +944,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
||||||
prefs.edit().putString("hosts_last_import", last).apply();
|
prefs.edit().putString("hosts_last_import", last).apply();
|
||||||
|
|
||||||
if (running) {
|
if (running) {
|
||||||
getPreferenceScreen().findPreference("use_hosts").setEnabled(true);
|
|
||||||
getPreferenceScreen().findPreference("hosts_import").setSummary(getString(R.string.msg_import_last, last));
|
getPreferenceScreen().findPreference("hosts_import").setSummary(getString(R.string.msg_import_last, last));
|
||||||
Toast.makeText(ActivitySettings.this, R.string.msg_completed, Toast.LENGTH_LONG).show();
|
Toast.makeText(ActivitySettings.this, R.string.msg_completed, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue