1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-26 01:15:38 +00:00

v2jsonpb full dump support

This commit is contained in:
Shelikhoo 2021-06-19 20:42:17 +01:00
parent c187b6fb3e
commit c119d8dc79
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -16,8 +16,8 @@ import (
func loadV2JsonPb(data []byte) (*core.Config, error) {
coreconf := &core.Config{}
jsonpbloader := &protojson.UnmarshalOptions{}
err := jsonpbloader.Unmarshal(data, coreconf)
jsonpbloader := &protojson.UnmarshalOptions{Resolver: resolver2{serial.GetResolver()}, AllowPartial: true}
err := jsonpbloader.Unmarshal(data, &V2JsonProtobufFollower{coreconf.ProtoReflect()})
if err != nil {
return nil, err
}