hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

IPv6 address support #218

Closed sternenseemann closed 3 years ago

sternenseemann commented 3 years ago

Not sure if jackline uses ipv6 in address resolution, but if you enter an IPv6 address directly in config.sexp, an EAFNOSUPPORT error is generated.

hannesm commented 3 years ago

thanks for opening this issue, I implemented IPv6 support as a PR #220. Could you try this out, whether it works for you? I tested it behind a Deutsche Telekom IPv6 DSL on jabber.ccc.de successfully.

hannesm commented 3 years ago

in addition to "hard-coded IPv6 addresses", #220 also resolves the v6 addresses of hostnames and attempts to connect to these (with a slight preference for IPv6) -- it should work with v4-only and v6-only and dual-stack hosts.

sternenseemann commented 3 years ago

220 works fine for me also (1und1). I tested the following things:

hannesm commented 3 years ago

thanks for your testing, I needed to revise #220 since it did not handle a connection well where the server supports IPv6 (has an AAAA record in DNS), but the client does not have an IPv6 address configured. this works now.

hannesm commented 3 years ago

would be nice if you could check whether c6e3c5b works fine for you as well.

sternenseemann commented 3 years ago

I tested c6e3c5b110b395950f21554690d2ac3920e45ce2 and all cases above work as they should! I also tried removing my IPv6 address and connecting via DNS and in that case jackline picks the IPv4 address correctly.

hannesm commented 3 years ago

I just merged #220, closing this issue since IPv6 is supported in jackline now