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

Add Happy Eyeballs to our HttpClient #1186

Closed
KazWolfe opened this issue Apr 20, 2023 · 3 comments · Fixed by #1187
Closed

Add Happy Eyeballs to our HttpClient #1186

KazWolfe opened this issue Apr 20, 2023 · 3 comments · Fixed by #1187
Assignees
Labels
enhancement New feature or request

Comments

@KazWolfe
Copy link
Member

The Discord has recently been absolutely flooded by users experiencing issues connecting to Kamori and other sites that use IPv6. Generally, this is caused by local ISP hiccups or other problems where a user's IPv6 connection is unstable. Our typical solution has been to tell users to enable a VPN or disable IPv6 entirely, neither of which are particularly good solutions, especially as browsers don't have this problem. Enter: Happy Eyeballs.

While it would really be better for Microsoft to do this for everyone and everything, it may make sense for us to just do it ourselves for now. Osu! has an implementation that we can look at borrowing as well.

The scope of this Issue is to ensure that Happy Eyeballs isn't already available in .NET (and just needs us to pass an argument somewhere), and if not, to borrow Osu's implementation (and others) for our own use case.

@KazWolfe KazWolfe added the enhancement New feature or request label Apr 20, 2023
@KazWolfe KazWolfe self-assigned this Apr 20, 2023
@KazWolfe
Copy link
Member Author

KazWolfe commented Apr 20, 2023

TBD:

  • Can we (should we?) create our own HttpClient that plugins can consume so that they, too, can enjoy Happy Eyeballs without copying a lot of unnecessary work?
  • Can we expand on this to retry with alternate DNS resolutions if the first one we get fails?

The above-linked issue in the dotnet repo is probably a great place to start.

@kalilistic
Copy link
Contributor

For plugins using it, usually I set a defined timeout and default request headers. Might not work as well for a shared instance, but maybe could set those at the request level. Or the wrapper could handle it.

@goaaats
Copy link
Member

goaaats commented Apr 20, 2023

We should either have it as a service or patch this behavior in with monomod by default. Probably the former, then reevaluate. If plugins want this they should switch to the service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants