Server side OTA settings in shadowsocks

This commit is contained in:
Darien Raymond committed 2016-11-25 16:46:59 +01:00
1 parent 22379e5a6b
commit 470e35849f
2 files changed
+25 -1

No files matched your search

+8
View File
@@ -15,6 +15,7 @@ type ShadowsocksServerConfig struct {
UDP bool `json:"udp"`
Level byte `json:"level"`
Email string `json:"email"`
OTA *bool `json:"ota"`
}
func (this *ShadowsocksServerConfig) Build() (*loader.TypedSettings, error) {
@@ -28,6 +29,13 @@ func (this *ShadowsocksServerConfig) Build() (*loader.TypedSettings, error) {
Password: this.Password,
Ota: shadowsocks.Account_Auto,
}
if this.OTA != nil {
if *this.OTA {
account.Ota = shadowsocks.Account_Enabled
} else {
account.Ota = shadowsocks.Account_Disabled
}
}
cipher := strings.ToLower(this.Cipher)
switch cipher {
case "aes-256-cfb":