|
@@ -27,6 +27,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
|
|
Accounts []*SocksAccount `json:"accounts"`
|
|
Accounts []*SocksAccount `json:"accounts"`
|
|
|
UDP bool `json:"udp"`
|
|
UDP bool `json:"udp"`
|
|
|
Host *v2net.AddressJson `json:"ip"`
|
|
Host *v2net.AddressJson `json:"ip"`
|
|
|
|
|
+ Timeout int `json:"timeout"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
rawConfig := new(SocksConfig)
|
|
rawConfig := new(SocksConfig)
|
|
@@ -55,6 +56,10 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
|
|
} else {
|
|
} else {
|
|
|
this.Address = v2net.LocalHostIP
|
|
this.Address = v2net.LocalHostIP
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if rawConfig.Timeout >= 0 {
|
|
|
|
|
+ this.Timeout = rawConfig.Timeout
|
|
|
|
|
+ }
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
|
|
|