Fix parse

This commit is contained in:
世界 2021-02-24 12:47:37 +08:00
parent 5efb0b1ad9
commit 8f08d090c5
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -76,9 +76,11 @@ object ProxyUtil {
@JvmOverloads
fun parseProxies(text: String, tryDecode: Boolean = true): MutableList<String> {
try {
return parseProxies(String(Base64.decode(text, Base64.NO_PADDING)), false)
} catch (ignored: Exception) {
if (tryDecode) {
try {
return parseProxies(String(Base64.decode(text, Base64.NO_PADDING)), false)
} catch (ignored: Exception) {
}
}
val proxies = mutableListOf<String>()