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
localhost address #98
Comments
If you're in a dual-stack environment, yes IPv6 is preferred. I'm not sure I understand your point, if you force IPv4 on the server side, sure you'd better make sure the client also uses IPv4. |
What I am trying to say is that, Yes if it's a dual-stack server, the current client code works. But if the server is listening on IPv4, the client fails to connect to |
You're going to have to be more explicit, I still don't understand the issue.
|
The scenario is that the host has dual stack support, and the server is running locally on the host using endpoint Now run the client locally as well, specifying server endpoint using Now I realize that this is one of the quirks on a dual-stack host, as you said, preferring IPv6 here when resolving the name A side note, looks like |
OK, I see what you mean, it's possible to create a non-working case. I'm not sure how you'd like to see things improved, any suggestions? |
I would suggest that if IPv6 connect fails (refused), fallback to IPv4. More general speaking, connect to the preferred address family first, and if refused, fallback to the 2nd address family (if exists). On MacOS, it seems that
|
Before jumping into this kind of change, could you have a look at the QUIC draft RFC and see if there is a standard behaviour defined for this? |
I looked at QUIC draft 27 and did not find standard behaviors defined for this. There is "preferred_address" frame but it's after the handshake so it's a different thing. |
Is there a way to run the client from browser in mac . It all runs on terminal but I cant connect the sever through browser it says cannot connect to local host. |
It seems that by default
localhost
would be resolved intoipv6
address only (MacOS):aioquic/src/aioquic/asyncio/client.py
Line 62 in 229c0f1
infos[0]
isipv6
info (not dual-stack). Is this intended?This is ok when running the server from this repo as it's binding to ipv6. But it will not work (by default) when connecting to a server that runs on "127.0.0.1:4433" or "0.0.0.0:4433".
The text was updated successfully, but these errors were encountered: