mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
Fix convert time ip parsing in jsonv5
This commit is contained in:
parent
0685f8c55d
commit
0468cdfa56
@ -55,9 +55,12 @@ func filterMessage(ctx context.Context, message protoreflect.Message) error {
|
|||||||
if v2extension.ConvertTimeParseIp != "" {
|
if v2extension.ConvertTimeParseIp != "" {
|
||||||
ipValue := net.ParseIP(value.String())
|
ipValue := net.ParseIP(value.String())
|
||||||
target := message.Descriptor().Fields().ByTextName(v2extension.ConvertTimeParseIp)
|
target := message.Descriptor().Fields().ByTextName(v2extension.ConvertTimeParseIp)
|
||||||
|
if ipValue.To4() != nil {
|
||||||
|
ipValue = ipValue.To4()
|
||||||
|
}
|
||||||
pendingWriteQueue = append(pendingWriteQueue, pendingWrite{
|
pendingWriteQueue = append(pendingWriteQueue, pendingWrite{
|
||||||
field: target,
|
field: target,
|
||||||
value: protoreflect.ValueOf(ipValue),
|
value: protoreflect.ValueOf([]byte(ipValue)),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user