Skip to content

Commit

Permalink
hysteria2: supports port hopping in box
Browse files Browse the repository at this point in the history
  • Loading branch information
Misaka-blog committed Oct 25, 2023
1 parent 0175f5d commit 89a2a73
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fmt/Bean2Link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ namespace NekoGui_fmt {
q.addQueryItem("obfs", "salamander");
q.addQueryItem("obfs-password", obfsPassword);
}
// if (!hopPort.trimmed().isEmpty()) q.addQueryItem("mport", hopPort);
if (!hopPort.trimmed().isEmpty()) q.addQueryItem("mport", hopPort);
if (allowInsecure) q.addQueryItem("insecure", "1");
if (!sni.isEmpty()) q.addQueryItem("sni", sni);
if (!q.isEmpty()) url.setQuery(q);
Expand Down
2 changes: 1 addition & 1 deletion fmt/Link2Bean.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ namespace NekoGui_fmt {
name = url.fragment(QUrl::FullyDecoded);
serverAddress = url.host();
serverPort = url.port();
// hopPort = query.queryItemValue("mport");
hopPort = query.queryItemValue("mport");
obfsPassword = query.queryItemValue("obfs-password");
allowInsecure = QStringList{"1", "true"}.contains(query.queryItemValue("insecure"));

Expand Down
2 changes: 1 addition & 1 deletion libs/get_source_env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if [ ! -z $ENV_NEKORAY ]; then
export COMMIT_SING_BOX_EXTRA="f95483a6bfe3894efdf917f4ccceac8c0aec1693"
export COMMIT_SING_BOX_EXTRA="551b4c76cf9d69d24361cf9148b3b2a3f75401ca"
export COMMIT_MATSURI_XRAY="01208225ee7e508044cca8eb6776a117bcecd997"
fi

Expand Down
2 changes: 1 addition & 1 deletion sub/GroupUpdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ namespace NekoGui_sub {
} else if (type == "hysteria2") {
auto bean = ent->QUICBean();

// bean->hopPort = Node2QString(proxy["ports"]);
bean->hopPort = Node2QString(proxy["ports"]);

bean->allowInsecure = Node2Bool(proxy["skip-cert-verify"]);
bean->caText = Node2QString(proxy["ca-str"]);
Expand Down
4 changes: 0 additions & 4 deletions ui/edit/edit_quic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ void EditQUIC::onStart(std::shared_ptr<NekoGui::ProxyEntity> _ent) {
ui->TLS->removeItem(ui->alpn_sp);
if (IS_NEKO_BOX) {
ui->disableMtuDiscovery->hide();
ui->hopInterval->hide();
ui->hopInterval_l->hide();
ui->hopPort->hide();
ui->hopPort_l->hide();
ui->connectionReceiveWindow->hide();
ui->connectionReceiveWindow_l->hide();
ui->streamReceiveWindow->hide();
Expand Down

0 comments on commit 89a2a73

Please sign in to comment.