mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
fix #576
This commit is contained in:
parent
cf8d2e31d5
commit
0ddbf90dfc
@ -188,7 +188,7 @@ namespace Configs {
|
||||
q.addQueryItem("downmbps", Int2String(downloadMbps));
|
||||
if (!obfsPassword.isEmpty()) {
|
||||
q.addQueryItem("obfs", "xplus");
|
||||
q.addQueryItem("obfsParam", obfsPassword);
|
||||
q.addQueryItem("obfsParam", QUrl::toPercentEncoding(obfsPassword));
|
||||
}
|
||||
if (authPayloadType == hysteria_auth_string) q.addQueryItem("auth", authPayload);
|
||||
if (hyProtocol == hysteria_protocol_facktcp) q.addQueryItem("protocol", "faketcp");
|
||||
@ -229,7 +229,7 @@ namespace Configs {
|
||||
QUrlQuery q;
|
||||
if (!obfsPassword.isEmpty()) {
|
||||
q.addQueryItem("obfs", "salamander");
|
||||
q.addQueryItem("obfs-password", obfsPassword);
|
||||
q.addQueryItem("obfs-password", QUrl::toPercentEncoding(obfsPassword));
|
||||
}
|
||||
if (allowInsecure) q.addQueryItem("insecure", "1");
|
||||
if (!sni.isEmpty()) q.addQueryItem("sni", sni);
|
||||
|
||||
@ -270,7 +270,7 @@ namespace Configs {
|
||||
name = url.fragment(QUrl::FullyDecoded);
|
||||
serverAddress = url.host();
|
||||
serverPort = url.port();
|
||||
obfsPassword = query.queryItemValue("obfsParam");
|
||||
obfsPassword = QUrl::fromPercentEncoding(query.queryItemValue("obfsParam").toUtf8());
|
||||
allowInsecure = QStringList{"1", "true"}.contains(query.queryItemValue("insecure"));
|
||||
uploadMbps = query.queryItemValue("upmbps").toInt();
|
||||
downloadMbps = query.queryItemValue("downmbps").toInt();
|
||||
@ -314,7 +314,7 @@ namespace Configs {
|
||||
name = url.fragment(QUrl::FullyDecoded);
|
||||
serverAddress = url.host();
|
||||
serverPort = url.port();
|
||||
obfsPassword = query.queryItemValue("obfs-password");
|
||||
obfsPassword = QUrl::fromPercentEncoding(query.queryItemValue("obfs-password").toUtf8());
|
||||
allowInsecure = QStringList{"1", "true"}.contains(query.queryItemValue("insecure"));
|
||||
|
||||
if (url.password().isEmpty()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user