diff --git a/app/src/main/assets/about_html/favicon.ico b/app/src/main/assets/about_html/favicon.ico
new file mode 100644
index 0000000..3a766b5
Binary files /dev/null and b/app/src/main/assets/about_html/favicon.ico differ
diff --git a/app/src/main/assets/about_html/index.html b/app/src/main/assets/about_html/index.html
index e9dd58f..7a9f7f5 100644
--- a/app/src/main/assets/about_html/index.html
+++ b/app/src/main/assets/about_html/index.html
@@ -53,6 +53,7 @@
+
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ */
+abstract public class AbstractDNSServer {
+ public static final int DNS_SERVER_DEFAULT_PORT = 53;
+
+ protected String address;
+ protected int port;
+
+ public AbstractDNSServer(String address, int port) {
+ this.address = address;
+ this.port = port;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public abstract String getName();
+
+ @Override
+ public String toString() {
+ return getName();
+ }
+}
diff --git a/app/src/main/java/org/itxtech/daedalus/util/CustomDnsServer.java b/app/src/main/java/org/itxtech/daedalus/util/server/CustomDNSServer.java
similarity index 60%
rename from app/src/main/java/org/itxtech/daedalus/util/CustomDnsServer.java
rename to app/src/main/java/org/itxtech/daedalus/util/server/CustomDNSServer.java
index d7528de..56056ad 100644
--- a/app/src/main/java/org/itxtech/daedalus/util/CustomDnsServer.java
+++ b/app/src/main/java/org/itxtech/daedalus/util/server/CustomDNSServer.java
@@ -1,4 +1,4 @@
-package org.itxtech.daedalus.util;
+package org.itxtech.daedalus.util.server;
import org.itxtech.daedalus.Daedalus;
@@ -13,16 +13,13 @@ import org.itxtech.daedalus.Daedalus;
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
-public class CustomDnsServer {
+public class CustomDNSServer extends AbstractDNSServer {
private String name;
- private String address;
- private int port;
private String id;
- public CustomDnsServer(String name, String address, int port) {
+ public CustomDNSServer(String name, String address, int port) {
+ super(address, port);
this.name = name;
- this.address = address;
- this.port = port;
this.id = String.valueOf(Daedalus.configurations.getNextDnsId());
}
@@ -38,23 +35,7 @@ public class CustomDnsServer {
return name;
}
- public String getAddress() {
- return address;
- }
-
- public int getPort() {
- return port;
- }
-
public void setName(String name) {
this.name = name;
}
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public void setPort(int port) {
- this.port = port;
- }
}
diff --git a/app/src/main/java/org/itxtech/daedalus/util/DnsServer.java b/app/src/main/java/org/itxtech/daedalus/util/server/DNSServer.java
similarity index 64%
rename from app/src/main/java/org/itxtech/daedalus/util/DnsServer.java
rename to app/src/main/java/org/itxtech/daedalus/util/server/DNSServer.java
index de852c0..e6e8be9 100644
--- a/app/src/main/java/org/itxtech/daedalus/util/DnsServer.java
+++ b/app/src/main/java/org/itxtech/daedalus/util/server/DNSServer.java
@@ -1,6 +1,7 @@
-package org.itxtech.daedalus.util;
+package org.itxtech.daedalus.util.server;
import android.content.Context;
+import org.itxtech.daedalus.Daedalus;
/**
* Daedalus Project
@@ -13,41 +14,33 @@ import android.content.Context;
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
-public class DnsServer {
- public static int DNS_SERVER_DEFAULT_PORT = 53;
-
+public class DNSServer extends AbstractDNSServer {
private static int totalId = 0;
private String id;
- private String address;
- private int port;
private int description = 0;
- public DnsServer(String address, int description, int port) {
+ public DNSServer(String address, int description, int port) {
+ super(address, port);
this.id = String.valueOf(totalId++);
- this.address = address;
this.description = description;
- this.port = port;
}
- public DnsServer(String address, int description) {
+ public DNSServer(String address, int description) {
this(address, description, DNS_SERVER_DEFAULT_PORT);
}
- public int getPort() {
- return port;
- }
-
public String getId() {
return id;
}
- public String getAddress() {
- return address;
- }
-
public String getStringDescription(Context context) {
return context.getResources().getString(description);
}
+
+ @Override
+ public String getName() {
+ return getStringDescription(Daedalus.getInstance());
+ }
}
diff --git a/app/src/main/java/org/itxtech/daedalus/util/DnsServerHelper.java b/app/src/main/java/org/itxtech/daedalus/util/server/DNSServerHelper.java
similarity index 63%
rename from app/src/main/java/org/itxtech/daedalus/util/DnsServerHelper.java
rename to app/src/main/java/org/itxtech/daedalus/util/server/DNSServerHelper.java
index 2df4f8b..f8bf832 100644
--- a/app/src/main/java/org/itxtech/daedalus/util/DnsServerHelper.java
+++ b/app/src/main/java/org/itxtech/daedalus/util/server/DNSServerHelper.java
@@ -1,4 +1,4 @@
-package org.itxtech.daedalus.util;
+package org.itxtech.daedalus.util.server;
import android.content.Context;
import org.itxtech.daedalus.Daedalus;
@@ -18,7 +18,7 @@ import java.util.HashMap;
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
-public class DnsServerHelper {
+public class DNSServerHelper {
private static HashMap