diff --git a/api/panel/node.go b/api/panel/node.go index 495f9d5..120d867 100644 --- a/api/panel/node.go +++ b/api/panel/node.go @@ -109,10 +109,11 @@ type HysteriaNode struct { type Hysteria2Node struct { CommonNode - UpMbps int `json:"up_mbps"` - DownMbps int `json:"down_mbps"` - ObfsType string `json:"obfs"` - ObfsPassword string `json:"obfs-password"` + Ignore_Client_Bandwidth bool `json:"ignore_client_bandwidth"` + UpMbps int `json:"up_mbps"` + DownMbps int `json:"down_mbps"` + ObfsType string `json:"obfs"` + ObfsPassword string `json:"obfs-password"` } type RawDNS struct { diff --git a/core/hy2/config.go b/core/hy2/config.go index 03a879b..d8aeaf2 100644 --- a/core/hy2/config.go +++ b/core/hy2/config.go @@ -382,7 +382,7 @@ func (n *Hysteria2node) getHyConfig(info *panel.NodeInfo, config *conf.Options, Conn: conn, Outbound: Outbound, BandwidthConfig: *n.getBandwidthConfig(info), - IgnoreClientBandwidth: c.IgnoreClientBandwidth, + IgnoreClientBandwidth: info.Hysteria2.Ignore_Client_Bandwidth, DisableUDP: c.DisableUDP, UDPIdleTimeout: c.UDPIdleTimeout, EventLogger: n.EventLogger, diff --git a/core/sing/node.go b/core/sing/node.go index b6ebde4..f75062e 100644 --- a/core/sing/node.go +++ b/core/sing/node.go @@ -369,10 +369,11 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio } } in.Options = &option.Hysteria2InboundOptions{ - ListenOptions: listen, - UpMbps: info.Hysteria2.UpMbps, - DownMbps: info.Hysteria2.DownMbps, - Obfs: obfs, + ListenOptions: listen, + UpMbps: info.Hysteria2.UpMbps, + DownMbps: info.Hysteria2.DownMbps, + IgnoreClientBandwidth: info.Hysteria2.Ignore_Client_Bandwidth, + Obfs: obfs, InboundTLSOptionsContainer: option.InboundTLSOptionsContainer{ TLS: &tls, },