curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Feature suggestion to block Curl from connecting reserved and private IP addresses

From: Dan Fandrich via curl-library <>
Date: Wed, 15 Dec 2021 00:00:01 -0800

On Tue, Dec 14, 2021 at 01:29:11PM +0530, Ayesh Karunaratne via curl-library wrote:
> With the addition of CURLOPT_PREREQFUNCTION, one could write a
> callback function to selectively block requests to certain IP/port
> ranges.

For the record, blocking requests by IP address has been possible for a long
time using CURLOPT_OPENSOCKETFUNCTION. It's documented in the Local Resources
section at
Received on 2021-12-15