Closed jornane closed 2 years ago
The Windows client is using .NET Framework 4.5 for HTTPS (System.Net.WebRequest
class). It is like this:
To implement the Happy eyeballs, we'd need something more sophisticated. Like this:
So, basically, we'd need to implement the complete stack from TCP/IP up anew. Maybe there's a C library for an HTTP client we can compile with MSVC (curl, wget) and provide a managed class wrappers, so it can be used from C#?
Or, wait for Microsoft to implement this in a more recent .NET Framework. Which might take decades.
I found this while searching for ways to incorporate curl in a C# project
https://stackoverflow.com/questions/7929013/making-a-curl-call-in-c-sharp
I see you use HttpWebRequest
, I use WebClient
in another project. Your first illustration captures both of these very well. But HttpClient
(can use WinHttpHandler
) looks promising. I'll check it out a bit myself, and I'll report back here if it looks more like the second illustration.
This would be possible when we switch to Go shared code, just like #158 would be tackled by this.
Happy eyeballs is an algorithm to make dual stack work better. Our eduVPN servers are dual stack, and if someone has bad working IPv6, or IPv6 at the server works bad, the discovery and retrieval of tokens will error out randomly.
Related to this, we should also check if the client handles DNS roundrobin correctly, given that we want to use this for the discovery CDN.