Cysharp / MagicOnion

Unified Realtime/API framework for .NET platform and Unity.
MIT License
3.68k stars 417 forks source link

Question: How can I connect the TLS protocol to the new version (v5.1.8)? #718

Open roman-b-games opened 7 months ago

roman-b-games commented 7 months ago

The last guide was written about 3 years ago and the connection is made using the unsupported MagicOnion.Hosting. Therefore, I can't understand how to do it and whether it's even possible.

Danila24ru commented 6 months ago

@mayuki +1, can't connect to 5.1.8 with GrpcChannelx.ForAddress("https:// ... ") , net standard 2.0 Grpc.Core , unity 2020.3. Grpc.Core.RpcException: 'Status(StatusCode="Unavailable", Detail="failed to connect to all addresses", ...') Server side: traefik + letsEncrypt + ssl termination.

With Net.Client works fine. But we can't upgrade to unity 2021+

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.

07prajwal2000 commented 1 week ago

@mayuki I am getting this Error on client side:

Unhandled exception. Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception. AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch, RemoteCertificateChainErrors", DebugException="System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.")

I am running the in production config in a docker container.

mayuki commented 1 week ago

From the message RemoteCertificateNameMismatch, it appears that there is a problem with the name of the certificate not matching. Try connecting to that port with HttpClient and see if an error occurs.