Hysteria transport: Add congestion config (""/"reno"/"bbr"/"brutal"/"force-brutal") (#5549)

Closes https://github.com/XTLS/Xray-core/issues/5546
This commit is contained in:
LjhAUMEM
2026-01-17 21:29:50 +08:00
committed by GitHub
parent 5f7474120f
commit cfc78b3ac1
7 changed files with 112 additions and 51 deletions
+4
View File
@@ -17,6 +17,7 @@ import (
"github.com/xtls/xray-core/common/task"
"github.com/xtls/xray-core/core"
"github.com/xtls/xray-core/features/policy"
hyCtx "github.com/xtls/xray-core/proxy/hysteria/ctx"
"github.com/xtls/xray-core/transport"
"github.com/xtls/xray-core/transport/internet"
"github.com/xtls/xray-core/transport/internet/hysteria"
@@ -55,6 +56,9 @@ func (c *Client) Process(ctx context.Context, link *transport.Link, dialer inter
ob.CanSpliceCopy = 3
target := ob.Target
if target.Network == net.Network_UDP {
hyCtx.ContextWithRequireDatagram(ctx)
}
conn, err := dialer.Dial(ctx, c.server.Destination)
if err != nil {
return errors.New("failed to find an available destination").AtWarning().Base(err)