shadowsocks iv check config file

This commit is contained in:
Shelikhoo
2021-04-01 20:59:36 +01:00
parent b5e29ea14e
commit 6b542f59a9
+5
View File
@@ -32,6 +32,7 @@ type ShadowsocksServerConfig struct {
Level byte `json:"level"`
Email string `json:"email"`
NetworkList *NetworkList `json:"network"`
IVCheck bool `json:"ivCheck"`
}
func (v *ShadowsocksServerConfig) Build() (proto.Message, error) {
@@ -44,6 +45,7 @@ func (v *ShadowsocksServerConfig) Build() (proto.Message, error) {
}
account := &shadowsocks.Account{
Password: v.Password,
IvCheck: v.IVCheck,
}
account.CipherType = cipherFromString(v.Cipher)
if account.CipherType == shadowsocks.CipherType_UNKNOWN {
@@ -67,6 +69,7 @@ type ShadowsocksServerTarget struct {
Email string `json:"email"`
Ota bool `json:"ota"`
Level byte `json:"level"`
IVCheck bool `json:"ivCheck"`
}
type ShadowsocksClientConfig struct {
@@ -99,6 +102,8 @@ func (v *ShadowsocksClientConfig) Build() (proto.Message, error) {
return nil, newError("unknown cipher method: ", server.Cipher)
}
account.IvCheck = server.IVCheck
ss := &protocol.ServerEndpoint{
Address: server.Address.Build(),
Port: uint32(server.Port),