MihaZupan / HttpToSocks5Proxy

C# Http to Socks5 proxy implementation
227 stars 37 forks source link

Does anybody have the same problem? "Could not create SSL/TLS secure channel" #14

Closed davydovpn87 closed 4 years ago

davydovpn87 commented 4 years ago

I'm using HttpToSocks5Proxy with TelegramBotClient. A day ago I got an "Could not create SSL/TLS secure channel" error. My code used to sent messages, but now it don't.

I found out that, due to Telegram disabling everything older than TLS v1.2 (which is not used as the default in .NET Framework 4.5 and earlier) https://github.com/TelegramBots/Telegram.Bot/issues/867 https://github.com/TelegramBots/Telegram.Bot/issues/869

I tried all the proposed solutions in the tickets above, but nothing helped. I tried to add line above to HttpToSocks5Proxy.cs, but it didn't work for me System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

Any ideas how to fix the problem? Thank you in advance!

davydovpn87 commented 4 years ago

Fix in TelegramBots/Telegram.Bot#869 worked for me