mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-12 15:34:59 +03:00
Hysteria Realm & Gecko (#9516)
* Hysteria Realm * Core config * Fix * Fix * Add Gecko support
This commit is contained in:
@@ -607,16 +607,32 @@ public partial class CoreConfigV2rayService
|
||||
quicParams.congestion = "bbr";
|
||||
}
|
||||
hy2Finalmask.quicParams = quicParams;
|
||||
hy2Finalmask.udp ??= [];
|
||||
if (HyRealm.TryParse(protocolExtra.Hy2RealmUrl, out var realm)
|
||||
&& realm is not null)
|
||||
{
|
||||
hy2Finalmask.udp.Add(new Mask4Ray
|
||||
{
|
||||
type = "realm",
|
||||
settings = new MaskSettings4Ray { url = realm.ToUriForFinalmask(), stunServers = realm.StunList },
|
||||
});
|
||||
}
|
||||
if (!protocolExtra.SalamanderPass.IsNullOrEmpty())
|
||||
{
|
||||
hy2Finalmask.udp =
|
||||
[
|
||||
new Mask4Ray
|
||||
{
|
||||
type = "salamander",
|
||||
settings = new MaskSettings4Ray { password = protocolExtra.SalamanderPass.TrimEx(), }
|
||||
}
|
||||
];
|
||||
var isGecko = !protocolExtra.GeckoMinPacketSize.IsNullOrEmpty() || !protocolExtra.GeckoMaxPacketSize.IsNullOrEmpty();
|
||||
var salamanderSettings = new MaskSettings4Ray
|
||||
{
|
||||
password = protocolExtra.SalamanderPass.TrimEx(),
|
||||
};
|
||||
if (isGecko)
|
||||
{
|
||||
salamanderSettings.packetSize = $"{protocolExtra.GeckoMinPacketSize}-{protocolExtra.GeckoMaxPacketSize}";
|
||||
}
|
||||
hy2Finalmask.udp.Add(new Mask4Ray
|
||||
{
|
||||
type = "salamander",
|
||||
settings = salamanderSettings,
|
||||
});
|
||||
}
|
||||
streamSettings.hysteriaSettings = new()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user