From 94387a6e42cf76d8fcaa5f9aab0355164d0bbe2b Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 18 May 2012 14:11:37 +0200 Subject: Allow only one log window at a time (closes issue #26) Make OpenvpnService honour net30 routes (closes issue #24) --- AndroidManifest.xml | 4 +-- openvpn/src/openvpn/tun.c | 17 +++++++++++- res/values/strings.xml | 5 ++-- res/xml/vpn_headers.xml | 8 ++---- src/de/blinkt/openvpn/CIDRIP.java | 32 ++++++++++++---------- src/de/blinkt/openvpn/LaunchVPN.java | 1 + src/de/blinkt/openvpn/OpenVpnManagementThread.java | 2 +- src/de/blinkt/openvpn/OpenVpnService.java | 21 ++++++++++++-- 8 files changed, 61 insertions(+), 29 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4655509a..9f11995f 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,8 +17,8 @@ + android:versionCode="26" + android:versionName="0.5.5" > diff --git a/openvpn/src/openvpn/tun.c b/openvpn/src/openvpn/tun.c index ab83d7b8..92ad001e 100644 --- a/openvpn/src/openvpn/tun.c +++ b/openvpn/src/openvpn/tun.c @@ -782,7 +782,22 @@ do_ifconfig (struct tuntap *tt, struct user_pass up; struct buffer out = alloc_buf_gc (64, &gc); - buf_printf (&out, "%s %s %d", ifconfig_local, ifconfig_remote_netmask, tun_mtu); + char* top; + switch(tt->topology) { + case TOP_NET30: + top = "net30"; + break; + case TOP_P2P: + top="p2p"; + break; + case TOP_SUBNET: + top="subnet"; + break; + default: + top="undef"; + } + + buf_printf (&out, "%s %s %d %s", ifconfig_local, ifconfig_remote_netmask, tun_mtu,top); strcpy(up.username, buf_bptr(&out)); management_query_user_pass(management, &up , "IFCONFIG", GET_USER_PASS_NEED_OK,(void*) 0); diff --git a/res/values/strings.xml b/res/values/strings.xml index f0557545..c74362e7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -165,7 +165,7 @@ DNS Domain: %s Routes: %s Routes Ipv6: %s - Got interface information %1$s and %2$s, assuming second address is peer address of remote. Using /32 netmask for local IP. + Got interface information %1$s and %2$s, assuming second address is peer address of remote. Using /32 netmask for local IP. Mode given by openvpn is \"%3$s\". Cannot make sense of %1$s and %2$s as IP route with CIDR netmask, using /32 as netmask. Corrected route %1$s/%2$s to %3$s/%2$s Cannot accces the Android Keychain Certificates. If you restored a backup of the app/app settings reselect the certificate to recreate the permission to access the certificate. @@ -219,6 +219,5 @@ Got an excption trying to show the Android 4.0+ certificate selction dialog. This should never happens as this a standard feature of Android 4.0+. Maybe your Android ROM support for certificate storage is broken IPv4 IPv6 - TODO - Waiting byte count message + Waiting for byte count messageā€¦ diff --git a/res/xml/vpn_headers.xml b/res/xml/vpn_headers.xml index 3762d445..c840e6ab 100644 --- a/res/xml/vpn_headers.xml +++ b/res/xml/vpn_headers.xml @@ -4,14 +4,12 @@
+ android:title="Basic" />
+ android:title="IP and DNS" />
@@ -23,7 +21,7 @@
+ android:title="Advanced" >