|
|
@ -45,6 +45,8 @@ public class WebSocketConnection : IWebSocketConnection |
|
|
|
} |
|
|
|
|
|
|
|
_logger.LogInformation("正在连接 WebSocket 服务器: {Uri}", uri); |
|
|
|
// 👇 这行:跳过所有证书验证(只用于开发测试)
|
|
|
|
_webSocket.Options.RemoteCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; |
|
|
|
await _webSocket.ConnectAsync(uri, cancellationToken); |
|
|
|
_logger.LogInformation("WebSocket 连接成功"); |
|
|
|
} |
|
|
|