mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-27 22:36:12 -04:00
Check if inbound and outbound config are set.
This commit is contained in:
parent
103c721626
commit
e5394cdaa0
@ -40,7 +40,15 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
|||||||
this.Port = jsonConfig.Port
|
this.Port = jsonConfig.Port
|
||||||
this.LogConfig = jsonConfig.LogConfig
|
this.LogConfig = jsonConfig.LogConfig
|
||||||
this.RouterConfig = jsonConfig.RouterConfig
|
this.RouterConfig = jsonConfig.RouterConfig
|
||||||
|
|
||||||
|
if jsonConfig.InboundConfig == nil {
|
||||||
|
return errors.New("Point: Inbound config is not specified.")
|
||||||
|
}
|
||||||
this.InboundConfig = jsonConfig.InboundConfig
|
this.InboundConfig = jsonConfig.InboundConfig
|
||||||
|
|
||||||
|
if jsonConfig.OutboundConfig == nil {
|
||||||
|
return errors.New("Point: Outbound config is not specified.")
|
||||||
|
}
|
||||||
this.OutboundConfig = jsonConfig.OutboundConfig
|
this.OutboundConfig = jsonConfig.OutboundConfig
|
||||||
this.InboundDetours = jsonConfig.InboundDetours
|
this.InboundDetours = jsonConfig.InboundDetours
|
||||||
this.OutboundDetours = jsonConfig.OutboundDetours
|
this.OutboundDetours = jsonConfig.OutboundDetours
|
||||||
|
Loading…
Reference in New Issue
Block a user