config.go 355 B

1234567891011121314151617181920
  1. package transport
  2. import "github.com/v2ray/v2ray-core/transport/hub/kcpv"
  3. type Config struct {
  4. ConnectionReuse bool
  5. enableKcp bool
  6. kcpConfig *kcpv.Config
  7. }
  8. func (this *Config) Apply() error {
  9. if this.ConnectionReuse {
  10. connectionReuse = true
  11. }
  12. enableKcp = this.enableKcp
  13. if enableKcp {
  14. KcpConfig = this.kcpConfig
  15. }
  16. return nil
  17. }