chore: adjust the internal code structure of the dns module

This commit is contained in:
wwqgtxx
2025-09-29 11:22:05 +08:00
parent 94b591ed44
commit 40e0813869
7 changed files with 72 additions and 72 deletions

View File

@@ -2,10 +2,10 @@ package context
import (
"context"
"github.com/metacubex/mihomo/common/utils"
"github.com/gofrs/uuid/v5"
"github.com/miekg/dns"
)
const (
@@ -17,17 +17,15 @@ const (
type DNSContext struct {
context.Context
id uuid.UUID
msg *dns.Msg
tp string
id uuid.UUID
tp string
}
func NewDNSContext(ctx context.Context, msg *dns.Msg) *DNSContext {
func NewDNSContext(ctx context.Context) *DNSContext {
return &DNSContext{
Context: ctx,
id: utils.NewUUIDV4(),
msg: msg,
id: utils.NewUUIDV4(),
}
}