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