mirror of
https://github.com/M66B/NetGuard.git
synced 2025-03-11 06:33:12 +00:00
Fixed hosts file URIs
This commit is contained in:
parent
5b53dd32d8
commit
9dede18b51
3 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ android {
|
|||
proguardFiles.add(file('proguard-rules.pro'))
|
||||
signingConfig signingConfigs.release
|
||||
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
|
||||
buildConfigField "String", "HOSTS_FILE_URI", "\"https://www.netguard.me/hosts\""
|
||||
buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
|
||||
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
|
||||
}
|
||||
play {
|
||||
|
@ -72,7 +72,7 @@ android {
|
|||
useProguard = true
|
||||
proguardFiles.add(file('proguard-rules.pro'))
|
||||
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
|
||||
buildConfigField "String", "HOSTS_FILE_URI", "\"https://www.netguard.me/hosts\""
|
||||
buildConfigField "String", "HOSTS_FILE_URI", "\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\""
|
||||
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/NetGuard/releases/latest\""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
EditTextPreference pref_hosts_url = (EditTextPreference) screen.findPreference("hosts_url");
|
||||
String hosts_url = pref_hosts_url.getText();
|
||||
if ("https://www.netguard.me/hosts".equals(hosts_url))
|
||||
hosts_url = "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts";
|
||||
hosts_url = BuildConfig.HOSTS_FILE_URI;
|
||||
|
||||
try {
|
||||
new DownloadTask(ActivitySettings.this, new URL(hosts_url), tmp, new DownloadTask.Listener() {
|
||||
|
|
|
@ -63,7 +63,7 @@ public class ServiceExternal extends IntentService {
|
|||
|
||||
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";
|
||||
hosts_url = BuildConfig.HOSTS_FILE_URI;
|
||||
|
||||
File tmp = new File(getFilesDir(), "hosts.tmp");
|
||||
File hosts = new File(getFilesDir(), "hosts.txt");
|
||||
|
|
Loading…
Add table
Reference in a new issue