summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2016-11-29 22:54:00 +0100
committerYves Fischer <yvesf-git@xapek.org>2016-11-29 22:54:00 +0100
commit4b387f09f4ac4ef027a5fd506e3704f1d7860d53 (patch)
treedcbbfe8a11553c0fd7b392590e7c99e5e7f72e31 /src
parent0095b9ff16ab7989027fd41716748dd53cd53d55 (diff)
downloadandiodine-4b387f09f4ac4ef027a5fd506e3704f1d7860d53.tar.gz
andiodine-4b387f09f4ac4ef027a5fd506e3704f1d7860d53.zip
Pass the request-type (qtype) to iodinefix-18
Closes #18
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/xapek/andiodine/IodineClient.java3
-rw-r--r--src/main/java/org/xapek/andiodine/IodineVpnService.java2
-rw-r--r--src/main/java/org/xapek/andiodine/config/IodineConfiguration.java10
3 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/org/xapek/andiodine/IodineClient.java b/src/main/java/org/xapek/andiodine/IodineClient.java
index 056a5a3..fd90674 100644
--- a/src/main/java/org/xapek/andiodine/IodineClient.java
+++ b/src/main/java/org/xapek/andiodine/IodineClient.java
@@ -9,7 +9,8 @@ public class IodineClient {
public static native int getDnsFd();
public static native int connect(String nameserv_addr, String topdomain, boolean raw_mode, boolean lazy_mode,
- String password, int request_hostname_size, int response_fragment_size);
+ String password, int request_hostname_size, int response_fragment_size,
+ String request_type);
public static native String getIp();
diff --git a/src/main/java/org/xapek/andiodine/IodineVpnService.java b/src/main/java/org/xapek/andiodine/IodineVpnService.java
index ac0f45c..d54e95b 100644
--- a/src/main/java/org/xapek/andiodine/IodineVpnService.java
+++ b/src/main/java/org/xapek/andiodine/IodineVpnService.java
@@ -275,7 +275,7 @@ public class IodineVpnService extends VpnService implements Runnable {
int ret = IodineClient.connect(tunnelNameserver, mConfiguration.getTopDomain(), mConfiguration.getRawMode(),
mConfiguration.getLazyMode(), password, mConfiguration.getRequestHostnameSize(),
- mConfiguration.getResponseFragmentSize());
+ mConfiguration.getResponseFragmentSize(), mConfiguration.getRequestType().getIodineName());
String errorMessage = "";
switch (ret) {
diff --git a/src/main/java/org/xapek/andiodine/config/IodineConfiguration.java b/src/main/java/org/xapek/andiodine/config/IodineConfiguration.java
index d3e73f2..e07ecd4 100644
--- a/src/main/java/org/xapek/andiodine/config/IodineConfiguration.java
+++ b/src/main/java/org/xapek/andiodine/config/IodineConfiguration.java
@@ -11,7 +11,15 @@ public class IodineConfiguration {
}
public static enum RequestType {
- AUTODETECT, NULL, TXT, SRV, MX, CNAME, A
+ AUTODETECT, NULL, TXT, SRV, MX, CNAME, A;
+
+ public String getIodineName() {
+ if (this == AUTODETECT) {
+ return "";
+ } else {
+ return name();
+ }
+ }
}
private final ContentValues v;