From de4836c720d7c507f1137ba9f2f0da580c269961 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 2 Nov 2016 16:21:20 +0100 Subject: [PATCH] refine ota settings in conf --- tools/conf/shadowsocks.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/conf/shadowsocks.go b/tools/conf/shadowsocks.go index 6df26e549..a128de6b8 100644 --- a/tools/conf/shadowsocks.go +++ b/tools/conf/shadowsocks.go @@ -26,6 +26,7 @@ func (this *ShadowsocksServerConfig) Build() (*loader.TypedSettings, error) { } account := &shadowsocks.Account{ Password: this.Password, + Ota: shadowsocks.Account_Auto, } cipher := strings.ToLower(this.Cipher) switch cipher { @@ -56,6 +57,7 @@ type ShadowsocksServerTarget struct { Cipher string `json:"method"` Password string `json:"password"` Email string `json:"email"` + Ota bool `json:"ota"` } type ShadowsocksClientConfig struct { @@ -82,6 +84,10 @@ func (this *ShadowsocksClientConfig) Build() (*loader.TypedSettings, error) { } account := &shadowsocks.Account{ Password: server.Password, + Ota: shadowsocks.Account_Enabled, + } + if !server.Ota { + account.Ota = shadowsocks.Account_Disabled } cipher := strings.ToLower(server.Cipher) switch cipher {