From 6d113da4ac3b8689bc803109cff04425da26c78b Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 24 May 2012 11:11:45 +0200 Subject: Add more diagnostic messages for management password queries --- res/values/strings.xml | 3 ++- src/de/blinkt/openvpn/OpenVPN.java | 3 +++ src/de/blinkt/openvpn/OpenVpnManagementThread.java | 2 ++ src/de/blinkt/openvpn/VpnProfile.java | 4 +++- todo.txt | 4 ++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 56f736b5..fc684ae6 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -224,5 +224,6 @@ imported profile imported profile %d Broken Images - <p>Offical HTC images are known to have a strange routing problem causing traffic not to flow through the tunnel (See also <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">Issue 18</a> in the bug tracker.)</p><p>The offical SONY images from Xperia arc S and Xperia Ray have been reported to be missing the VPNService completly from the image. Other Sony images may be affected as well. (See also <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">Issue 29</a> in the bug tracker.)</p><p>On custom build images the tun module might be missing or the rights of /dev/tun might be wrong. On the experimental CM9 Defy image a <i>chown system /dev/tun</i> is needed to make the VPNService API work.</p> + <p>Offical HTC images are known to have a strange routing problem causing traffic not to flow through the tunnel (See also <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=18\">Issue 18</a> in the bug tracker.)</p><p>The offical SONY images from Xperia arc S and Xperia Ray have been reported to be missing the VPNService completly from the image. Other Sony images may be affected as well. (See also <a href=\"http://code.google.com/p/ics-openvpn/issues/detail?id=29\">Issue 29</a> in the bug tracker.)</p><p>On custom build images the tun module might be missing or the rights of /dev/tun might be wrong. On the experimental CM9 Defy image a <i>chown system /dev/tun</i> is needed to make the VPNService API work.</p> + The username must not be empty. diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index 40fe3afd..55e15abc 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -7,6 +7,9 @@ public class OpenVPN { private static final int MAXLOGENTRIES = 200; + public static final String MANAGMENT_PREFIX = "M:"; + + public static LinkedList logbuffer = new LinkedList(); private static Vector logListener=new Vector(); diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index affd8045..6d67a4e6 100644 --- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java @@ -355,6 +355,8 @@ public class OpenVpnManagementThread implements Runnable { if(pw!=null) { String cmd = String.format("password '%s' %s\n", needed, VpnProfile.openVpnEscape(pw)); managmentCommand(cmd); + } else { + OpenVPN.logMessage(0, OpenVPN.MANAGMENT_PREFIX, String.format("Openvpn requires Authentication type '%s' but no password/key information available", needed)); } } diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index 5cdff43d..125dc675 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -505,7 +505,9 @@ public class VpnProfile implements Serializable{ if(!mUsePull) { if(mIPv4Address == null || cidrToIPAndNetmask(mIPv4Address) == null) return R.string.ipv4_format_error; - + } + if(isUserPWAuth() && !nonNull(mUsername)) { + return R.string.error_empty_username; } if(!mUseDefaultRoute && getCustomRoutes()==null) return R.string.custom_route_format_error; diff --git a/todo.txt b/todo.txt index aa7a3d1d..b7a58aef 100644 --- a/todo.txt +++ b/todo.txt @@ -15,6 +15,10 @@ Ideas: - add a put this certificate into file obscure option +Bugfixes: + - startpath file explorer + + Missing configuration options: IPv6 support: -- cgit v1.2.3