1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-20 22:45:24 +00:00

Check if inbound and outbound config are set.

This commit is contained in:
v2ray 2016-06-15 11:58:28 +02:00
parent 103c721626
commit e5394cdaa0

View File

@ -40,7 +40,15 @@ func (this *Config) UnmarshalJSON(data []byte) error {
this.Port = jsonConfig.Port
this.LogConfig = jsonConfig.LogConfig
this.RouterConfig = jsonConfig.RouterConfig
if jsonConfig.InboundConfig == nil {
return errors.New("Point: Inbound config is not specified.")
}
this.InboundConfig = jsonConfig.InboundConfig
if jsonConfig.OutboundConfig == nil {
return errors.New("Point: Outbound config is not specified.")
}
this.OutboundConfig = jsonConfig.OutboundConfig
this.InboundDetours = jsonConfig.InboundDetours
this.OutboundDetours = jsonConfig.OutboundDetours