From 7c68aa9d830e87897ad18e2ca4cd923d56227e97 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Wed, 20 May 2026 13:59:54 +0800 Subject: [PATCH] Parse SOCKS userInfo without unnecessary decoding https://github.com/2dust/v2rayNG/issues/5657 --- V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt index 05fef181..01fb0194 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/fmt/SocksFmt.kt @@ -26,7 +26,11 @@ object SocksFmt : FmtBase() { config.serverPort = uri.port.toString() if (uri.userInfo?.isEmpty() == false) { - val result = Utils.decode(uri.userInfo).split(":", limit = 2) + val result = if (uri.userInfo.contains(":")) { + uri.userInfo.split(":", limit = 2) + } else { + Utils.decode(uri.userInfo).split(":", limit = 2) + } if (result.count() == 2) { config.username = result.first() config.password = result.last()