diff --git a/.travis.yml b/.travis.yml index d6289e3..2b40e65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: android jdk: oraclejdk8 - +dist: xenial +git: + depth: 1 android: components: - tools @@ -12,8 +14,6 @@ android: - extra-android-m2repository licenses: - '.+' -before_install: -- yes | sdkmanager "platforms;android-28" script: - chmod 777 gradlew - ./gradlew clean assembleDebug diff --git a/README.md b/README.md index 9cc579c..86e3138 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ __Users must comply with local laws and regulations.__
* __CuteDNS__ - *Shutdown according to regulations* * __[FUN DNS](http://fundns.cn)__ - *Shutdown according to regulations* -* __[Pure DNS](https://puredns.cn/)__ -* __[PdoMo-DNS](https://pdomo.me/)__ - *Intelligent Free Public DNS* +* __[Pure DNS](https://puredns.cn/)__ - *Shutdown according to regulations* +* __[PdoMo-DNS](https://pdomo.me/)__ - *Shutdown according to regulations* * __[rubyfish](https://www.rubyfish.cn)__ - *Free DoT/DoH DNS* ## Rule Providers @@ -60,9 +60,8 @@ __Users must comply with local laws and regulations.__
## Requirements -* Minimum Android version: 4.0.3 (API 15) - __*Basic VPN functions*__ -* Recommended Android version: >= 5.0 (API 21) - __*Full features*__ -* Best Android version: >= 7.1 (API 25) - __*Launcher shortcuts*__ +* Minimum Android version: >= 5.0 (API 21) +* Recommended Android version: >= 7.1 (API 25) - __*Launcher shortcuts*__ ## Open Source Licenses diff --git a/app/src/main/java/org/itxtech/daedalus/Daedalus.java b/app/src/main/java/org/itxtech/daedalus/Daedalus.java index 9f9130e..83b8969 100644 --- a/app/src/main/java/org/itxtech/daedalus/Daedalus.java +++ b/app/src/main/java/org/itxtech/daedalus/Daedalus.java @@ -49,6 +49,9 @@ public class Daedalus extends Application { add(new DNSServer("101.101.101.101", R.string.server_twnic_primary)); add(new DNSServer("101.102.103.104", R.string.server_twnic_secondary)); add(new DNSServer("dns.rubyfish.cn/dns-query", R.string.server_rubyfish)); + add(new DNSServer("cloudflare-dns.com/dns-query", R.string.server_cloudflare)); + add(new DNSServer("dns.google/dns-query", R.string.server_google_ietf)); + add(new DNSServer("dns.google/resolve", R.string.server_google_json)); }}; public static final List RULES = new ArrayList() {{ diff --git a/app/src/main/java/org/itxtech/daedalus/activity/FilterAppProxyActivity.java b/app/src/main/java/org/itxtech/daedalus/activity/FilterAppProxyActivity.java index 28a487a..7f5b52a 100644 --- a/app/src/main/java/org/itxtech/daedalus/activity/FilterAppProxyActivity.java +++ b/app/src/main/java/org/itxtech/daedalus/activity/FilterAppProxyActivity.java @@ -127,7 +127,7 @@ public class FilterAppProxyActivity extends AppCompatActivity { } } - runOnUiThread(() -> notifyDataSetChanged()); + runOnUiThread(this::notifyDataSetChanged); } @NonNull diff --git a/app/src/main/java/org/itxtech/daedalus/fragment/GlobalConfigFragment.java b/app/src/main/java/org/itxtech/daedalus/fragment/GlobalConfigFragment.java index 849c88b..403aa49 100644 --- a/app/src/main/java/org/itxtech/daedalus/fragment/GlobalConfigFragment.java +++ b/app/src/main/java/org/itxtech/daedalus/fragment/GlobalConfigFragment.java @@ -1,13 +1,8 @@ package org.itxtech.daedalus.fragment; import android.content.Intent; -import android.os.Build; import android.os.Bundle; import android.preference.*; -import android.view.View; - -import com.google.android.material.snackbar.Snackbar; - import org.itxtech.daedalus.Daedalus; import org.itxtech.daedalus.R; import org.itxtech.daedalus.activity.FilterAppProxyActivity; @@ -78,26 +73,14 @@ public class GlobalConfigFragment extends PreferenceFragment { return true; }); - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - SwitchPreference advanced = (SwitchPreference) findPreference("settings_advanced_switch"); - advanced.setEnabled(false); - advanced.setChecked(false); - SwitchPreference boot = (SwitchPreference) findPreference("settings_boot"); - boot.setEnabled(false); - boot.setChecked(false); - SwitchPreference app_filter = (SwitchPreference) findPreference("settings_app_filter_switch"); - app_filter.setEnabled(false); - app_filter.setChecked(false); - } - SwitchPreference advanced = (SwitchPreference) findPreference("settings_advanced_switch"); advanced.setOnPreferenceChangeListener((preference, newValue) -> { updateOptions((boolean) newValue, "settings_advanced"); return true; }); - SwitchPreference app_filter = (SwitchPreference) findPreference("settings_app_filter_switch"); - app_filter.setOnPreferenceChangeListener((p, w) -> { + SwitchPreference appFilter = (SwitchPreference) findPreference("settings_app_filter_switch"); + appFilter.setOnPreferenceChangeListener((p, w) -> { updateOptions((boolean) w, "settings_app_filter"); return true; }); @@ -128,7 +111,7 @@ public class GlobalConfigFragment extends PreferenceFragment { }); updateOptions(advanced.isChecked(), "settings_advanced"); - updateOptions(app_filter.isChecked(), "settings_app_filter"); + updateOptions(appFilter.isChecked(), "settings_app_filter"); } private void updateOptions(boolean checked, String pref) { @@ -145,13 +128,4 @@ public class GlobalConfigFragment extends PreferenceFragment { } } } - - @Override - public void onViewCreated(View view, Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { - Snackbar.make(view, R.string.notice_legacy_api, Snackbar.LENGTH_LONG).show(); - } - } } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 05ee9a3..9ff148d 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -7,7 +7,6 @@ 已启用 iTXTech Daedalus。 正在测试指定的 DNS 服务器…… DNS 查询次数: - 当前 Android API 无法支持所有功能。 重新启用 Daedalus 以应用设置。 正在下载规则,请稍等 …… 已下载规则。 @@ -86,11 +85,12 @@ 选择应用 黑名单模式 选择要过滤的应用 - 仅支持Android Lollipop及以上版本 Quad 101 主服务器 Quad 101 辅服务器 红鱼 (DoH) + 谷歌公共 DNS (DoH JSON) + 谷歌公共 DNS (DoH RFC8484) 首选 DNS 服务器 备用 DNS 服务器 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5aae473..9aa95ab 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -7,7 +7,6 @@ 已啟動 iTXTech Daedalus。 正在測試指定的 DNS 伺服器…… DNS 查詢次數: - 目前 Android API 無法支援所有功能。 重新啟動 Daedalus 以套用設定。 正在下載規則,請稍等…… 已下載規則。 @@ -64,7 +63,7 @@ 造訪 GitHub wiki 頁面。 紀錄檔大小限制 调试输出 TODO - 不缓存 DoH DNS 的 IP地址 + 不緩存 DoH DNS 的 IP地址 使用暗主题 規則名稱 @@ -86,7 +85,6 @@ 選擇應用 黑名單模式 選擇要過濾的應用 - 僅支持Android Lollipop及以上版本 Quad 101 主伺服器 Quad 101 輔伺服器 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d0cf25c..62e2d9b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -6,7 +6,6 @@ iTXTech Daedalus is activated. Testing specified DNS server… DNS query times: - The current Android API can not support all the features. Re-activate Daedalus to make the settings take effect. Downloading rule, please wait … Rule has been downloaded. @@ -91,11 +90,13 @@ Blacklist mode Select application Select apps to pass through - Only supports Android Lollipop and above Quad 101 Primary Quad 101 Secondary rubyfish (DoH) + Cloudflare DNS (DoH) + Google Public DNS (DoH JSON) + Google Public DNS (DoH RFC8484) Primary DNS server Secondary DNS server diff --git a/app/src/main/res/xml/perf_settings.xml b/app/src/main/res/xml/perf_settings.xml index 0a5f9cd..5540e8c 100644 --- a/app/src/main/res/xml/perf_settings.xml +++ b/app/src/main/res/xml/perf_settings.xml @@ -54,7 +54,6 @@