[squid-users] custom DNS resolver scripts? (was: Re: Is it possible to force some dstdomain to ipv4) protocol without define an outgoing ip address ?

Alex Rousskov rousskov at measurement-factory.com
Wed Jun 9 23:42:09 UTC 2021


On 6/9/21 6:16 PM, Ambrose Li wrote:
> On Wed, Jun 09, 2021 at 12:05:40PM -0400, Alex Rousskov wrote:
>> Not that I know of. You can implement this logic inside a custom DNS
>> resolver script, or you can reconfigure Squid whenever your outgoing
>> addresses change, but I understand that you are looking for a better
>> solution.

> What are the current recommendations for custom DNS resolver scripts?

I was talking about a custom script that implements a custom DNS
resolver. With modern libraries, it takes a few lines of code to write a
basic one. This kind of resolver does not resolve most of the names, but
forwards queries to another/real resolver, adapting the queries and/or
the answers as needed.

For an oversimplified example, such a script can respond to all AAAA
queries (with answers containing no records) while forwarding all A
queries to a "real" resolver.

Eventually, Squid will support the logic you need internally, but that
requires development.


> I've not upgraded squid ever since the custom-dns-program option was
> discontinued. I'd be very interested in knowing what replaced it since
> I do want to switch to a current, supported version.

I do not even remember what custom-dns-program did exactly, but these
days Squid contains a built-in basic DNS client that talks to DNS
resolver(s) at the address(es) specified by the dns_nameservers directive.


HTH,

Alex.


More information about the squid-users mailing list