<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Dns on Aidan Mitchell</title>
    <link>https://aidanmitchell.co.uk/tags/dns/</link>
    <description>Recent content in Dns on Aidan Mitchell</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 19 Apr 2026 19:42:00 +0100</lastBuildDate>
    <atom:link href="https://aidanmitchell.co.uk/tags/dns/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Using dnspython to override the socket resolver</title>
      <link>https://aidanmitchell.co.uk/posts/using-dnspython-override-socket-dns/</link>
      <pubDate>Sun, 19 Apr 2026 19:42:00 +0100</pubDate>
      <guid>https://aidanmitchell.co.uk/posts/using-dnspython-override-socket-dns/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently been working on a simple &lt;a href=&#34;https://codeberg.org/aodhn/denz&#34;&gt;domain monitoring tool&lt;/a&gt; that includes a module for retrieving TLS certificate data. Part of the tools functionality is that the user can specify the DNS server(s) handling resolution of the domains to be monitored. Using the &lt;a href=&#34;https://pypi.org/project/dnspython/&#34;&gt;dnspython&lt;/a&gt; library, the tool can set the desired resolvers, make queries, and avoid falling through to the system resolver. However, the module for querying TLS certificates makes use of the &lt;code&gt;ssl&lt;/code&gt; std lib which uses the &lt;code&gt;socket&lt;/code&gt; library. &lt;code&gt;socket&lt;/code&gt; lib relies on the &lt;code&gt;getaddrinfo&lt;/code&gt; or &lt;code&gt;gethostbyname&lt;/code&gt; methods which are dependent on the system hosts file and resolver configuration. There is no native method in &lt;code&gt;socket&lt;/code&gt; to override the resolver which would invalidate the intended function of my tool.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
