Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6986f3eaaa | ||
|
|
b5cb91721f | ||
|
|
a4688cdeed | ||
|
|
327aa66e61 | ||
|
|
024b1207ed | ||
|
|
f193176c08 | ||
|
|
52914b0f7b | ||
|
|
13c7e0387f |
No files matched your search
@@ -16,6 +16,8 @@ tests/gen
|
||||
|
||||
# Android Studio
|
||||
.idea
|
||||
*.iml
|
||||
.externalNativeBuild
|
||||
|
||||
# ant
|
||||
out
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ jdk:
|
||||
|
||||
android:
|
||||
components:
|
||||
- build-tools-21.1.2
|
||||
- android-15
|
||||
- build-tools-25.0.2
|
||||
- android-21
|
||||
|
||||
before_install:
|
||||
- git clone --depth 1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk-root
|
||||
|
||||
@@ -1,23 +1,31 @@
|
||||
Dies ist eine Portierung von iodine (http://code.kryo.se/iodine/)
|
||||
auf Android
|
||||

|
||||
|
||||
This is a port of iodine (http://code.kryo.se/iodine/) to the Android VPN Framework.
|
||||
It doesn't require "root" on the phone.
|
||||
Downloads are available on [F-droid](https://f-droid.org/packages/org.xapek.andiodine/).
|
||||
|
||||
# Documentation
|
||||
|
||||
- (german)[Anwenderdokumentation](doc/anwenderdoku.html) [(PDF)](doc/anwenderdoku.pdf)
|
||||
- (german)[Entwicklerdokumentation](doc/entwicklerdoku.html) [(PDF)](doc/entwicklerdoku.pdf)
|
||||
The following two documents exist in German language only:
|
||||
- [Anwenderdokumentation](doc/anwenderdoku.pdf)
|
||||
- [Entwicklerdokumentation](doc/entwicklerdoku.pdf)
|
||||
|
||||
# Building
|
||||
|
||||
``` bash
|
||||
(cd jni && ndk-build)
|
||||
gradle build
|
||||
Requires the Android SDK and NDK to be installed.
|
||||
|
||||
```
|
||||
bash
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
Then find the APK files in folder `build/outputs/apk/`
|
||||
|
||||
# Authors and License
|
||||
Android Iodine Copyright (c) 2013 Yves Fischer <yvesf+andiodine@xapek.org>
|
||||
Android Iodine Copyright (c) 2016 Yves Fischer <yvesf+andiodine@xapek.org> and contributors.
|
||||
Same license as iodine.
|
||||
|
||||
Iodine Copyright (c) 2006-2009 Bjorn Andersson <flex@kryo.se>, Erik Ekman <yarrick@kryo.se>
|
||||
Iodine Copyright (c) 2006-2009 Bjorn Andersson <flex@kryo.se>, Erik Ekman <yarrick@kryo.se>
|
||||
Also major contributions by Anne Bezemer.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any purpose
|
||||
@@ -33,5 +41,5 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
MD5 implementation by L. Peter Deutsch (license and source in src/md5.[ch])
|
||||
MD5 implementation by L. Peter Deutsch (license and source in jni/iodine/src/md5.[ch])
|
||||
Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
|
||||
+2
-2
@@ -4,7 +4,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.2.2'
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 21
|
||||
buildToolsVersion "21.1.2"
|
||||
buildToolsVersion '25.0.2'
|
||||
|
||||
sourceSets.main {
|
||||
jniLibs.srcDir 'libs'
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Mon Nov 21 21:42:02 GMT 2016
|
||||
#Fri Oct 13 18:56:29 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
+13
-1
@@ -87,7 +87,8 @@ JNIEXPORT jint JNICALL Java_org_xapek_andiodine_IodineClient_getDnsFd(
|
||||
|
||||
JNIEXPORT jint JNICALL Java_org_xapek_andiodine_IodineClient_connect(
|
||||
JNIEnv *env, jclass klass, jstring j_nameserv_addr, jstring j_topdomain, jboolean j_raw_mode, jboolean j_lazy_mode,
|
||||
jstring j_password, jint j_request_hostname_size, jint j_response_fragment_size) {
|
||||
jstring j_password, jint j_request_hostname_size, jint j_response_fragment_size,
|
||||
jstring j_request_type) {
|
||||
|
||||
// XXX strdup leaks
|
||||
const char *__p_nameserv_addr = (*env)->GetStringUTFChars(env,
|
||||
@@ -105,12 +106,22 @@ JNIEXPORT jint JNICALL Java_org_xapek_andiodine_IodineClient_connect(
|
||||
(*env)->ReleaseStringUTFChars(env, j_topdomain, __p_topdomain);
|
||||
__android_log_print(ANDROID_LOG_ERROR, "iodine", "Topdomain from vm: %s", p_topdomain);
|
||||
|
||||
// extract password parameter
|
||||
const char *p_password = (*env)->GetStringUTFChars(env, j_password, NULL);
|
||||
char passwordField[33];
|
||||
memset(passwordField, 0, 33);
|
||||
strncpy(passwordField, p_password, 32);
|
||||
(*env)->ReleaseStringUTFChars(env, j_password, p_password);
|
||||
|
||||
// extract request type parameter
|
||||
const char *p_requestType = (*env)->GetStringUTFChars(env, j_request_type, NULL);
|
||||
char requestTypeField[8];
|
||||
memset(requestTypeField, 0, 8);
|
||||
strncpy(requestTypeField, p_requestType, 7);
|
||||
(*env)->ReleaseStringUTFChars(env, j_request_type, p_requestType);
|
||||
__android_log_print(ANDROID_LOG_ERROR, "iodine", "Request Type from vm: %s", requestTypeField);
|
||||
|
||||
|
||||
tun_config_android.request_disconnect = 0;
|
||||
|
||||
int selecttimeout = 2; // original: 4
|
||||
@@ -140,6 +151,7 @@ JNIEXPORT jint JNICALL Java_org_xapek_andiodine_IodineClient_connect(
|
||||
client_set_topdomain(p_topdomain);
|
||||
client_set_hostname_maxlen(hostname_maxlen);
|
||||
client_set_password(passwordField);
|
||||
client_set_qtype(requestTypeField);
|
||||
|
||||
if ((dns_fd = open_dns_from_host(NULL, 0, AF_INET, AI_PASSIVE)) == -1) {
|
||||
printf("Could not open dns socket: %s", strerror(errno));
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#ifndef __FIX_ANDROID_H__
|
||||
#define __FIX_ANDROID_H__
|
||||
#include <arpa/nameser.h>
|
||||
#ifndef _ARPA_NAMESER_COMPAT_
|
||||
|
||||
typedef struct {
|
||||
unsigned id :16;
|
||||
@@ -36,4 +38,5 @@ typedef struct {
|
||||
#define T_TXT 16
|
||||
#define T_SRV 33
|
||||
|
||||
#endif
|
||||
#endif //_ARPA_NAMESER_COMPAT_
|
||||
#endif //__FIX_ANDROID_H__
|
||||
@@ -187,6 +187,9 @@ client_set_qtype(char *qtype)
|
||||
do_qtype = T_SRV;
|
||||
else if (!strcasecmp(qtype, "TXT"))
|
||||
do_qtype = T_TXT;
|
||||
// Added for Andiodine:
|
||||
else
|
||||
do_qtype = T_UNSET;
|
||||
return (do_qtype == T_UNSET);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user