mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-20 16:49:12 +00:00
TEMPORARILY allow DNS-origin Freedom connections to resolve while logging recursion risk
This commit is contained in:
@@ -313,10 +313,7 @@ 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
|
||||
errors.LogInfo(ctx, "DNS-origin connection to ", destination, " may recursively resolve with sockopt.domainStrategy ", h.resolveStrategy)
|
||||
}
|
||||
|
||||
input := link.Reader
|
||||
|
||||
@@ -248,7 +248,7 @@ func DialSystem(ctx context.Context, dest net.Destination, sockopt *SocketConfig
|
||||
dest = *newDest
|
||||
}
|
||||
|
||||
if sockopt.DomainStrategy.HasStrategy() && dest.Address.Family().IsDomain() && !(outboundName == "freedom" && session.SkipDNSResolveFromContext(ctx)) {
|
||||
if sockopt.DomainStrategy.HasStrategy() && dest.Address.Family().IsDomain() {
|
||||
finalStrategy := sockopt.DomainStrategy
|
||||
if outboundName == "freedom" && dest.Network == net.Network_UDP && origTargetAddr != nil && src == nil {
|
||||
finalStrategy = finalStrategy.GetDynamicStrategy(origTargetAddr.Family())
|
||||
|
||||
Reference in New Issue
Block a user