mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
add default settings
This commit is contained in:
parent
8c57d03418
commit
1e306a55e8
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user