Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Show IPv4 AND IPv6 #160

Open
sachaz opened this issue Aug 29, 2022 · 2 comments
Open

Feature request: Show IPv4 AND IPv6 #160

sachaz opened this issue Aug 29, 2022 · 2 comments

Comments

@sachaz
Copy link

sachaz commented Aug 29, 2022

Hi,
We cannot see IPv4 AND IPv6 if booth are available. Something like: https://www.octopuce.fr/ip.php
And add to the actual http://ifconfig.co/ip: http://ifconfig.co/ipv4 and http://ifconfig.co/ipv6 ?
Kind regards.

@onfro
Copy link

onfro commented Dec 25, 2022

same! Please, add both ipv6 and ipv4 for ifconfig.co/json it only shows IP address and IP address (decimal) for my ipv6, but not ipv4 addr

@slatian
Copy link

slatian commented Feb 6, 2023

Since there seems to be a slight misunderstanding of how IP and echoip works allow me an attempt to explain:
IPv4 and IPv6 are different protocols, both can talk to the internet but there are really two internets, one only speaks IPv4, the other one only speaks IPv6. It just happens that most machines are fluent in both protocols so that in most cases not even the network people care which one is used.

The point is: You can only speak one IP version for one connection (roughly equals one http request) and therefor only fin out one IP-Address per connection.

What echoip does is simply return to you the IP address it sees as being the other end of the line (thick packet return address) to you in the format of your choice, all in one request, that is the reason it only returns one address.

https://www.octopuce.fr/ip.php can display both addresses because it actually makes two (relevant for this case) requests from the client side (html, javascript "magic"), one to ipv4.sarbl.org and one to ipv6.sarbl.org which uses the same DNS trick (the v4 address only resolves to an IPv4 address, the v6 one resolves to an IPv6 address) https://ifconfig.co used until somewhen in 2018 (look at the FAQ) (shameless self promotion: https://echoip.slatecave.net uses this trick) one makes the client use IPv4 to get the IPv4 address and one makes it use v6 to get the v6 address.


So with that in mind:

Please, add both ipv6 and ipv4 for ifconfig.co/json

No, a single curl query can't give you both at the same time, you have to query twice with the -4 and -6 as indicated in the FAQ. (or use an instance that has the v4 and v6 subdomains configured and query those)

And add to the actual http://ifconfig.co/ip: http://ifconfig.co/ipv4 and http://ifconfig.co/ipv6 ?

This doesn't work because you can't connect paths to addresses, this is why the subdomain trick is needed for browsers (yes javascript, but that won't work for curl, and why use js when the server perfectly capable of rendering html)


Remains the question: Why were the v4 and v6 domains discontinued?

I'll pass that one on to @mpolden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants