mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
Remove hysteria to sing-box generate
This commit is contained in:
@@ -137,30 +137,6 @@ namespace NekoRay::fmt {
|
||||
CoreObjOutboundBuildResult CustomBean::BuildCoreObjSingBox() {
|
||||
CoreObjOutboundBuildResult result;
|
||||
|
||||
if (core == "hysteria") {
|
||||
QJsonObject outbound{{"type", "hysteria"}};
|
||||
outbound["server"] = serverAddress;
|
||||
outbound["server_port"] = serverPort;
|
||||
auto hy = QString2QJsonObject(config_simple);
|
||||
QJSONOBJECT_COPY(hy, outbound, "up")
|
||||
QJSONOBJECT_COPY(hy, outbound, "down")
|
||||
QJSONOBJECT_COPY(hy, outbound, "up_mbps")
|
||||
QJSONOBJECT_COPY(hy, outbound, "down_mbps")
|
||||
QJSONOBJECT_COPY(hy, outbound, "obfs")
|
||||
QJSONOBJECT_COPY(hy, outbound, "auth")
|
||||
QJSONOBJECT_COPY(hy, outbound, "auth_str")
|
||||
QJSONOBJECT_COPY(hy, outbound, "recv_window_conn")
|
||||
QJSONOBJECT_COPY(hy, outbound, "recv_window_client")
|
||||
QJSONOBJECT_COPY(hy, outbound, "disable_mtu_discovery")
|
||||
QJsonObject tls{{"enabled", true}};
|
||||
QJSONOBJECT_COPY(hy, tls, "server_name")
|
||||
QJSONOBJECT_COPY(hy, tls, "alpn")
|
||||
QJSONOBJECT_COPY(hy, tls, "insecure")
|
||||
QJSONOBJECT_COPY2(hy, tls, "ca", "certificate_path")
|
||||
outbound["tls"] = tls;
|
||||
result.outbound = outbound;
|
||||
}
|
||||
|
||||
if (core == "internal") {
|
||||
result.outbound = QString2QJsonObject(config_simple);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace NekoRay::fmt {
|
||||
|
||||
int CustomBean::NeedExternal(bool isFirstProfile, bool isVPN) {
|
||||
if (core == "internal") return 0;
|
||||
if (IS_NEKO_BOX && core == "hysteria") return 0;
|
||||
if (core == "hysteria") {
|
||||
if (isFirstProfile && !isVPN) {
|
||||
return 2;
|
||||
|
||||
@@ -174,7 +174,7 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
|
||||
//
|
||||
CACHE.extraCore = QString2QJsonObject(NekoRay::dataStore->extraCore->core_map);
|
||||
if (!CACHE.extraCore.contains("naive")) CACHE.extraCore.insert("naive", "");
|
||||
if (!CACHE.extraCore.contains("hysteria") && !IS_NEKO_BOX) CACHE.extraCore.insert("hysteria", "");
|
||||
if (!CACHE.extraCore.contains("hysteria")) CACHE.extraCore.insert("hysteria", "");
|
||||
//
|
||||
auto extra_core_layout = ui->extra_core_box->layout();
|
||||
for (const auto &s: CACHE.extraCore.keys()) {
|
||||
|
||||
Reference in New Issue
Block a user