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

Improve documentation around IPv4/IPv6 address binding #218

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

greatest-ape
Copy link
Owner

No description provided.

@alopatindev
Copy link
Contributor

Thanks. However this documentation doesn't explain how to bind on both IPv4 and IPv6 loopback interfaces (not wildcard addresses).

@greatest-ape
Copy link
Owner Author

It does, though? ::1 will bind on loopback on both IPv4 and IPv6 on Linux, if I’m not mistaken.

@alopatindev
Copy link
Contributor

Oh, got it. Well it doesn't work to me on GNU/Linux: with address = "[::1]:3000" and only_ipv6 = false it binds to IPv6 [::1]:3000, not IPv4 127.0.0.1:3000.

It works with [::ffff:127.0.0.1]:3000 though: it binds to IPv6 [::ffff:127.0.0.1]:3000 and to IPv4 127.0.0.1:3000.

@greatest-ape
Copy link
Owner Author

greatest-ape commented Jan 13, 2025

Hmm, I was mistaken. However, [::ffff:127.0.0.1]:3000 won't actually be able receive IPv6 traffic in my testing. This seems to chime with https://serverfault.com/a/1102261 . Did you get it to work? That is, with the current code, only [::] works for receiving both IPv4 and IPv6 traffic. I've updated the docs to reflect this (#219), but ideally, aquatic should be rewritten to be able to open one socket for IPv4 and another for IPv6..

@alopatindev
Copy link
Contributor

alopatindev commented Jan 14, 2025

Did you get it to work?

Hm, I rechecked. Turns out it's true: I wasn't able to receive IPv6 packets on the [::ffff:127.0.0.1]:3000 :(

ideally, aquatic should be rewritten to be able to open one socket for IPv4 and another for IPv6

Yeah, I totally agree.

@greatest-ape
Copy link
Owner Author

greatest-ape commented Jan 14, 2025

Did you get it to work?

Hm, I rechecked. Turns out it's true: I wasn't able to receive IPv6 packets on the [::ffff:127.0.0.1]:3000 :(

ideally, aquatic should be rewritten to be able to open one socket for IPv4 and another for IPv6

Yeah, I totally agree.

Ok! Anyway, thanks for bringing it to my attention.

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

Successfully merging this pull request may close these issues.

2 participants