diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt index b905a354..9dee6fc1 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/Utils.kt @@ -102,9 +102,14 @@ object Utils { try { return Base64.decode(text, Base64.NO_WRAP).toString(charset("UTF-8")) } catch (e: Exception) { - e.printStackTrace() - return "" + Log.i(AppConfig.ANG_PACKAGE, "Parse base64 standard failed $e") } + try { + return Base64.decode(text, Base64.NO_WRAP.or(Base64.URL_SAFE)).toString(charset("UTF-8")) + } catch (e: Exception) { + Log.i(AppConfig.ANG_PACKAGE, "Parse base64 url safe failed $e") + } + return "" } /**