Add method to get either IPv6 or IPv4
See original GitHub issueCurrently, in the browser version if v6 function is called and the API request returns a v4 version, then an error is made and we can’t get the IP.
It’d be good if there’s a single function to return IPV6/IPV4, if v6 is available :
console.log(await publicIp.get());
//=> '46.5.21.123' or v6 if available (preferred)
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Example: Accepting connections from both IPv6 and IPv4 clients
This example program demonstrates how to create a server/client model that accepts requests from both IPv4 (those socket applications that use the AF_INET ......
Read more >ipaddress — IPv4/IPv6 manipulation library — Python 3.11.1 ...
Return an IPv4Address or IPv6Address object depending on the IP address passed as argument. Either IPv4 or IPv6 addresses may be supplied; integers...
Read more >Add possibility to specify IPv4 or IPv6? · Issue #1691 - GitHub
I noticed that request by default uses IPv6 if a host is capable of it. However, requests seems to lack the ability to...
Read more >Force requests to use IPv4 / IPv6 - python - Stack Overflow
I've found a minimalistic solution to force urrlib3 to use either ipv4 or ipv6. This method is used by urrlib3 for creating new...
Read more >How to tell if you are on IPv4 or IPv6 - Level Up Coding
This can actually change per device, you may have IPv6 enabled on your internet connection, however, if your Local Area Network (LAN) isn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can do this yourself with https://github.com/sindresorhus/p-any and eventually
Promise.any
How about simply
get
? That’d go good with the module name :