[squid-users] peer-select.cc, cache_peer and dns queries
Archer
the-archer at 139.com
Tue Jan 13 01:22:47 UTC 2026
Thank you. I picked up this part of log as evidence that Squid does conduct DNS lookups AFTER a peer connection is selected( log ommited). In the configuration, a cache peer (parent proxy) for specified domains presents.
And the relative part of config is already provided in some other thread of this post. TY
Archer
the-archer at 139.com
我也要制作一个
扫一扫,快速添加名片到手机
--------------------------------------------------------------------------------
----The following is the content of the forwarded email----
From:Alex Rousskov
To:squid-users
Date:2026-01-13 04:02:09
Subject:Re: [squid-users] peer-select.cc, cache_peer and dns queries
On 2026-01-09 17:19, archer wrote:
> cache_peer a.b.c.d parent ... name=NodeNG
> always_direct extranet_whitelist
> never_direct extranet
> I observed peer-select.cc still conducting DNS
> lookups on an extranet domain , which is a purely domain-based ACL. e.g.
>
> peer_select.cc(833) selectSomeParent: CONNECT www.example.com
> ...
> peer_select.cc(460) resolveSelected: Find IP
> destination for: www.example.com:443 via a.b.c.d
The above debugging log snippet is unrelated to ACLs checking/code.
Squid says that it needs to resolve a.b.c.d to connect to a peer at that
a.b.c.d address. If a.b.c.d is alerady an IP address, then that
resolution is going to be a no-op -- no actual DNS queries will be sent.
I do not know what triggers other DNS queries in your case. If I have to
guess, I would guess that peer selection algorithm finds multiple ways
to satisfy that CONNECT-to-X request and some of those ways include a
direct connection to X, triggering X resolution.
> So, what can I do to have extranet DNS handled by the parent proxy,
> while leaving the remainder to the child proxy, with a domain list ?
> Squid Cache: Version 5.7
FWIW, the above version is not supported by the Squid Project.
Alex.
_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
https://lists.squid-cache.org/listinfo/squid-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20260113/d27b4105/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 59819330161365221.png;
Type: application/octet-stream
Size: 884 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20260113/d27b4105/attachment.obj>
More information about the squid-users
mailing list