mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-25 07:20:44 +00:00
check if address is set
This commit is contained in:
1 parent
679d646571
commit
8a5f37dad7
2 files changed
+12
-2
No files matched your search
@@ -22,7 +22,9 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
if err := json.Unmarshal(data, rawConfig); err != nil {
|
||||
return errors.New("Dokodemo: Failed to parse config: " + err.Error())
|
||||
}
|
||||
this.Address = rawConfig.Host.Address
|
||||
if rawConfig.Host != nil {
|
||||
this.Address = rawConfig.Host.Address
|
||||
}
|
||||
this.Port = rawConfig.PortValue
|
||||
this.Network = rawConfig.NetworkList
|
||||
this.Timeout = rawConfig.TimeoutValue
|
||||
|
||||
Reference in new issue
Block a user