summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/LogItem.java10
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java9
2 files changed, 19 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/LogItem.java b/app/src/main/java/de/blinkt/openvpn/core/LogItem.java
index 178906c3..8a0a528a 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/LogItem.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/LogItem.java
@@ -39,6 +39,7 @@ public class LogItem implements Parcelable {
private int mRessourceId;
// Default log priority
VpnStatus.LogLevel mLevel = VpnStatus.LogLevel.INFO;
+ private VpnStatus.ErrorType errorType = VpnStatus.ErrorType.UNKNOWN;
private long logtime = System.currentTimeMillis();
private int mVerbosityLevel = -1;
@@ -246,6 +247,11 @@ public class LogItem implements Parcelable {
mLevel = loglevel;
}
+ public LogItem(VpnStatus.ErrorType errorType) {
+ mLevel = VpnStatus.LogLevel.ERROR;
+ this.errorType = errorType;
+ }
+
public String getString(Context c) {
try {
if (mMessage != null) {
@@ -306,6 +312,10 @@ public class LogItem implements Parcelable {
return mLevel;
}
+ public VpnStatus.ErrorType getErrorType() {
+ return errorType;
+ }
+
@Override
public String toString() {
diff --git a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
index c362e299..737b8b42 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -216,6 +216,11 @@ public class VpnStatus {
}
}
+ public enum ErrorType {
+ UNKNOWN,
+ SHAPESHIFTER
+ }
+
// keytool -printcert -jarfile de.blinkt.openvpn_85.apk
static final byte[] officalkey = {-58, -42, -44, -106, 90, -88, -87, -88, -52, -124, 84, 117, 66, 79, -112, -111, -46, 86, -37, 109};
static final byte[] officaldebugkey = {-99, -69, 45, 71, 114, -116, 82, 66, -99, -122, 50, -70, -56, -111, 98, -35, -65, 105, 82, 43};
@@ -502,6 +507,10 @@ public class VpnStatus {
newLogItem(new LogItem(LogLevel.ERROR, resourceId, args));
}
+ public static void logError(ErrorType errorType) {
+ newLogItem(new LogItem(errorType));
+ }
+
public static void logMessageOpenVPN(LogLevel level, int ovpnlevel, String message) {
newLogItem(new LogItem(level, ovpnlevel, message));