tdl icon indicating copy to clipboard operation
tdl copied to clipboard

It has been observed that telegram will limit the speed of unofficial clients.

Open fengguowudi opened this issue 3 years ago • 9 comments

I can reach 100mbps when downloading using the official client. But only with 32 threads can you use tdl to access 100mbps.

I suggest that you can impersonate the official client on api_id & hash and device type. Https://core.telegram.org/method/initConnection

If you've already done a simulation, just forget it.(

fengguowudi avatar Nov 03 '22 14:11 fengguowudi

image

At the same time, I found that after using several large files under a non-member account, the tg server seems to have started to limit speed in the cloud.

image

fengguowudi avatar Nov 03 '22 14:11 fengguowudi

Thanks for the feedback!

  1. The current code uses the test APP_ID&APP_HASH of the official desktop client(id=17349). I tried to use the real official APP with id=2040 and it didn't work for the download speed.

  2. Device identification is not currently doing simulations, but after I tried to do simulations, it didn't work either.

  3. The download speed limit seems to be by channel/group, not by account.

iyear avatar Nov 04 '22 02:11 iyear

I don't have a premium account, so I can't test the effect of a premium account.

iyear avatar Nov 04 '22 02:11 iyear

I will replace AppDesktop with the real official desktop client ID and it will not cause a breaking update. But how much effect it will have, I don't know

iyear avatar Nov 04 '22 02:11 iyear

Telegram Android has a cloud-controlled parameter getfile_experimental_params, which is used to adjust the chunk size and max requests when downloading files. The parameter used when it is true can significantly improve the download speed, but the server is only set to true for the official client, and buying premium is not enough, so the third-party client downloads at a slow speed...

After the change, downloading too fast may trigger FLOOD_WAIT to prevent downloading.

The above information is quoted from https://t.me/zuragram/722, I'm not sure if this helps.

By the way, you can consider buying premium through the Turkish area, about $0.8 a month.

KoriIku avatar Dec 06 '22 13:12 KoriIku

@KoriIku Thanks. I had read this message before.

What tdl currently does: import official desktop client session and use official client APP_ID & APP_HASH

iyear avatar Dec 06 '22 14:12 iyear

@fengguowudi @KoriIku I have released a new version that may solve this problem. Feel free to try it out.

https://github.com/iyear/tdl/releases/tag/v0.6.0-beta

iyear avatar Dec 22 '22 10:12 iyear

Unfortunately v0.6.0-beta didn't help. I have telegram premium, and tdl logged with existing official desktop clients.

Settings of threads, part size and concurrent tasks is default: .\tdl.exe -n thprem dl -f .\tdl-export.json --skip-same

tdlspeed

hitslab avatar Dec 28 '22 13:12 hitslab

@hitslab Try larger threads, part-size.

Default values are consistent with the official client to reduce the risk of blocking.

Downloading across DCs can be significantly slower than downloading from the same DC

iyear avatar Dec 31 '22 07:12 iyear