log and refine

This commit is contained in:
Meo597
2026-11-16 03:32:32 +08:00
parent 9db67f0e4e
commit 009635c229
2 changed files with 29 additions and 24 deletions
+7 -6
View File
@@ -286,12 +286,6 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
ob.Name = "freedom"
ob.CanSpliceCopy = 1
if session.SkipDNSResolveFromContext(ctx) {
handler := *h
handler.resolveStrategy = internet.DomainStrategy_AS_IS
h = &handler
}
inbound := session.InboundFromContext(ctx)
var defaultRule *FinalRule
if !h.usesDialerProxy { // freedom is not the final outbound, final rules do not apply (and the domain is not resolved)
@@ -318,6 +312,13 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
}
}
if h.resolveStrategy.HasStrategy() && session.SkipDNSResolveFromContext(ctx) {
errors.LogInfo(ctx, "using AsIs instead of sockopt.domainStrategy ", h.resolveStrategy, " for connection to ", destination, " (including UDP packet targets)")
handler := *h
handler.resolveStrategy = internet.DomainStrategy_AS_IS
h = &handler
}
input := link.Reader
output := link.Writer