From 2eced2bd6c228d032ff4cc01f4725689971b368d Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sat, 13 Aug 2016 21:39:34 +0800 Subject: [PATCH] Load Configure from json --- transport/config_json.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transport/config_json.go b/transport/config_json.go index c7cb2d634..6dbd9c8f8 100644 --- a/transport/config_json.go +++ b/transport/config_json.go @@ -7,12 +7,14 @@ 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" ) func (this *Config) UnmarshalJSON(data []byte) error { type JsonConfig struct { TCPConfig *tcp.Config `json:"tcpSettings"` KCPConfig kcp.Config `json:"kcpSettings"` + WSConfig *ws.Config `json:"wsSettings"` } jsonConfig := &JsonConfig{ KCPConfig: kcp.DefaultConfig(), @@ -22,6 +24,6 @@ func (this *Config) UnmarshalJSON(data []byte) error { } this.tcpConfig = jsonConfig.TCPConfig this.kcpConfig = jsonConfig.KCPConfig - + this.wsConfig = jsonConfig.WSConfig return nil }