tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

Using custom DC address

Open carp3 opened this issue 8 years ago • 5 comments

Steps to reproduce

  1. setup a reverse proxy using nginx location / { proxy_pass http://149.154.175.50/; }

  2. 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 . image

  3. 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. image

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 avatar May 27 '18 06:05 carp3

@carp3 You can use mtproto proxy in the latest alpha version from https://desktop.telegram.org/changelog#alpha-version

john-preston avatar May 27 '18 06:05 john-preston

ok i'll try that. but i still think Telegram should fall back to last working DC after a few attempts...

carp3 avatar May 27 '18 08:05 carp3

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 :)

Lonami avatar Jun 14 '18 11:06 Lonami

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 ...

carp3 avatar Jun 14 '18 12:06 carp3

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.

github-actions[bot] avatar Mar 07 '21 14:03 github-actions[bot]