mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-21 19:30:26 +08:00
fix: changed VMess default user alterId to 32
This commit is contained in:
parent
626c4cb588
commit
0720a0a750
@ -375,6 +375,7 @@ namespace Qv2ray::base::objects
|
||||
};
|
||||
//
|
||||
// VMess Server
|
||||
constexpr auto VMESS_USER_ALTERID_DEFAULT = 32;
|
||||
struct VMessServerObject
|
||||
{
|
||||
struct UserObject
|
||||
@ -384,7 +385,7 @@ namespace Qv2ray::base::objects
|
||||
QString security;
|
||||
int level;
|
||||
QString testsEnabled;
|
||||
UserObject() : id(), alterId(64), security("auto"), level(0), testsEnabled("none"){};
|
||||
UserObject() : id(), alterId(VMESS_USER_ALTERID_DEFAULT), security("auto"), level(0), testsEnabled("none"){};
|
||||
JSONSTRUCT_REGISTER(UserObject, F(id, alterId, security, level, testsEnabled))
|
||||
};
|
||||
|
||||
@ -405,8 +406,7 @@ namespace Qv2ray::base::objects
|
||||
bool ota;
|
||||
int level;
|
||||
int port;
|
||||
ShadowSocksServerObject()
|
||||
: email(""), address("0.0.0.0"), method("aes-256-cfb"), password(""), ota(false), level(0), port(0){};
|
||||
ShadowSocksServerObject() : email(""), address("0.0.0.0"), method("aes-256-cfb"), password(""), ota(false), level(0), port(0){};
|
||||
JSONSTRUCT_REGISTER(ShadowSocksServerObject, F(email, address, port, method, password, ota, level))
|
||||
};
|
||||
} // namespace protocol
|
||||
|
@ -170,7 +170,8 @@ namespace Qv2ray::core::connection
|
||||
// Get Alias (AKA ps) from address and port.
|
||||
{
|
||||
// Some idiot vmess:// links are using alterId...
|
||||
aid = vmessConf.contains("aid") ? vmessConf.value("aid").toInt() : vmessConf.value("alterId").toInt();
|
||||
aid = vmessConf.contains("aid") ? vmessConf.value("aid").toInt(VMESS_USER_ALTERID_DEFAULT) :
|
||||
vmessConf.value("alterId").toInt(VMESS_USER_ALTERID_DEFAULT);
|
||||
//
|
||||
//
|
||||
__vmess_checker__func(ps, << vmessConf["add"].toVariant().toString() + ":" + vmessConf["port"].toVariant().toString()); //
|
||||
|
@ -249,7 +249,7 @@
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>16</number>
|
||||
<number>32</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user