cURL / Mailing Lists / curl-library / Single Mail

curl-library

Libcurl : IP blacklisting

From: BALASAHEB SALUNKE <bg.salunke09_at_gmail.com>
Date: Mon, 8 Jun 2015 23:18:28 +0530

Dear All,

I'm working on blocking HTTP request to particular IP address.

As you suggested by Daniel in one of his answer on SO, I'm using
CURLOPT_OPENSOCKETFUNCTION
<http://curl.haxx.se/libcurl/c/CURLOPT_OPENSOCKETFUNCTION.html> to get
control over request before creating a socket.

However if I blocked the request and returns "CURL_SOCKET_BAD", it results
into Connection timeout error i.e. 28.

Is there any way handle this, so that we can return specific return code
from libcurl that shows request was blcoked.

Sorry to mail you privatly, I added the question on SO too, but didn't
received any pointer.

http://stackoverflow.com/questions/30682955/handle-return-code-in-libcurl

Thanks and Regards,
Balasaheb Salunke
cell : +91 8087699715 / +91 9766162204

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-08