This commit is contained in:
parhelia512 2025-07-27 12:51:18 +08:00
parent cf8d2e31d5
commit 0ddbf90dfc
2 changed files with 4 additions and 4 deletions

View File

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

View File

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