-
Notifications
You must be signed in to change notification settings - Fork 132
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
[FEAT]: add support for WebSocket transports #78
Comments
This one can be assigned to me, I'll try to implement it. But I haven't dug the transport layer code of this project yet. I'm not sure if there will be any difficulties. So it may take some time. |
@aofei yeah, it's great idea, connect to telegram via websockets can improve stability of connection (i hope at least). I'll try to implement uris firstly (one way or another, this stuff must be placed in this package) and make test stand for protocol 👍 👍 👍 👍 |
@aofei i've created separate package for transport stuff (like transport modes, transport platforms etc), try to push this changes today, but i made only tcp platform, we need to create somehow websocket platform as well. |
Sorry, I couldn't find the "transport" package you mentioned. Hasn't it been made public yet? |
@aofei yeah, still working and testing. Unfortunately, i got a lot of work on these days 😩 |
@aofei added experimental transport directly to main branch (cuz why not), see latest commits It's required to cover multiple tests, cause, you know, poor tests better than no tests 🙃 Currently it's not integrated in main mtproto struct because i'm not sure that it doesn't break anything, but i alreday tested new transports, and they seems working well. But, again, i'm not sure and we need to test them. |
new transport package now is using in the main mtproto structure since this commit 🎉🎉🎉🎉 I'll still working on websockets implementation (@aofei your help still can be very helpful), but actualy i hope that this new package already has pretty stable and flexible api. Also, looks like we fixed #49 issue, now, even with high load of requests id didn't see any panic by bad seqno 🤔 but needs more tests |
Unfortunately, i must close this feature request, cause websockets transport is overcomplicated and obfuscated as well as documentation is. I was experimenting with connection through websockets since april, and still no any positive movement. Mtproto architecture is too sucks. When we will get official telegram developers support, i promise we will come back to this feature, for me it looks pretty tasty and useful too as for you. But currently it's too hard to implement. |
Is your feature request related to a problem? Please describe.
I think if this project can support MTProto connection over WebSocket, it'll be able to solve the blocking problem of some ISPs.
Describe the solution you'd like
For API, maybe we can add a field like
WSEndpoint
(an HTTP URL string) to themtproto.Config
. If bothServerHost
andWSEndpoint
have values,WSEndpoint
takes precedence.Describe alternatives you've considered
N/A
Additional context
https://core.telegram.org/mtproto/transports#websocket
https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation
The text was updated successfully, but these errors were encountered: