1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-30 19:15:23 +00:00
v2fly/transport/config.go
2016-08-13 21:37:17 +08:00

27 lines
534 B
Go

package transport
import (
"github.com/v2ray/v2ray-core/transport/internet/kcp"
"github.com/v2ray/v2ray-core/transport/internet/tcp"
"github.com/v2ray/v2ray-core/transport/internet/ws"
)
// Config for V2Ray transport layer.
type Config struct {
tcpConfig *tcp.Config
kcpConfig kcp.Config
wsConfig *ws.Config
}
// Apply applies this Config.
func (this *Config) Apply() error {
if this.tcpConfig != nil {
this.tcpConfig.Apply()
}
this.kcpConfig.Apply()
if this.wsConfig != nil {
this.wsConfig.Apply()
}
return nil
}