From 25e87d740e07ab9ade259fbc57d038337b79b66f Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 9 May 2012 23:17:23 +0200 Subject: small fixed --- openvpn/src/openvpn/error.c | 15 +-------------- openvpn/src/openvpn/socket.c | 1 - src/de/blinkt/openvpn/VpnProfile.java | 10 ++++++---- todo.txt | 1 + 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/openvpn/src/openvpn/error.c b/openvpn/src/openvpn/error.c index 83a9eb4b..e2e24b1e 100644 --- a/openvpn/src/openvpn/error.c +++ b/openvpn/src/openvpn/error.c @@ -199,11 +199,6 @@ msg_fp(const unsigned int flags) int x_msg_line_num; /* GLOBAL */ -#include "android/log.h" - - - - void x_msg (const unsigned int flags, const char *format, ...) { struct gc_arena gc; @@ -219,7 +214,6 @@ void x_msg (const unsigned int flags, const char *format, ...) const char *prefix_sep; void usage_small (void); - #ifndef HAVE_VARARG_MACROS /* the macro has checked this otherwise */ @@ -304,12 +298,10 @@ void x_msg (const unsigned int flags, const char *format, ...) if (!prefix) prefix_sep = prefix = ""; - /* virtual output capability used to copy output to management subsystem */ if (!forked) { const struct virtual_output *vo = msg_get_virtual_output (); - if (vo) { openvpn_snprintf (m2, ERR_BUF_SIZE, "%s%s%s", @@ -331,7 +323,7 @@ void x_msg (const unsigned int flags, const char *format, ...) m1); #endif } - else // No Syslog + else { FILE *fp = msg_fp(flags); const bool show_usec = check_debug_level (DEBUG_LEVEL_USEC_TIME); @@ -356,13 +348,8 @@ void x_msg (const unsigned int flags, const char *format, ...) fflush(fp); ++x_msg_line_num; } -#ifdef TARGET_ANDROID - android_openvpn_log(prefix,prefix_sep,m1);; -#endif } - - if (flags & M_FATAL) msg (M_INFO, "Exiting due to fatal error"); diff --git a/openvpn/src/openvpn/socket.c b/openvpn/src/openvpn/socket.c index 71010979..b92c2828 100644 --- a/openvpn/src/openvpn/socket.c +++ b/openvpn/src/openvpn/socket.c @@ -859,7 +859,6 @@ create_socket_tcp (void) msg (M_SOCKERR, "TCP: Cannot setsockopt SO_LINGER on TCP socket"); } #endif - return sd; } diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 26cf50bd..c18575da 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -92,8 +92,10 @@ public class VpnProfile implements Serializable{ public String mVerb="1"; - public static String openVpnEscape(String unescape) { - String escapedString = unescape.replace("\\", "\\\\"); + public static String openVpnEscape(String unescaped) { + if(unescaped==null) + return null; + String escapedString = unescaped.replace("\\", "\\\\"); escapedString = escapedString.replace("\"","\\\""); escapedString = escapedString.replace("\n","\\n"); return '"' + escapedString + '"'; @@ -343,8 +345,8 @@ public class VpnProfile implements Serializable{ Vector args = new Vector(); // Add fixed paramenters - //args.add(cacheDir.getAbsolutePath() +"/" +"openvpn"); - args.add(cacheDir.getAbsolutePath() +"/" +"minivpn"); + //args.add("/data/data/de.blinkt.openvpn/lib/openvpn"); + args.add(cacheDir.getAbsolutePath() +"/" +"openvpn"); args.add("--config"); args.add(cacheDir.getAbsolutePath() + "/" + OVPNCONFIGFILE); diff --git a/todo.txt b/todo.txt index c12a0147..49fc9a8b 100644 --- a/todo.txt +++ b/todo.txt @@ -41,4 +41,5 @@ Requested by users: cipher auth mtu-link +nobind -- cgit v1.2.3 From e652cd62a450aa4bb284d717a1f0bd1b1d1b86a2 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 9 May 2012 23:58:37 +0200 Subject: add cipher option --- AndroidManifest.xml | 4 ++-- res/values/strings.xml | 4 ++++ res/xml/vpn_authentification.xml | 12 +++++++++--- res/xml/vpn_headers.xml | 3 +-- src/de/blinkt/openvpn/Settings_Authentication.java | 13 +++++++++++++ src/de/blinkt/openvpn/VpnProfile.java | 11 +++++++++++ 6 files changed, 40 insertions(+), 7 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index bc3f311c..b6cdc32b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -17,8 +17,8 @@ + android:versionCode="22" + android:versionName="0.5.1" > diff --git a/res/values/strings.xml b/res/values/strings.xml index 90009e8c..9073c0be 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -185,4 +185,8 @@ Shortcut to start You can place a shortcut to start OpenVPN on your desktop. Depending on your homescreen program you have to add a shortcut or a widget. Your image does not support the VPNService API,sorry :( + Encryption + Enter Encryption method + Enter the cipher key for openvpn. Leave empty to use default cipher + Authentication/Encryption diff --git a/res/xml/vpn_authentification.xml b/res/xml/vpn_authentification.xml index bd8d8ca5..79d69697 100644 --- a/res/xml/vpn_authentification.xml +++ b/res/xml/vpn_authentification.xml @@ -28,14 +28,20 @@ android:title="@string/tls_auth_file" /> -/> + + + \ No newline at end of file diff --git a/res/xml/vpn_headers.xml b/res/xml/vpn_headers.xml index f755dc8c..60ddce7c 100644 --- a/res/xml/vpn_headers.xml +++ b/res/xml/vpn_headers.xml @@ -15,8 +15,7 @@ android:title="IP Settings" />
+ android:title="@string/settings_auth" />
getCustomRoutes() { Vector cidrRoutes=new Vector(); if(mCustomRoutes==null) { -- cgit v1.2.3