// _url = wss://test.com:8080/action
// _url = wss//127.0.0.1:8080/action
await _connectCws.ConnectAsync(_uri, _connectCts.Token).ConfigureAwait(false);
If I use the above link it works fine, but if I use the following link it will cause this error
TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_FLAG_NOT_TRUSTED
actually, test.com
is pointing to 127.0.0.1
I set up a websocket server locally by ws of nodejs, and use the certificate created by OpenSSL
I prefer to use IP so I can connect to the server on another device
I tried to add ServicePointManager. SecurityProtocol = SecurityProtocolType. Tls12; ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
, but it don't work