Closed FreedomPrevails closed 6 years ago
Why dont you use the standard TLS encryption the same way as HTTPS protocol ? why have you reinvented the wheel ?
Because most of MTProxy related stuff was already implemented in apps. Also, mtproto proxies are distributed through configsimple via dns/domain fronting, so that’s another reason for mtproxy to exist.
However, MTProto has an HTTP based transport component (and HTTPS in webogram), so theoretically making an HTTPS reverse proxy for telegram shouldn’t be that hard either.
I think detection by DPIs could be eliminated if Telegram would use random padding in their obfuscation scheme that's also used in MTProxy. Otherwise it's possible to detect reqPQ packets, for example, they always consist of 105 bytes, so maybe this is the marker and then they analyze these packets deeper (maybe even deobfuscating them). But still lots of respect for Telegram team. I'm sure we'll win as a result.
It could be that your country blocks connectivity based on the size of the first packet. As far as I know, obfuscated OpenVPN (--tls-crypt
option) was blocked in such way in Egypt not so far ago.
Could you please provide pcap (wireshark/tcpdump) file with data exchange between your PC and mtproxy?
Governments are starting to block IPs. They do not check packages like Socks5 at MTProto Proxy. Anyway, I think the decentralized system should be used. Like Tor
Telegram developers should take a look at Snowflake project. This is a WebRTC transport from Tor project, which works both in browser and in standalone client. With Snowflake you can run a proxy server right in any browser (not fully autonomous though, but still).
Snowflake allows to use any user surfing your website as a proxy node. With the website sufficiently huge and popular, we'll get lots of constantly rotating IP addresses. It also works behind NAT.
@FreedomPrevails where can I see the list of blocked addresses? is it publicly available?
@stek29 It is true, but as you know MTProxy adds another layer of encryption on top of MTProto. They could have used TLS instead of this custom AES-256-CTR method with 64 byte random buffer. I dont think there is a shortage of TLS libraries anywhere ! Actually it is very easy to implement. If you want to bypass DPI, you should blend in your traffic. not make it distinct.
@aprosvetova Yeah, it is possible. we dont know how exactly they analyze the traffic and I dont think they are willing to share, we can play with padding and etc. but I think the definitive answer would be to blend in the traffic by using TLS so telegram proxies would look like busy webservers to firewalls.
@seega There are tons of blocked proxies here. for a starter this one : https://t.me/proxy?server=62.210.93.229&port=7272&secret=c53a3eae90544e68a37cbe41c5d31442
@FreedomPrevails This IP has been blocked. And there is currently no problem detecting the packet. This package problem can be solved by updating the telegram
I’ve just contacted an Iranian I can trust, and according to him:
I’ve made a proxy I haven’t shared with anyone else and send it’s credentials to him, waiting for possible block.
However, I still agree that random padding is necessary to make MTProxy harder to detect.
Where i can check my ips for ban in Iran? Like @rkn_block_check_bot for Russian block list or web site.
@stek29
@FreedomPrevails There is currently no DPI equipment in Iran which can detect MTProto's Obfuscated2 protocol. They just keep blocking IPs of publicly spread MTProto proxies. and have even threatened admins of a channel that was providing these proxies to the public. If you keep your proxy private, it won't be blocked.
There are many anti-censorship utilities with non-TLS protocols used in Iran, which get blocked only by IP-blocking and not DPI. A good example of such are Shadowsocks, Obfs4, etc.
@astonished98 If there is no DPI, then explain to me how my personal private mtproto proxy was blocked ? and how have they blocked the openvpn protocol on most ISPs ? it doesnt matter which port or IP you try, if it is openvpn, it wont connect. Let me tell an interesting story, sometime ago I wanted to connect to OPENVPN and it was blocked so I used udp2raw to re-encrypt the packets so DPI cant detect them. first I used the udp2raw AES method and to my disbelief, DPI still blocked the packets ! so I changed the encryption method to XOR and then it worked ! their DPI somehow could detect AES encryption in UDP packets but when I changed it to something as stupid as a simple XOR, it got undetectable. They definitely have some kind of DPI system.
This is blasphemy, kindly stop.
@FreedomPrevails @astonished98 I'm also from Iran and I'm trying to help my friends and the ones around me to circumvent censorship. I had set up lots of different tools over the years to do so and here is my experience:
how have they blocked the openvpn protocol on most ISPs ?
Well, they didn't block OpenVPN. They have blocked ciphers. They use some sort of port:cipher combination, so some ports are allowed to have some ciphers and others not.
Like you, I had a personal OpenVPN server with tls-crypt
enabled. It was fine until few weeks ago, when Telegram started to get blocked in Iran. Initially, like you I thought OpenVPN is done, but after a bit of fiddling with the cipher options, I figured it out and right now both TCP and UDP is working for me.
I had to disable tls-crypt and even tls-auth was hit and miss, but by making it look like normal HTTPS traffic, I was good again.
This is the same for OpenConnect, Shadowsocks, and guess what! best of them is STunnel which is a simple SSL wrapper. I use it as a wrapper for simple HTTP Proxy and over the years, it never failed me.
So I believe anything that makes mtproto distinctive will eventually fail.
There are many anti-censorship utilities with non-TLS protocols used in Iran, which get blocked only by IP-blocking and not DPI. A good example of such are Shadowsocks, Obfs4, etc.
Actually shadowsocks uses tls encryption by "method"
argument.
and obfs4 is blocked by DPI here, as it was blocked before.
@euphoria360 I agree with every word you said. well said bro. by blocking OpenVPN, I exactly meant blocking ciphers. it is impossible to detect ciphers without DPI. I would appreciate if you send me your OpenVPN secret sauce to this email: freedomp@trashmail.ws I definitely can use it ;)
@FreedomPrevails Sure.
One note I need to mention: For your servers, if you can't use port 443, use common ports that have SSL/TLS enabled on them, like IMAP/POP3/SMTP ... . Ports like 8888 or 8080 are more probable to get flagged.
@astonished98
They just keep blocking IPs of publicly spread MTProto proxies. and have even threatened admins of a channel that was providing these proxies to the public.
It's possible they can find admins of channels?
@astonished98 not directly from the bot or proxy.
Lots of admin channels are lousy and they usually give out some info when ads are involved.
Also when you setup a proxy, you publish a public IP which can be traced fairly easily for a government.
So, 5 days later, proxy from https://github.com/TelegramMessenger/MTProxy/issues/35#issuecomment-393772804 is still working fine. I'm still sure that Iranian govt just monitors public channels/groups where people can find proxies and blocks them this way.
The next logical step is creating govt honeypots ;)
@stek29 I will create another personal proxy and test it again.
I think if Telegram use https protocol or QUIC(chrome browser protocol ) like Cisco any connect, UTM can't find and ban it. Most of IP's MTproto proxy server banned. but my ocserv servers (Cisco any connect server) can work well for some years. Can you use QUIC or not ? Is it possible ?
We need to find a centralized method for blocking government IPs. As soon as the scan starts, its IP will be blocked and all servers will be immediately secured against this IP.
_"There is a simple way to make proxies unbannable! register your domain from Cloudflare , then add a record of your subdomain to your server from Cloudflare panel :) in this way, no one can find your real server IP address."_
@farahaniamir08 I've tried this too and it's not possible. As stek said, cloudflare caches requests and messes up with proxying. Currently, it seems there is no way to hide your ip.
my private proxy ip blocked today. i am from iran. i did not publish my proxy ip. i can still telnet ip but its not my server and when i surf it by browser it shows service unavailable message.
Where did you get your VPS from!?
hetzner
From an Iranian reseller!?
no, I have 3 dedicated servers in hetzner datacenter, I setup nodejs mtproto on one of them for personal use but yesterday my ip blocked. I should order a new ip address now.
My question was, how did you rent those Hetzner servers? Did you directly buy the service from Hetzner website or was there a reseller getting your Rial and buying the server for you?
I Directly buy service from Hetzner website, My server ip address is ----- (removed),
Did you try connecting to the server from other sources, like different ISP's?
Yes, in HamrahAval and irancell and Respina ISP, my ip is blocked,
MTProto proxy is a failed project. I warned Telegram about this happening. all of personal proxies are being detected and blocked.
@websaz2000
First, Remove IP from here.
Second, use the prefix dd
for the secret and don't use the old version (nodejs).
Update: Your IP is accessible from the Mazandaran ISPs.
my secret was 1234, using dd prefix for secret solves the problem?
My server's IP got blocked because of using mtproto. I disabled the service and after about 10 days my server is not blocked anymore!
@ray-pixar All users used the "dd" prefix?
@ray-pixar I am using it with dd prefix privately and server has not been blocked.
hey guys, any new suggestion to make mtproto proxies live longer? im new to making mtproto, i want to make it live atleast for 2 weeks, i've started with domains and dd prefix, what more can i do?
@kooran ,well, my personal Mtproto proxy server is live and working for more than 6 month. And I don't see any reason for it not to last longer.
And I've happily helped lots of friends and family to circumvent censorship.
My server is simple and there is nothing special about it, except secrecy. You should try your best to not expose it to wrong eyes. I specifically ask everyone using my server to not share it with anyone.
Thats it.
@euphoria360 thanks, actually i do have a private server and it's working fine , but im working on another server to make public proxies, and i want to make it last longer, my first published proxy got blocked after just 24 hours! i need to make it live longer, not 6 months! but atleast a week, ive seen few public proxies those are working good for a month now! i wonder, whats the secret?
@kooran I think they are monitoring telegram proxy channels using some bots and automatically block the proxies that are published. if you use the dd secret, your proxy will live privately forever. the public proxies that live long use a domain name and change their IP everyday. I think thats the secret.
@kooran, in that case, there is not much you can do with your server to make it resilient!
Its all IP and DNS! You can change them but its a cat and mouse game. same as what happened to all free VPN services out there.
Iran already has DNS poisoning in place, and IP blocking is very common too.
One good option would be the ability to hide our servers behind CDN's such as cloudflare, but unfortunately Mtproto doesn't support this.
@FreedomPrevails @euphoria360 im trying to do that as well, playin with IP and DNS! but what would happen if i purchase a server from iran, install mtproto on it, then tunnel it to another server in Germany, when PPTP and L2TP VPN's was blocked in iran, we reopened it this way, does this make it harder for gov to block proxies? (in mtproto case, it will be only one ip (iran server) that connects to mtproto, and all other clients are connecting to a server from iran)
@kooran, It doesn't matter how you would route your connection, when you choose an Iranian server as your clients public end point, You will shoot yourself in the foot!
Not only your Iranian Service provider will ban you, but also will have your registration documents and bank info available for the authorities, in case they need to find you.
@euphoria360 good point! but there has to be a way, there always is!
I am the dev of JSMTProxy : https://github.com/FreedomPrevails/JSMTProxy
As I had guessed it before, Iran's DPI filtering equipment has detected this custom encryption method of MTProto Proxy protocol and they have started to ban the proxy IPs. It is is the end of MTProto Proxy in Iran. I am pretty sure they are doing it automatically. I had an unpublished proxy running on a server which I was not even using it ! but it was blocked ! may be the telegram client has pinged it in the background. Why dont you use the standard TLS encryption the same way as HTTPS protocol ? why have you reinvented the wheel ? you need to make the traffic indistinguishable from white listed traffic, not make it different ! yes, current implementation is secure, but it can be detected ! we need something secure and undetectable !
PLEASE CHANGE THE ENCRYPTION TO TLS. PLEASE UPVOTE THIS FOR VISIBILITY.