How to enable the address validation mechanism by default ? #482
-
Hi everyone, is it possible to enable the address validation mechanism when you run aioquic ? From what I understand, it is only enabled when the load is too high. I would like to have it enable all the time for some experiments. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Aioquic calls this "retry" in the asyncio server configuration. If you set retry=True when you create the server, then it will do address validation on all connections. If you are doing I/O some other way, or want fancier controls, then you can look at I have not tried to use the NEW_TOKEN mechanism (address prevalidation for future connections), and I am not aware of an API for this in on the server side, though the client side does have support and it works. (I'm not totally sure about the server side as I'm still learning the code base.) |
Beta Was this translation helpful? Give feedback.
-
Thank you for this QUIC answer ;) |
Beta Was this translation helpful? Give feedback.
Aioquic calls this "retry" in the asyncio server configuration. If you set retry=True when you create the server, then it will do address validation on all connections. If you are doing I/O some other way, or want fancier controls, then you can look at
src/aioquic/asyncio/server.py
for the part startingif self._retry is not None:
to see how it works in more detail. I've used this method in my code and it all works.I have not tried to use the NEW_TOKEN mechanism (address prevalidation for future connections), and I am not aware of an API for this in on the server side, though the client side does have support and it works. (I'm not totally sure about the server side as I'm still learning…