mirror of
https://github.com/2dust/v2rayN.git
synced 2026-08-15 11:42:05 +03:00
Add hy2 ech support (#9954)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class Hysteria2Fmt : BaseFmt
|
||||
@@ -178,6 +176,7 @@ public class Hysteria2Fmt : BaseFmt
|
||||
// and the value is restored when generating configurations.
|
||||
item.AllowInsecure = Global.StringTrue;
|
||||
}
|
||||
item.EchConfigList = GetQueryDecoded(query, "ech");
|
||||
item.SetProtocolExtra(item.GetProtocolExtra() with
|
||||
{
|
||||
Ports = GetQueryDecoded(query, "mport"),
|
||||
@@ -220,6 +219,10 @@ public class Hysteria2Fmt : BaseFmt
|
||||
var sha = item.CertSha;
|
||||
dicQuery.Add("pinSHA256", Utils.UrlEncode(sha));
|
||||
}
|
||||
if (!item.EchConfigList.IsNullOrEmpty())
|
||||
{
|
||||
dicQuery.Add("ech", Utils.UrlEncode(item.EchConfigList));
|
||||
}
|
||||
var protocolExtraItem = item.GetProtocolExtra();
|
||||
var isGecko = !protocolExtraItem.GeckoMinPacketSize.IsNullOrEmpty() || !protocolExtraItem.GeckoMaxPacketSize.IsNullOrEmpty();
|
||||
if (!protocolExtraItem.SalamanderPass.IsNullOrEmpty())
|
||||
|
||||
Reference in New Issue
Block a user