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

Existence of only_ipv6 is confusing, manging multiple configuration files isn't convenient to just support both protocols #210

Closed
alopatindev opened this issue Oct 14, 2024 · 4 comments

Comments

@alopatindev
Copy link
Contributor

alopatindev commented Oct 14, 2024

Thanks for making this awesome software!

Am I right that running aquatic_ws currently requires two separate configuration files if we want it to bind to both IPv4 and IPv6? That's not convenient, in my opinion.

It's also confusing: if configuration file can only support IPv4 or IPv6 exclusively, then what's the point of only_ipv6 flag? It gives a false hope that turning this flag off will be enough to avoid creating two separate configuration files in this case.

I suppose it's especially confusing to those who aren't willing to read the code or to those who aren't Rust experts who are not aware that SocketAddr can't accept both IPv4 and IPv6 and the same time.

It would be nice if we could have a single configuration file in this case and

  • either run a single instance that binds to both IPv4 and IPv6
    • addresses = ["127.0.0.1:3000", "[::1]:3000"] in config
  • or at least two separate instances with --address 127.0.0.1:3000 and --address [::1]:3000 as arguments.
@zmiguel
Copy link

zmiguel commented Oct 14, 2024

The UDP and HTTP versions support running both ipv4+ipv6 if you define your address as address = "[::0.0.0.0]:port" I haven't used the WS version but did you try this?

@alopatindev
Copy link
Contributor Author

Interesting, this seems to be working for WS version too, thanks.

I'd like to bind specifically to loopback ipv4+ipv6 addresses. Is it possible? Thanks.

@zmiguel
Copy link

zmiguel commented Oct 14, 2024

@alopatindev it's based on rust-lang/rust#85609
Perhaps you can get some extra info from here: rust-lang/rust#69772

::ffff:127.0.0.1 should be v4+v6 loopback address

@alopatindev
Copy link
Contributor Author

Oh, got it, thanks. This works too. I wish that was an example in the readme.

alopatindev added a commit to alopatindev/aquatic that referenced this issue Oct 15, 2024
…multiple configuration files isn't convenient to just support both protocols
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

2 participants