curl / Mailing Lists / curl-users / 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: Obtain the real public IP address of mine with curl when using the socks5 proxy to access the corresponding api.

From: Dan Fandrich via curl-users <>
Date: Sun, 24 Jan 2021 20:53:34 -0800

On Mon, Jan 25, 2021 at 10:27:49AM +0800, Hongyi Zhao via curl-users wrote:
> Yes, but sometimes I maybe not directly access the API's URL while
> through socks5 proxy does.

If you can't get through directly to a server that returns your IP address,
then you won't be able to rely on this method to obtain the IP address. You'll
probably have to ask the local router somehow, like with an HTTP or SNMP
endpoint, or perhaps a server at your ISP. If the problem is a firewall
filtering ports 80 or 443 or all of TCP, maybe you can use another protocol
like DNS to get the same information (e.g.
dig -t txt

Received on 2021-01-25