mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-26 19:41:44 +00:00
Outbounds: Avoid circular dependencies with the built-in DNS (#7425)
https://github.com/XTLS/Xray-core/pull/7425#issuecomment-6900056768 https://github.com/XTLS/Xray-core/pull/7425#issuecomment-6953371666 https://github.com/XTLS/Xray-core/pull/7425#issuecomment-7023506796
This commit is contained in:
@@ -318,6 +318,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
|
||||
}
|
||||
ob.Name = "freedom"
|
||||
ob.CanSpliceCopy = 1
|
||||
|
||||
if !h.usesDialerProxy && len(h.firewall) > 0 {
|
||||
rule := h.firewall[0]
|
||||
if rule.action == RuleAction_Block && rule.network == allNetworks && len(rule.port) == 0 && rule.ip == nil {
|
||||
@@ -350,6 +351,10 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
|
||||
}
|
||||
}
|
||||
|
||||
if h.resolveStrategy.HasStrategy() && session.SkipDNSResolveFromContext(ctx) {
|
||||
errors.LogInfo(ctx, "DNS-origin connection to ", destination, " may recursively resolve with sockopt.domainStrategy ", h.resolveStrategy)
|
||||
}
|
||||
|
||||
input := link.Reader
|
||||
output := link.Writer
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ func (l *Loopback) Process(ctx context.Context, link *transport.Link, _ internet
|
||||
|
||||
errors.LogInfo(ctx, "opening connection to ", destination)
|
||||
content := new(session.Content)
|
||||
content.SkipDNSResolve = true
|
||||
content.SkipDNSResolve = session.SkipDNSResolveFromContext(ctx)
|
||||
content.SniffingRequest = l.sniffingRequest
|
||||
|
||||
ctx = session.ContextWithContent(ctx, content)
|
||||
|
||||
Reference in New Issue
Block a user