wip: hysteria2

仅通过编译不代表能用

Co-authored-by: xchacha20-poly1305 <139959885+xchacha20-poly1305@users.noreply.github.com>
This commit is contained in:
HystericalDragon
2023-09-02 11:50:09 +08:00
committed by arm64v8a
parent ff3696772c
commit aad4063ef7
10 changed files with 154 additions and 17 deletions

View File

@@ -19,15 +19,13 @@ void EditQUIC::onStart(std::shared_ptr<NekoGui::ProxyEntity> _ent) {
this->ent = _ent;
auto bean = this->ent->QUICBean();
if (bean->proxy_type == NekoGui_fmt::QUICBean::proxy_Hysteria) {
if (bean->proxy_type == NekoGui_fmt::QUICBean::proxy_Hysteria || bean->proxy_type == NekoGui_fmt::QUICBean::proxy_Hysteria2) {
P_LOAD_STRING(hopPort);
P_LOAD_INT(hopInterval);
P_LOAD_INT(uploadMbps);
P_LOAD_INT(downloadMbps);
P_LOAD_COMBO_INT(hyProtocol);
P_LOAD_BOOL(disableMtuDiscovery)
P_LOAD_STRING(obfsPassword);
P_LOAD_COMBO_INT(authPayloadType);
P_LOAD_STRING(authPayload);
P_LOAD_INT(streamReceiveWindow);
P_LOAD_INT(connectionReceiveWindow);
@@ -45,6 +43,21 @@ void EditQUIC::onStart(std::shared_ptr<NekoGui::ProxyEntity> _ent) {
ui->heartbeat->hide();
ui->heartbeat_l->hide();
ui->uos->hide();
if (bean->proxy_type == NekoGui_fmt::QUICBean::proxy_Hysteria) {
P_LOAD_COMBO_INT(hyProtocol);
P_LOAD_COMBO_INT(authPayloadType);
ui->username_l->hide();
ui->username->hide();
} else {
P_LOAD_STRING(username);
ui->hyProtocol->hide();
ui->hyProtocol_l->hide();
ui->hyProtocol->hide();
ui->hyProtocol_l->hide();
}
} else if (bean->proxy_type == NekoGui_fmt::QUICBean::proxy_TUIC) {
P_LOAD_STRING(uuid);
P_LOAD_STRING(password);
@@ -104,6 +117,9 @@ bool EditQUIC::onEnd() {
P_SAVE_INT(streamReceiveWindow);
P_SAVE_INT(connectionReceiveWindow);
// Hysteria2
P_SAVE_STRING(username);
// TUIC
P_SAVE_STRING(uuid);
P_SAVE_STRING(password);