diff --git a/fmt/Bean2CoreObj_box.cpp b/fmt/Bean2CoreObj_box.cpp index 82643c2..e8307c5 100644 --- a/fmt/Bean2CoreObj_box.cpp +++ b/fmt/Bean2CoreObj_box.cpp @@ -28,6 +28,9 @@ namespace NekoGui_fmt { if (!host.isEmpty()) transport["host"] = QList2QJsonArray(host.split(",")); } else if (network == "grpc") { if (!path.isEmpty()) transport["service_name"] = path; + } else if (network == "httpupgrade") { + if (!path.isEmpty()) transport["path"] = path; + if (!host.isEmpty()) transport["host"] = host; } outbound->insert("transport", transport); } else if (header_type == "http") { diff --git a/fmt/Bean2Link.cpp b/fmt/Bean2Link.cpp index 0209a71..78e8415 100644 --- a/fmt/Bean2Link.cpp +++ b/fmt/Bean2Link.cpp @@ -51,7 +51,7 @@ namespace NekoGui_fmt { // type query.addQueryItem("type", stream->network); - if (stream->network == "ws" || stream->network == "http") { + if (stream->network == "ws" || stream->network == "http" || stream->network == "httpupgrade") { if (!stream->path.isEmpty()) query.addQueryItem("path", stream->path); if (!stream->host.isEmpty()) query.addQueryItem("host", stream->host); } else if (stream->network == "grpc") { @@ -152,7 +152,7 @@ namespace NekoGui_fmt { // type query.addQueryItem("type", stream->network); - if (stream->network == "ws" || stream->network == "http") { + if (stream->network == "ws" || stream->network == "http" || stream->network == "httpupgrade") { if (!stream->path.isEmpty()) query.addQueryItem("path", stream->path); if (!stream->host.isEmpty()) query.addQueryItem("host", stream->host); } else if (stream->network == "grpc") { diff --git a/fmt/Link2Bean.cpp b/fmt/Link2Bean.cpp index b4f2fae..19c5cfd 100644 --- a/fmt/Link2Bean.cpp +++ b/fmt/Link2Bean.cpp @@ -81,6 +81,9 @@ namespace NekoGui_fmt { } else if (stream->network == "http") { stream->path = GetQueryValue(query, "path", ""); stream->host = GetQueryValue(query, "host", "").replace("|", ","); + } else if (stream->network == "httpupgrade") { + stream->path = GetQueryValue(query, "path", ""); + stream->host = GetQueryValue(query, "host", ""); } else if (stream->network == "grpc") { stream->path = GetQueryValue(query, "serviceName", ""); } else if (stream->network == "tcp") { @@ -199,6 +202,9 @@ namespace NekoGui_fmt { } else if (stream->network == "http") { stream->path = GetQueryValue(query, "path", ""); stream->host = GetQueryValue(query, "host", "").replace("|", ","); + } else if (stream->network == "httpupgrade") { + stream->path = GetQueryValue(query, "path", ""); + stream->host = GetQueryValue(query, "host", ""); } else if (stream->network == "grpc") { stream->path = GetQueryValue(query, "serviceName", ""); } else if (stream->network == "tcp") { diff --git a/fmt/V2RayStreamSettings.hpp b/fmt/V2RayStreamSettings.hpp index 4ecde8a..1b5c71c 100644 --- a/fmt/V2RayStreamSettings.hpp +++ b/fmt/V2RayStreamSettings.hpp @@ -8,7 +8,7 @@ namespace NekoGui_fmt { QString network = "tcp"; QString security = ""; QString packet_encoding = ""; - // ws/http/grpc/tcp-http + // ws/http/grpc/tcp-http/httpupgrade QString path = ""; QString host = ""; // kcp/quic/tcp-http diff --git a/libs/get_source_env.sh b/libs/get_source_env.sh index fd31184..3c309f9 100644 --- a/libs/get_source_env.sh +++ b/libs/get_source_env.sh @@ -1,5 +1,5 @@ if [ ! -z $ENV_NEKORAY ]; then - export COMMIT_SING_BOX_EXTRA="2f8e1bdb842ec2138c1699101a84950617c3cbb8" + export COMMIT_SING_BOX_EXTRA="b13bae46e9fcd330c26e66caedf5640ba31f4505" export COMMIT_MATSURI_XRAY="01208225ee7e508044cca8eb6776a117bcecd997" fi diff --git a/ui/edit/dialog_edit_profile.cpp b/ui/edit/dialog_edit_profile.cpp index 95a733f..fe70a3e 100644 --- a/ui/edit/dialog_edit_profile.cpp +++ b/ui/edit/dialog_edit_profile.cpp @@ -46,7 +46,7 @@ DialogEditProfile::DialogEditProfile(const QString &_type, int profileOrGroupId, ui->path_l->setVisible(true); ui->host->setVisible(false); ui->host_l->setVisible(false); - } else if (txt == "ws" || txt == "http") { + } else if (txt == "ws" || txt == "http" || txt == "httpupgrade") { ui->header_type->setVisible(false); ui->header_type_l->setVisible(false); ui->path->setVisible(true); diff --git a/ui/edit/dialog_edit_profile.ui b/ui/edit/dialog_edit_profile.ui index d4e1005..0e97ffb 100644 --- a/ui/edit/dialog_edit_profile.ui +++ b/ui/edit/dialog_edit_profile.ui @@ -260,6 +260,11 @@ quic + + + httpupgrade + +