Is there in some way support for a HTTP Proxy or is it SOCKS only?
https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1_proxy.html
only proxy empty and socks are implemented
doesn't work for HTTP proxies
http gradually fades into the past. But let's wait for the answers of professionals.
Telegram clients usually connect via TCP directly, and HTTP isn鈥檛 used at all.
We use it as our proxy only supports HTTP. The Telegram Desktop client also supports it.
The log tells us this
[ 3][t 4][1522496564.618938208][Td.cpp:3933][!Td][&td_requests] Receive request 3: setProxy {
proxy = proxySocks5 {
server = "proxyserver.eu.localdomain.com"
port = 1080
username = ""
password = ""
}
}
[ 3][t 4][1522496564.618938208][ConfigManager.cpp:448][!Recoverer][&config_recoverer] Failed to connect for 0.002220
[ 3][t 4][1522496564.618938208][ConfigManager.cpp:507][!Recoverer][&config_recoverer] Wakeup in 20.0s
[ 3][t 4][1522496564.618938208][ConfigManager.cpp:342][!Recoverer][&config_recoverer] ON CONNECTING false
[ 3][t 4][1522496564.618938208][ConfigManager.cpp:450][!Recoverer][&config_recoverer] Successfully connected
[ 3][t 4][1522496564.618938208][ConfigManager.cpp:510][!Recoverer][&config_recoverer] Wakeup NEVER
[ 2][t 3][1522496564.618938208][Session.cpp:1079][!HandshakeActor] [Error : 0 : Cancelled : [xxx.xxx.xxx.xxx:443] DcId{1}[0.0.0.0:24285]]
[ 3][t 2][1522496564.619938374][IPAddress.cpp:151][!GetHostByNameActor] Try to init IP address of proxyserver.eu.localdomain.com with port 1080
[ 3][t 4][1522496564.619938374][Td.cpp:4648][!Td][&td_requests] Sending result for request 3: ok {
}
See how it is implemented in Telegram Desktop https://github.com/telegramdesktop/tdesktop
Telegram APIs support HTTP protocol, but this usually considered a fallback whether standard TCP connections can鈥檛 be used, and not all the clients support it: afaik only TDesktop, iOS and Windows Phone apps support it, and only TDesktop offers the possibility to use a HTTP proxy.
So, tl;dr: TDLib doesn鈥檛 support connecting to Telegram servers via HTTP, so you can鈥檛 connect to Telegram servers through an HTTP proxy. If you want to use a proxy, at the moment, you must use a SOCKS5 proxy.
I have no idea if connecting through HTTP will be implemented in the future, but if they鈥檒l implement this they鈥檒l probably allow you to use a HTTP proxy as well.
TDLib doesn't support HTTP proxy at the moment, but setProxy method was designed to easily add HTTP-proxy support in the future. HTTP protocol is also supported by TDLib, so HTTP proxy support wasn't implemented just because it isn't needed by main clients based on TDLib.
Preston is to blame. He wrote too many cycles.
If you're using tdlib with Python on Linux, you can use proxychains to connect through HTTP Proxy
My College Wi-Fi uses HTTP proxy with authentication. I was looking towards Telegram as a WhatsApp alternative but only Telegram UWP supports it currently.
HTTP proxy support was added to TDLib 1.3.0.
Also Telegram X supports http proxy.
Please add support for windows auth session with auto-detect system proxy by kerberos auth proxy. Testing telegram in windows 10 not connect, because not detect kerberos mechanism of authentication.
Thanks.
Most helpful comment
TDLib doesn't support HTTP proxy at the moment, but setProxy method was designed to easily add HTTP-proxy support in the future. HTTP protocol is also supported by TDLib, so HTTP proxy support wasn't implemented just because it isn't needed by main clients based on TDLib.