chore: support set cwnd for hy2 too
This commit is contained in:
@ -16,6 +16,7 @@ type Hysteria2Server struct {
|
||||
Down string `yaml:"down" json:"down,omitempty"`
|
||||
IgnoreClientBandwidth bool `yaml:"ignore-client-bandwidth" json:"ignore-client-bandwidth,omitempty"`
|
||||
Masquerade string `yaml:"masquerade" json:"masquerade,omitempty"`
|
||||
CWND int `yaml:"cwnd" json:"cwnd,omitempty"`
|
||||
}
|
||||
|
||||
func (h Hysteria2Server) String() string {
|
||||
|
@ -20,6 +20,7 @@ type Hysteria2Option struct {
|
||||
Down string `inbound:"down,omitempty"`
|
||||
IgnoreClientBandwidth bool `inbound:"ignore-client-bandwidth,omitempty"`
|
||||
Masquerade string `inbound:"masquerade,omitempty"`
|
||||
CWND int `inbound:"cwnd,omitempty"`
|
||||
}
|
||||
|
||||
func (o Hysteria2Option) Equal(config C.InboundConfig) bool {
|
||||
@ -55,6 +56,7 @@ func NewHysteria2(options *Hysteria2Option) (*Hysteria2, error) {
|
||||
Down: options.Down,
|
||||
IgnoreClientBandwidth: options.IgnoreClientBandwidth,
|
||||
Masquerade: options.Masquerade,
|
||||
CWND: options.CWND,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
@ -111,6 +111,7 @@ func New(config LC.Hysteria2Server, tcpIn chan<- C.ConnContext, udpIn chan<- C.P
|
||||
IgnoreClientBandwidth: config.IgnoreClientBandwidth,
|
||||
Handler: h,
|
||||
MasqueradeHandler: masqueradeHandler,
|
||||
CWND: config.CWND,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user