This commit is contained in:
Meo597
2026-11-16 01:56:42 +08:00
parent 541f8ea3d1
commit 0fcf8f4dce
6 changed files with 17 additions and 16 deletions
+1 -2
View File
@@ -181,8 +181,7 @@ func (h *Handler) Tag() string {
func (h *Handler) Dispatch(ctx context.Context, link *transport.Link) {
outbounds := session.OutboundsFromContext(ctx)
ob := outbounds[len(outbounds)-1]
content := session.ContentFromContext(ctx)
if h.senderSettings != nil && h.senderSettings.TargetStrategy.HasStrategy() && ob.Target.Address.Family().IsDomain() && (content == nil || !content.SkipDNSResolve) {
if h.senderSettings != nil && h.senderSettings.TargetStrategy.HasStrategy() && ob.Target.Address.Family().IsDomain() && !session.SkipDNSResolveFromContext(ctx) {
strategy := h.senderSettings.TargetStrategy
if ob.Target.Network == net.Network_UDP && ob.OriginalTarget.Address != nil {
strategy = strategy.GetDynamicStrategy(ob.OriginalTarget.Address.Family())
+2 -3
View File
@@ -44,9 +44,8 @@ func (c routingContext) GetRuleTag() string {
return ""
}
// GetSkipDNSResolve is a mock implementation here to match the interface,
// SkipDNSResolve is set from dns module, no use if coming from a protobuf object?
// TODO: please confirm @Vigilans
// GetSkipDNSResolve implements routing.Context.
// The protobuf RoutingContext has no skip flag, so API contexts use false.
func (c routingContext) GetSkipDNSResolve() bool {
return false
}