TelegramMessenger / MTProxy

4.99k stars 829 forks source link

How to prevent filtering? #265

Open ghazdir34 opened 5 years ago

ghazdir34 commented 5 years ago

I found a mtproto server in public channel but this server has not been filtered in the last two months I got the ping from the IP of this server, and it had a fixed IP during these two months so they dont change ip!! When I opened the IP in the browser, I saw a company logo that was active in the field of vpn this company:draytek.com

this server ip is blocked in iran but work mtproto in iran

What did you think these did?

HirbodBehnam commented 5 years ago

Hello Before we begin, let’s inspect how the MTProto-Proxy blocking mechanism work in Iran. My guess is they have some bots that randomly search channels for proxies. If they found one, they attempt to block its IP; So if you want a private proxy you do not need to setup any anti-blocking system on your server. There is actually 3 ways (as far as I know) to make your server block resistant (in Iran):

1. Tunnel through a local server in Iran You can use a server in Iran to route all traffic to your main server in other countries. Iran cannot block servers that are located in Iran. I have also written a small tutorial on it. See here (Try with VPN) Advantages:

Disadvantages:

2. Changing the IP You can change your server IP continuously. Make sure you use Domain Name. For example change your IP once per 5 hours and update your domain's IP with your new IP Advantages:

Disadvantages:

3. Cloudflare reverse proxy You can hide your server behind Cloudflare servers. Personally I have not seen a lot of proxies using this method. Advantages:

Disadvantages:

ghazdir34 commented 5 years ago

Thank you for your answer @HirbodBehnam But I think there are other ways Can you detect a proxy by which method of filter escapes? I'm monitoring a mtproto proxy for a few months: server=victoria.dynu.net&port=8080&secret=00000000000000000000000000000000 The ip for this sub domain (victoria.dynu.net) has been blocked, but proxy works in Iran

HirbodBehnam commented 5 years ago

Hello I can access the server, see here. Also I will have an eye on this domain.

euphoria360 commented 5 years ago

@Hirbodbehnam At first I was thinking your way. but after 2 subsequent blocking of my personal server (the 2nd time I was the only one who could access it, ip, domain, port and secret were all changed) not anymore.

I had my new second server for only 1 day until it got banned again.

There is probably an IPS/active probing filtering inplace.

euphoria360 commented 5 years ago

@ghazdir34. It seems dynu.net is a DDNS service. Are you sure IP address of victoria.dynu.net has not been changed?

Also maybe choosing secret of all zero allows MITM?

HirbodBehnam commented 5 years ago

@euphoria360 Hello Sorry for your server. I actually have had a server for 7 months and It's fine. I've also shared it with about 4 other people and It's still fine. What's your ISP?

Erixcode commented 4 years ago

@HirbodBehnam maybe this is old but i've heard of White/Black list method. Idk how to configure! have you tried this?

HirbodBehnam commented 4 years ago

Hello I do not use mtprotoproxy any more. I've heard that some, whitelist only specific ISPs etc. But no I haven't.

yiiman-dev commented 4 years ago

i can help you for white your ip just call me for more information for free help

alihosseini07 commented 3 years ago

Hello I can access the server, see here. Also I will have an eye on this domain.

Please give me I'd telegram