mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
Added kcp related configs
This commit is contained in:
parent
8666d122f0
commit
63c1f2106d
22
transport/hub/kcp/config.go
Normal file
22
transport/hub/kcp/config.go
Normal file
@ -0,0 +1,22 @@
|
||||
package kcp
|
||||
|
||||
type AdvancedConfig struct {
|
||||
Mtu int `json:"MaximumTransmissionUnit"`
|
||||
Sndwnd int `json:"SendingWindowSize"`
|
||||
Rcvwnd int `json:"ReceivingWindowSize"`
|
||||
Fec int `json:"ForwardErrorCorrectionGroupSize"`
|
||||
Acknodelay bool `json:"AcknowledgeNoDelay"`
|
||||
Dscp int `json:"Dscp"`
|
||||
ReadTimeout int `json:"ReadTimeout"`
|
||||
WriteTimeout int `json:"WriteTimeout"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Mode string `json:"Mode"`
|
||||
Key string `json:"EncryptionKey"`
|
||||
AdvancedConfigs *AdvancedConfig `json:"AdvancedConfig,omitempty"`
|
||||
}
|
||||
|
||||
var DefaultAdvancedConfigs = &AdvancedConfig{
|
||||
Mtu: 1350, Sndwnd: 1024, Rcvwnd: 1024, Fec: 4, Dscp: 0, ReadTimeout: 60, WriteTimeout: 40, Acknodelay: false,
|
||||
}
|
Loading…
Reference in New Issue
Block a user