mtprotoproxy icon indicating copy to clipboard operation
mtprotoproxy copied to clipboard

Can't upload images/videos in certain ISP's. others work perfectly

Open masoudelete opened this issue 5 years ago • 19 comments

I'm using the digital ocean server located in Germany, Ubuntu and my clients are in Iran.

everything works perfectly on all devices and different telegram apps

but 2 ISP's somehow can block uploading images and videos. the ISP's are (Irancell and Mobinnet)

I have the same issue with official telegram MTproxy and I created an issue there but I prefer using alexbers

masoudelete avatar May 16 '19 07:05 masoudelete

I had that problem I could not upload image | video | voice in some ISPs i some part of tehran. I changed my server and got another one and another domain valla! problem solved!

erfantkerfan avatar May 16 '19 08:05 erfantkerfan

I have tried what you suggest but it didn't work

masoudelete avatar May 16 '19 10:05 masoudelete

I tried to fix the possible reason in https://github.com/alexbers/mtprotoproxy/commit/422c40948039adb71e8fc006b0925ed1bd394ba5.

Please try to use the latest proxy version from master branch.

alexbers avatar May 16 '19 19:05 alexbers

Just don't use ports like 443, 8080 and etc!

Mahyar24 avatar May 16 '19 19:05 Mahyar24

@alexbers I've just tested the new master branch, the problem still exists.

I think some ISP's found a way to detect and block non-text MTProto packets

*UPDATE: I'm losing the ability to download and upload media in other ISP's (Hamrah aval) too. (text works fine)

masoudelete avatar May 16 '19 21:05 masoudelete

Are you using the proxy with advertising?

If not, please try to enable advertising (uncomment AD_TAG line in config.py). If yes, please try to disable it.

alexbers avatar May 16 '19 21:05 alexbers

when commenting AD_TAG out: I couldn't download and upload images in all ISP's I could try

when using AD_TAG: I could Upload and download media in one ISP, I couldn't upload images in 2 other ISP's

masoudelete avatar May 17 '19 10:05 masoudelete

may be the problem with media servers access

could you try to change the line in the mtprotoproxy.py:

addr, port = random.choice(TG_MIDDLE_PROXIES_V4[dc_idx])

with

addr, port = random.choice(TG_MIDDLE_PROXIES_V4[abs(dc_idx)])

and repeat the test with AD_TAG enabled

alexbers avatar May 17 '19 12:05 alexbers

I have tried what you suggested with and without AD_TAG, it didn't make any difference. consider that I have the same problem with the official telegram mtproto

masoudelete avatar May 17 '19 12:05 masoudelete

change your port dont use popular ports like 443

use random ports like 4731

GoldenOne1 avatar May 17 '19 19:05 GoldenOne1

I tried bunch of random ports, none of them made any difference. besides all of the good proxies I've seen used common ports like 443 and 80

masoudelete avatar May 18 '19 04:05 masoudelete

Im from iran and i use this without problem (Windows Server 2008)

Tested on Irancell , Hamrah Avval , Asiatech without any upload and download problem

GoldenOne1 avatar May 18 '19 10:05 GoldenOne1

@ea1234567 thank you for assisting me

I have a digitalocean server with ubuntu in Germany, can this problem be about my VPS provider or my OS?

what's your VPS and where is it located?

masoudelete avatar May 18 '19 11:05 masoudelete

My vps location is Hetzner Germany and everything is ok,Windows 2008 and Python 3.6.5

I had ovh france but that wasnt compatible with telegram mtproto and i had many disconnection

And i had problem with cloud vps too,dont buy cloud vps

GoldenOne1 avatar May 18 '19 11:05 GoldenOne1

Hello I live in Iran too. I bought my server from virmach and in ParsOnline, Mobin Net, Irancell TD-LTE, and mobile operators are working fine and I can upload and download. My server datacenter is Eonix.

HirbodBehnam avatar May 19 '19 03:05 HirbodBehnam

Does anybody else have a problem with DigitalOcean Droplets?

Can it be because I'm using cloud VPS?

  • Also Socks5 doesn't work either

masoudelete avatar May 19 '19 10:05 masoudelete

Yes, dear friend, I have a similar problem. Unfortunately, DigitalOcean, Vultr and other American datacenters have this problem. It seems that in Iran bandwidth on the IP of these data centers is limited. Apparently, in the way of new blocking, IPs are on the blacklist, and after the blocking period, the bandwidth restrictions on them will continue to be active. As time passes, the IPs will suffer from bandwidth one after the other, and it seems unfortunately that MTProto will fail if no new update comes out.

m8603164 avatar May 24 '19 20:05 m8603164

Hetzner Germany is best for mtproto (in iran)

GoldenOne1 avatar May 24 '19 22:05 GoldenOne1

Yes, I agree, but in the past. The number of Hetzner locations is very limited and most of its IPs are blocked in Iran, and some of them are blacklisted, so that they can not be used on the X telegram and desktop telegram.

m8603164 avatar May 24 '19 22:05 m8603164