mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-19 02:10:28 +08:00
fix: this may fixed #457
This commit is contained in:
parent
c4bfb4222c
commit
a17d6f2802
@ -1 +1 @@
|
||||
4957
|
||||
4960
|
@ -350,7 +350,7 @@ namespace Qv2ray::base::objects
|
||||
QString user;
|
||||
QString pass;
|
||||
int level;
|
||||
UserObject() : user("username"), pass("password"), level(0)
|
||||
UserObject() : user(), pass(), level(0)
|
||||
{
|
||||
}
|
||||
XTOSTRUCT(O(user, pass, level))
|
||||
|
@ -124,6 +124,11 @@ OUTBOUND OutboundEditor::GenerateConnectionJson()
|
||||
}
|
||||
else if (OutboundType == "socks")
|
||||
{
|
||||
if (socks.users.first().user.isEmpty() && socks.users.first().pass.isEmpty())
|
||||
{
|
||||
LOG(MODULE_UI, "Removed empty user form SOCKS settings")
|
||||
socks.users.clear();
|
||||
}
|
||||
streaming = QJsonObject();
|
||||
LOG(MODULE_CONNECTION, "Socks outbound does not need StreamSettings.")
|
||||
QJsonArray servers;
|
||||
@ -276,10 +281,14 @@ void OutboundEditor::on_ss_otaCheckBox_stateChanged(int arg1)
|
||||
|
||||
void OutboundEditor::on_socks_UserNameTxt_textEdited(const QString &arg1)
|
||||
{
|
||||
if (socks.users.isEmpty())
|
||||
socks.users.push_back(SocksServerObject::UserObject());
|
||||
socks.users.front().user = arg1;
|
||||
}
|
||||
|
||||
void OutboundEditor::on_socks_PasswordTxt_textEdited(const QString &arg1)
|
||||
{
|
||||
if (socks.users.isEmpty())
|
||||
socks.users.push_back(SocksServerObject::UserObject());
|
||||
socks.users.front().pass = arg1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user