Skip to content

How to enable the address validation mechanism by default ? #482

Answered by rthalley
benjaminteyssier asked this question in Q&A
Discussion options

You must be logged in to vote

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 starting if 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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by benjaminteyssier
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants