1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-17 16:29:55 -04:00

protobuf for stream settings

This commit is contained in:
Darien Raymond
2016-10-02 23:43:58 +02:00
parent 5ec948f690
commit 1d13f47f9c
59 changed files with 1243 additions and 323 deletions

View File

@@ -1,26 +1,11 @@
package transport
import (
"v2ray.com/core/transport/internet/kcp"
"v2ray.com/core/transport/internet/tcp"
"v2ray.com/core/transport/internet/ws"
"v2ray.com/core/transport/internet"
)
// 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()
}
internet.ApplyGlobalNetworkSettings(this.NetworkSettings)
return nil
}