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 <curl-users_at_cool.haxx.se>
Date: Sun, 24 Jan 2021 18:10:53 -0800

On Mon, Jan 25, 2021 at 09:03:50AM +0800, Hongyi Zhao via curl-users wrote:
> On Mon, Jan 25, 2021 at 12:54 AM Dan Fandrich via curl-users
> <curl-users_at_cool.haxx.se> wrote:
> > On Sun, Jan 24, 2021 at 11:05:38PM +0800, Hongyi Zhao via curl-users wrote:
> > > $ curl https://api.ipify.org/
> > > 106.9.179.116
> > > $ curl -x socks5://127.0.0.1:18888 https://api.ipify.org
> > > 103.138.74.44
> > >
> > > I want to know if I still can obtain my real public IP address with
> > > curl even using the socks5 proxy to access the corresponding API. Is
> > > this possible?
> >
> > What do you mean "real" IP address?
>
> I mean the public but dynamic IP address my ISP assigned to me.

The first curl command you list above should be giving you that already.
Isn't it?

> For my scenario, from one of my intranet machine, I want to do DDNS,
> which will update the A record of my domain name on the remote DNS
> server using the public dynamic IP address on my router.

Some DDNS providers do this automatically for you. When you send a request to
update the dynamic address and don't explicitly provide a new address, it will
use whatever address the request is coming on.

This discussion isn't really about curl, though.

Dan
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-01-25