Comments (8)
Works like a charm! 👏
from gild.
Yes this would be great. Now that Gild is using https://github.com/dvkt/ldpl-socket I will look into adding IPv6 support to that package.
from gild.
why do you need IPv6 support?
I don't personally need IPv6 support as such, but every piece of networking software in 2019 ought to support IPv6.
If a piece of software (that supports IPv6) gets an IPv4 and an IPv6 address when looking up the IP address of a host, it will generally choose the IPv6 address (on Linux according to /etc/gai.conf
), and generally – at least in my experience – nothing needs be done socket-wise.
It seems (from ldpl_socket.cpp
) that gild is using gethostbyname()
to look up a host address. The gethostbyname(3)
on my box says that (1) it will return an IPv4 address, and (2) that the function is obsolete and that getaddrinfo(3)
should be used instead: getaddrinfo()
will use whichever kind of IP address is available:
The
getaddrinfo()
function combines the functionality provided by thegethostbyname(3)
andgetservbyname(3)
functions into a single interface, but unlike the latter functions,getaddrinfo()
is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies.
Sounds like this is an easy fix.
from gild.
@kseistrup Great, thanks for the tip about getaddrinfo()
! I've updated https://github.com/dvkt/ldpl-socket to support both IPv4 and IPv6, and I've pushed a new release of Gild with support. I'm sure there are still some kinks in it so please let me know if anything isn't working. Thank you!
from gild.
I didn't know all that about IPv6, @kseistrup, thank you for telling me!
from gild.
@kseistrup I'm intrigued, why do you need IPv6 support? Are you trying to connect to an IPv6 address or trying to connect from an IPv6 address? Have you faced any errors?
This may sound strange, but I have never come across an IPv6 address (that I know of), so I'd like to know the use cases so we can support them better.
from gild.
PS:
I have never come across an IPv6 address (that I know of)
If your device doesn't have an IPv6 address, you most likely haven't. But my devices will get both an IPv4 and an IPv6 address from the router and will favour IPv6 connections over IPv4 ditto.
Even if you don't get IPv6 from your ISP, you may at least have IPv6 on your loopback interface:
$ ifconfig lo
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 16206 bytes 1812911 (1.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16206 bytes 1812911 (1.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
where ::1
is the IPv6 equivalent of 127.0.0.1
.
from gild.
Sweet! I've just gone to bed, but I'll try the new version tomorrow. Thanks!
from gild.
Related Issues (5)
- GILD via AUR HOT 1
- Navigation: a suggestion HOT 8
- Compiling gild v0.2.0 with LDPL v4.4 fails HOT 14
- Please accept gopher:// URLs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gild.