app: release 1.14.1
This commit is contained in:
parent
4e0ee9a966
commit
7232206618
@ -10,8 +10,8 @@ android {
|
||||
applicationId "org.itxtech.daedalus"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 28
|
||||
versionCode 19
|
||||
versionName "1.14.0"
|
||||
versionCode 20
|
||||
versionName "1.14.1"
|
||||
|
||||
buildConfigField "String", "BUILD_TIME", "\"${System.currentTimeMillis()}\""
|
||||
buildConfigField "String", "GIT_COMMIT", "\"${gitCommit}\""
|
||||
|
@ -125,7 +125,6 @@ public class DaedalusVpnService extends VpnService implements Runnable {
|
||||
this.notification = builder;
|
||||
}
|
||||
|
||||
DNSServerHelper.buildCache();
|
||||
Daedalus.initRuleResolver();
|
||||
|
||||
if (this.mThread == null) {
|
||||
@ -232,6 +231,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
DNSServerHelper.buildCache();
|
||||
Builder builder = new Builder()
|
||||
.setSession("Daedalus")
|
||||
.setConfigureIntent(PendingIntent.getActivity(this, 0,
|
||||
@ -250,6 +250,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
|
||||
} else {
|
||||
builder.addAllowedApplication(app);
|
||||
}
|
||||
Logger.debug("Added app to list: " + app);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Logger.error("Package Not Found:" + app);
|
||||
}
|
||||
|
@ -26,23 +26,24 @@ import java.util.List;
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
public class DNSServerHelper {
|
||||
private static HashMap<String, Integer> portCache = null;
|
||||
public static HashMap<String, List<InetAddress>> domainCache = null;
|
||||
private static HashMap<String, Integer> portCache = new HashMap<>();
|
||||
public static HashMap<String, List<InetAddress>> domainCache = new HashMap<>();
|
||||
|
||||
public static void clearCache() {
|
||||
portCache = null;
|
||||
domainCache = null;
|
||||
portCache = new HashMap<>();
|
||||
domainCache = new HashMap<>();
|
||||
}
|
||||
|
||||
public static void buildCache() {
|
||||
domainCache = new HashMap<>();
|
||||
portCache = new HashMap<>();
|
||||
|
||||
if (ProviderPicker.getDnsQueryMethod() >= ProviderPicker.DNS_QUERY_METHOD_HTTPS_IETF &&
|
||||
!Daedalus.getPrefs().getBoolean("settings_dont_build_doh_cache", false)) {
|
||||
buildDomainCache(getAddressById(getPrimary()));
|
||||
buildDomainCache(getAddressById(getSecondary()));
|
||||
}
|
||||
|
||||
portCache = new HashMap<>();
|
||||
for (DNSServer server : Daedalus.DNS_SERVERS) {
|
||||
portCache.put(server.getAddress(), server.getPort());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user