Closed str1py closed 5 years ago
@str1py I have same problem. How did you solve this?
@str1py I have same problem. How did you solve this?
Socks5 have unstable behavior in C# because the same proxy work, and then when i`m try to connect one more time to the same Socks5 it doesnt work. Although proxies are working. I checked in telegram. I desided to use HTTP proxy instead Socks5. Use it like this
HttpProxyClient webProxyClient;
//proxy 1-ip 2-port 3-login 4-pass
if (proxy[3] == "")
webProxyClient = new HttpProxyClient(proxy[1], Int32.Parse(proxy[2]));
else
webProxyClient = new HttpProxyClient(proxy[1], Int32.Parse(proxy[2]), proxy[3], proxy[4]);
try
{
TcpClient client = webProxyClient.CreateConnection(address, port);
return client;
}
catch
{
return null;
}
But before use selected proxy i Ping it and do test connection to telegram.
@str1py
I try HttpProxyClient at https://github.com/meebey/starksoftproxy but not found HttpProxyClient support proxy with username and password.
Can you share with me your HttpProxyClient class support proxy with username and password
I
m trying use proxy in TLSharp like i
m saw in previous essues.So, what i have done
and then
client = new TelegramClient(Properties.Settings.Default.TelegramApiID, Properties.Settings.Default.TelegramApiHash, store, "session", handler: TcpHandler);
But every time with any proxy (socks, http) I have exeption
Im trying starksoft-aspen and starksoftproxy
What am I do wrong?