Fixes hy2

This commit is contained in:
DHR60 2025-07-29 09:13:15 +08:00
parent ade4cbcf80
commit 46688d04b3

View file

@ -60,6 +60,27 @@ public class CoreConfigHy2Service
configJsonNode["server"] = node.Address + ":" + port; configJsonNode["server"] = node.Address + ":" + port;
configJsonNode["auth"] = node.Id; configJsonNode["auth"] = node.Id;
if (node.Sni.IsNotEmpty())
{
configJsonNode["tls"] = new JsonObject
{
["sni"] = node.Sni,
["insecure"] = node.AllowInsecure.ToLower() == "true"
};
}
if (node.Path.IsNotEmpty())
{
configJsonNode["obfs"] = new JsonObject
{
["type"] = "salamander ",
["salamander"] = new JsonObject
{
["password"] = node.Path
}
};
}
var bandwidthObject = new JsonObject(); var bandwidthObject = new JsonObject();
if (_config.HysteriaItem.UpMbps > 0) if (_config.HysteriaItem.UpMbps > 0)
{ {