streisand icon indicating copy to clipboard operation
streisand copied to clipboard

How to run streisand alongside a mtproto proxy

Open hosnas opened this issue 6 years ago • 4 comments

To unban Telegram censorship in my country, I used the following repo to create a MTProto Proxy server.

https://github.com/FreedomPrevails/JSMTProxy

Then I also wanted to install streisand in the same server, however it made my mtproto proxy unavailable. Is there a way to make both work together just fine?

hosnas avatar Jun 18 '18 23:06 hosnas

This isn't something we can try support right now (especially without the streisand-diagnostics.md :-) , but you're welcome to try to make it work.

My guess is that you need to open up firewall ports. If your proxy needs to receive connections on port 6969, try ufw allow 6969

nopdotcom avatar Jun 19 '18 22:06 nopdotcom

For now Telegram is very polular in some countries. Can we reopen issue?

Sirse avatar Apr 03 '20 15:04 Sirse

OK, I'll reopen. But don't get your hopes too far up yet.

The only thing I think we can automate is:

  1. One of the questions during install is "Which additional ports would you like to leave open?"
  2. When we configure the cloud provider's firewall, we add those ports. (This is why we need to know at install-time.)
  3. When we configure the Streisand instance, we add those ports to ufw.

nopdotcom avatar Apr 03 '20 19:04 nopdotcom

With updated sslh (v1.20-77) we can use their SNI probe to forward MTProto traffic (in FakeTLS mode) via 443 port. Usage of MTProto proxy on non-default ports causes traffic shaping on some Internet provides (e.g. YOTA in Russia).

protocols:
(
     { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; fork: true; log_level: 0; },
     { name: "tls";     host: "localhost"; port: "5682"; sni_hostnames: [ "cloudflare.com" ]; log_level: 0; },
     { name: "tls"; host: "localhost"; port: "443"; log_level: 0; },
     { name: "openvpn"; host: "localhost"; port: "636"; log_level: 0; },
     { name: "anyprot"; host: "localhost"; port: "443"; log_level: 0; }
);

Sirse avatar Apr 13 '20 18:04 Sirse