mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user