mtg icon indicating copy to clipboard operation
mtg copied to clipboard

Сascaded proxy setup

Open eastygh opened this issue 8 months ago • 1 comments

I wanted to build a cascaded proxy setup:

mtg → SOCKS5 → VLESS → Freedom

My idea is to run mtg on a server in a country with internet restrictions, with an Xray node on the same host listening on localhost via SOCKS5, and then routing traffic through VLESS to the outside.

So Telegram connects to that IP, and then traffic goes out through VLESS.

I couldn’t find a way to implement this. Am I missing something, or is this not supported?

eastygh avatar Mar 21 '26 15:03 eastygh

The issue has been resolved. I implemented an inbound in a fork of the xray-core project for the MTProto protocol using the mtg library (https://github.com/9seconds/mtg/v2 ), and handled the routing using the built-in rules of xray-core. Thanks.

eastygh avatar Mar 22 '26 17:03 eastygh