mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
refine ota settings in conf
This commit is contained in:
parent
63d3c9fa30
commit
de4836c720
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user