mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-17 09:56:18 -05:00
24 lines
448 B
Go
24 lines
448 B
Go
package transport
|
|
|
|
import "github.com/v2ray/v2ray-core/transport/hub/kcpv"
|
|
|
|
// Config for V2Ray transport layer.
|
|
type Config struct {
|
|
ConnectionReuse bool
|
|
enableKcp bool
|
|
kcpConfig *kcpv.Config
|
|
}
|
|
|
|
// Apply applies this Config.
|
|
func (this *Config) Apply() error {
|
|
if this.ConnectionReuse {
|
|
connectionReuse = true
|
|
}
|
|
enableKcp = this.enableKcp
|
|
if enableKcp {
|
|
KcpConfig = this.kcpConfig
|
|
connectionReuse = false
|
|
}
|
|
return nil
|
|
}
|