chore: Generate UUID from fastrand

This commit is contained in:
H1JK
2023-03-05 11:00:14 +08:00
parent 3b037acb01
commit ae966833a4
11 changed files with 34 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package context
import (
"context"
"github.com/Dreamacro/clash/common/utils"
"github.com/gofrs/uuid"
"github.com/miekg/dns"
@@ -22,7 +23,7 @@ type DNSContext struct {
}
func NewDNSContext(ctx context.Context, msg *dns.Msg) *DNSContext {
id, _ := uuid.NewV4()
id, _ := utils.UnsafeUUIDGenerator.NewV4()
return &DNSContext{
Context: ctx,