Our great sponsors
-
CoreFX
Discontinued This repo is used for servicing PR's for .NET Core 2.1 and 3.1. Please visit us at https://github.com/dotnet/runtime
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
mostly-harmless
A bag of various unrelated projects with varying levels of serviceability and destructiveness.
https://github.com/dotnet/corefx/pull/28278
Sniffing the SNI from the underlying TCP connection is the proper way to do this.
a couple examples I know of(only know go ones of the top of my head):
https://github.com/fabiolb/fabio/blob/master/proxy/tcp/tls_c...
https://github.com/FiloSottile/mostly-harmless/blob/main/tal...
> I don't like doing that but the only other way is to "roll my own crypto" which I understand is a bad thing.
You're would not be rolling your own cryptographic primitive, or combining existing ones in strange and speculative ways. This is what most people, most of the time mean when they admonish against rolling your own crypto.
All you'd have to do is parse the ClientHello to retrieve the SNI. you're in a memory safe language, so parsing bugs result in a crash, not a buffer overflow. I'd say you're on pretty firm ground.
Related posts
- Can anyone help with this exception i'm getting on entering the astronaut complex?
- Is there a way to check if every value in an array is set to the same value?
- C# Coding Standards
- Is the expandoobject implemented in C# and is it possible to define custom member access operator logic?
- Solution Structure