1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-10 09:50:43 +00:00

shadowsocks iv check config file

This commit is contained in:
Shelikhoo 2021-03-05 08:02:41 +00:00
parent b5e29ea14e
commit 6b542f59a9
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

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),