fix(singbox): использовать password вместо secret в объектах пользователей inbounds и расширить fallback неизвестных полей

This commit is contained in:
Dushnilin
2026-08-18 07:36:03 +03:00
parent 6a5ae8e692
commit fe0099a32a
2 changed files with 23 additions and 3 deletions
+3 -2
View File
@@ -77,8 +77,9 @@ function users(section, protocol) {
password: option(section, "server_password", "")
}];
}
if (protocol == "mtproto") {
let user = { secret: mtproto_secret(section) };
if (protocol == "mtproto" || protocol == "shadowsocks") {
let secret = protocol == "mtproto" ? mtproto_secret(section) : option(section, "server_password", "");
let user = { password: secret };
if (name != "")
user.name = name;
return [ user ];