mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
shadowsocks iv check config file
This commit is contained in:
parent
b5e29ea14e
commit
6b542f59a9
@ -32,6 +32,7 @@ type ShadowsocksServerConfig struct {
|
|||||||
Level byte `json:"level"`
|
Level byte `json:"level"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
NetworkList *NetworkList `json:"network"`
|
NetworkList *NetworkList `json:"network"`
|
||||||
|
IVCheck bool `json:"ivCheck"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *ShadowsocksServerConfig) Build() (proto.Message, error) {
|
func (v *ShadowsocksServerConfig) Build() (proto.Message, error) {
|
||||||
@ -44,6 +45,7 @@ func (v *ShadowsocksServerConfig) Build() (proto.Message, error) {
|
|||||||
}
|
}
|
||||||
account := &shadowsocks.Account{
|
account := &shadowsocks.Account{
|
||||||
Password: v.Password,
|
Password: v.Password,
|
||||||
|
IvCheck: v.IVCheck,
|
||||||
}
|
}
|
||||||
account.CipherType = cipherFromString(v.Cipher)
|
account.CipherType = cipherFromString(v.Cipher)
|
||||||
if account.CipherType == shadowsocks.CipherType_UNKNOWN {
|
if account.CipherType == shadowsocks.CipherType_UNKNOWN {
|
||||||
@ -67,6 +69,7 @@ type ShadowsocksServerTarget struct {
|
|||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Ota bool `json:"ota"`
|
Ota bool `json:"ota"`
|
||||||
Level byte `json:"level"`
|
Level byte `json:"level"`
|
||||||
|
IVCheck bool `json:"ivCheck"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShadowsocksClientConfig struct {
|
type ShadowsocksClientConfig struct {
|
||||||
@ -99,6 +102,8 @@ func (v *ShadowsocksClientConfig) Build() (proto.Message, error) {
|
|||||||
return nil, newError("unknown cipher method: ", server.Cipher)
|
return nil, newError("unknown cipher method: ", server.Cipher)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
account.IvCheck = server.IVCheck
|
||||||
|
|
||||||
ss := &protocol.ServerEndpoint{
|
ss := &protocol.ServerEndpoint{
|
||||||
Address: server.Address.Build(),
|
Address: server.Address.Build(),
|
||||||
Port: uint32(server.Port),
|
Port: uint32(server.Port),
|
||||||
|
Loading…
Reference in New Issue
Block a user