Using custom DC address
Steps to reproduce
-
setup a reverse proxy using nginx
location / { proxy_pass http://149.154.175.50/; } -
Edit tdesktop.exe using a hex editor and replace default DC addresses with your server's address. currently built-in DCs are 149.154.175.50 , 149.154.167.51 , 149.154.175.100 , 149.154.167.91 and 149.154.171.5 .

-
run telegram.exe
Expected behaviour
tdesktop should connect to DC and works normally.
Actual behaviour
tdesktop query builtin DCs for new address and connect to them. but when connection fails (it's blocked). it doesn't fall back to original DC.

Configuration
Operating system: Win10 x64 Version of Telegram Desktop: 1.2.17
it would be nice if there was a way to set a custom DC address in setting window. as you may know. in Iran, they DPI and because of that, socks proxy no longer works. so this might be a great alternative to socks proxy .
@carp3 You can use mtproto proxy in the latest alpha version from https://desktop.telegram.org/changelog#alpha-version
ok i'll try that. but i still think Telegram should fall back to last working DC after a few attempts...
This is such a weird issue to keep open, you're patching the binary to connect to your own servers but complain when that doesn't work and how it should fallback to original ones. "Falling back to original ones" is not a situation that can occur on non-patched clients, and you really should just rely on using proxies instead patching binaries. Or better, patch the C++ code and submit a PR :)
I meant it should fall back to last known working DC instead of trying to connect to new DC indefinitely, it can happen in non-patched clients too, for example TD connects to DC1(built in) and get list of new DCs , if somehow new DCs aren't working shouldn't TD fall back to DC1 ?
BTW, with MTProto Proxy this method of proxing is not necessary any more ...
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.