diff --git a/infra/conf/v5cfg/inbound.go b/infra/conf/v5cfg/inbound.go index 4c063a4f1..5f6d8e94f 100644 --- a/infra/conf/v5cfg/inbound.go +++ b/infra/conf/v5cfg/inbound.go @@ -58,6 +58,10 @@ func (c InboundConfig) BuildV5(ctx context.Context) (proto.Message, error) { receiverSettings.SniffingSettings = s } + if c.Settings == nil { + c.Settings = []byte("{}") + } + inboundConfigPack, err := loadHeterogeneousConfigFromRawJson("inbound", c.Protocol, c.Settings) if err != nil { return nil, newError("unable to load inbound protocol config").Base(err) diff --git a/infra/conf/v5cfg/outbound.go b/infra/conf/v5cfg/outbound.go index 888b055d4..1e5fa3822 100644 --- a/infra/conf/v5cfg/outbound.go +++ b/infra/conf/v5cfg/outbound.go @@ -40,6 +40,10 @@ func (c OutboundConfig) BuildV5(ctx context.Context) (proto.Message, error) { senderSettings.MultiplexSettings = c.MuxSettings.Build() } + if c.Settings == nil { + c.Settings = []byte("{}") + } + outboundConfigPack, err := loadHeterogeneousConfigFromRawJson("outbound", c.Protocol, c.Settings) if err != nil { return nil, newError("unable to load outbound protocol config").Base(err)