diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/ShadowsocksFmt.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/ShadowsocksFmt.kt index 18b89812..726f60f8 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/ShadowsocksFmt.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/ShadowsocksFmt.kt @@ -19,9 +19,9 @@ object ShadowsocksFmt : FmtBase() { config.serverPort = uri.port.toString() val result = if (uri.userInfo.contains(":")) { - uri.userInfo.split(":") + uri.userInfo.split(":", limit = 2) } else { - Utils.decode(uri.userInfo).split(":") + Utils.decode(uri.userInfo).split(":", limit = 2) } if (result.count() == 2) { config.method = result.first() diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/SocksFmt.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/SocksFmt.kt index e6fc2f52..0e4c5ab8 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/SocksFmt.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/fmt/SocksFmt.kt @@ -21,7 +21,7 @@ object SocksFmt : FmtBase() { config.serverPort = uri.port.toString() if (uri.userInfo?.isEmpty() == false) { - val result = Utils.decode(uri.userInfo).split(":") + val result = Utils.decode(uri.userInfo).split(":", limit = 2) if (result.count() == 2) { config.username = result.first() config.password = result.last()