mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
fix ws early data compatibility (#585)
This commit is contained in:
@@ -21,12 +21,8 @@ namespace NekoRay::fmt {
|
|||||||
}
|
}
|
||||||
if (ws_early_data_length > 0) {
|
if (ws_early_data_length > 0) {
|
||||||
transport["max_early_data"] = ws_early_data_length;
|
transport["max_early_data"] = ws_early_data_length;
|
||||||
if (ws_early_data_name.isEmpty()) {
|
|
||||||
transport["early_data_header_name"] = "Sec-WebSocket-Protocol";
|
|
||||||
} else {
|
|
||||||
transport["early_data_header_name"] = ws_early_data_name;
|
transport["early_data_header_name"] = ws_early_data_name;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (network == "http") {
|
} else if (network == "http") {
|
||||||
if (!path.isEmpty()) transport["path"] = path;
|
if (!path.isEmpty()) transport["path"] = path;
|
||||||
if (!host.isEmpty()) transport["host"] = QList2QJsonArray(host.split(","));
|
if (!host.isEmpty()) transport["host"] = QList2QJsonArray(host.split(","));
|
||||||
|
|||||||
@@ -26,12 +26,8 @@ namespace NekoRay::fmt {
|
|||||||
}
|
}
|
||||||
if (ws_early_data_length > 0) {
|
if (ws_early_data_length > 0) {
|
||||||
ws["maxEarlyData"] = ws_early_data_length;
|
ws["maxEarlyData"] = ws_early_data_length;
|
||||||
if (ws_early_data_name.isEmpty()) {
|
|
||||||
ws["earlyDataHeaderName"] = "Sec-WebSocket-Protocol";
|
|
||||||
} else {
|
|
||||||
ws["earlyDataHeaderName"] = ws_early_data_name;
|
ws["earlyDataHeaderName"] = ws_early_data_name;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
streamSettings["wsSettings"] = ws;
|
streamSettings["wsSettings"] = ws;
|
||||||
} else if (network == "http") {
|
} else if (network == "http") {
|
||||||
QJsonObject http;
|
QJsonObject http;
|
||||||
|
|||||||
Reference in New Issue
Block a user