grammers icon indicating copy to clipboard operation
grammers copied to clipboard

Grammers-client socks5 proxy feature request

Open niuhuan opened this issue 3 years ago • 3 comments

My country does not allow me to directly access telegram server.

Even though it can be deployed to servers in other countries, there are still problems in the development process

I want to use Socks5 or HTTP proxy to access the server

niuhuan avatar Aug 02 '22 09:08 niuhuan

I am personally not interested in dealing with proxies. It might be easier to set a system-wide proxy. If however you are willing to contribute support for them (and the code is reasonably simple to maintain), I will happily merge such a feature.

Lonami avatar Aug 02 '22 19:08 Lonami

I'm so sorry because I'm a novice in rust.

I tried proxychans, set environments, set tl::functions::InitConnection proxy field, but cannot use proxy both.

Can you say outline the way to implement the proxy?

And thanks.

niuhuan avatar Aug 03 '22 00:08 niuhuan

To be fair, I have no idea what the proxy field of InitConnection does. This was a latter addition from Telegram. From what I remember when I merged proxy support in Telethon, all that was done was add a dependency on a library capable of connecting through SOCKS5 proxies. I'm assuming we would need to find something similar in crates.io and use that in the grammers-mtsender lib.

Lonami avatar Aug 03 '22 08:08 Lonami