<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Curl on Lead DevOps</title><link>https://lead-devops.blackdevhub.online/en/tags/curl/</link><description>Recent content in Curl on Lead DevOps</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 18 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://lead-devops.blackdevhub.online/en/tags/curl/index.xml" rel="self" type="application/rss+xml"/><item><title>curl --resolve and SNI: Testing Virtual Hosts Without /etc/hosts</title><link>https://lead-devops.blackdevhub.online/en/posts/curl-resolve-i-sni/</link><pubDate>Fri, 18 Sep 2026 00:00:00 +0000</pubDate><guid>https://lead-devops.blackdevhub.online/en/posts/curl-resolve-i-sni/</guid><description>&lt;p&gt;When you need to test a virtual host on a specific IP but don&amp;rsquo;t want to edit &lt;code&gt;/etc/hosts&lt;/code&gt; — whether due to permissions, conflicts with other services, or just the habit of keeping the file clean — &lt;code&gt;curl --resolve&lt;/code&gt; solves both problems at once: it overrides DNS resolution and sends the correct SNI in the TLS handshake.&lt;/p&gt;&#10;&lt;h2 id="problem-virtual-host-without-editing-etchosts"&gt;Problem: virtual host without editing /etc/hosts&#10;&lt;/h2&gt;&#10;&lt;p&gt;Multiple virtual hosts can live on a single IP, and the server picks the right one based on the &lt;code&gt;Host&lt;/code&gt; header (HTTP/1.1) and SNI (TLS). Without an entry in &lt;code&gt;/etc/hosts&lt;/code&gt;, curl first tries to resolve the name through DNS — getting the wrong IP, or no response at all.&lt;/p&gt;</description></item></channel></rss>