https://github.com/2dust/v2rayNG/issues/3858
This commit is contained in:
2dust
2024-11-05 10:24:06 +08:00
parent cba58f6ae2
commit f09a413232
2 changed files with 3 additions and 3 deletions

View File

@@ -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()

View File

@@ -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()