mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-13 22:45:13 +00:00
Server side OTA settings in shadowsocks
This commit is contained in:
2 files changed
+25
-1
No files matched your search
@@ -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":
|
||||
|
||||
Reference in new issue
Block a user