Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MTPROTO-over-TCP for HTTP proxy #28808

Open
Fangliding opened this issue Dec 28, 2024 · 3 comments
Open

Use MTPROTO-over-TCP for HTTP proxy #28808

Fangliding opened this issue Dec 28, 2024 · 3 comments

Comments

@Fangliding
Copy link

Fangliding commented Dec 28, 2024

Is your feature request related to a problem?

I think this is indeed a problem

Describe the solution you'd like

When using HTTP proxy in tdesktop, it only attempts to send data using the plain HTTP method (POST), which generates a huge number of connections (approximately several per second) that are not friendly to many proxies
But when using socks, it will only open a few TCP relays normally and transmit within them
HTTP proxy also supports direct relay of TCP (using CONNECT method), which can improve the efficiency of the proxy

Describe alternatives you've considered

The solution is very obvious, there is no alternatives :)

Additional context

I have read the mtp protocol and I think the HTTP transport is designed to adapt to the browser's request/response HTTP model, which is unnecessary on tdesktop

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Dec 29, 2024

http/socks proxy support is done by qt, not tdesktop

@Fangliding
Copy link
Author

http/socks proxy support is done by qt, not tdesktop

I think the problem is here

const auto useTcp = (proxyType != ProxyData::Type::Http);

It disabled TCP when using HTTP proxy

@ilya-fedin
Copy link
Contributor

Can you rephrase the title as "Use MTPROTO-over-TCP for HTTP proxy"?

@Aokromes Aokromes reopened this Dec 29, 2024
@Fangliding Fangliding changed the title Support CONNECT method for HTTP proxy Use MTPROTO-over-TCP for HTTP proxy Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@Aokromes @ilya-fedin @Fangliding and others