Curl force DNS override

By.

min read

My profile

Share this:

Saves you /etc/hosts

# HTTPS Example
curl -I -L https://domain.example.org/ \
  --resolve domain.example.org:443:192.168.0.1

# HTTP Example
curl -I -L http://domain.example.org/ \
  --resolve domain.example.org:80:192.168.0.1

Source https://www.bram.us/2022/02/10/force-dns-resolving-in-curl-with-the-resolve-switch/

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *