-
Notifications
You must be signed in to change notification settings - Fork 11
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
AESGCM gateway #65
base: main
Are you sure you want to change the base?
AESGCM gateway #65
Conversation
type Aesgcm struct { | ||
Enabled bool `env:"UP_GATEWAY_AESGCM_ENABLE"` | ||
path string | ||
discovery []byte | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for posterity, this file is practically copied and pasted from generic.go, which has existed in common proxies for a while, just without discovery and without documentation.
@quqkuk no hurry if you're away for the holidays or busy, just wanted to ping you to let you know that I'll merge this if this approach works for you. Or, if there are changes that need to be made for this to work with telegram I can do that too. |
Sorry for not replying earlier, as you thought I have been away for the holidays. |
Sorry for not replying earlier, for the same reason :) @quqkuk: About the transparent proxy, we have already think about it (UnifiedPush/wishlist#15 (comment)), we had some discussion about this topic outside this issue, which doesn't help to follow everything. Basically, this could be a good solution if we were pushing for its adoption, but there are many downsides:
It is technically easy to do an automatic push gateway discovery request, like we have done for matrix (most push providers have a built-in gateway). But I think this gateway (webpush-draft4 -> UnifiedPush) can be useful only with centralized services like Telegram, so having a default one (for instance on unifiedpush.org) which can be manually changed by the user on their application if they want to change it (without an auto discovery request). I am personally not even for a webpush-draft4 gateway because it pushes in the wrong direction, and because the draft allows to do sync-on-push which is also something we recommend. But I'm OK to review my point of view on this. But the transparent proxy has too many downsides to adopt it. @karmanyaahm, if we continue with this gateway, is it possible to use WebPush-Draft4 (or something like this) instead of AESGCM to refer to this gateway ? |
I made the name AESGCM because that's what the Content-Encoding for this is. It's also prettier than WebPushDraft4. |
https://bugs.telegram.org/c/35218
Wait - how? Because the spec doesn't say that the message may be transformed?
I am ok with that, thank you for answering |
👍 We can also say that this protocol can be introduced as the 13th supported protocol, to leave the legacy webpush with aesgcm available to be backward compatible.
Yep, we have to update the discovery request, to add feature discovery (which I wish will never happen). Then we should state that the current spec should be followed when the draft4/aesgcm is not available OR the header
If you're OK, let's see how telegram answer the request first then we may go for it then |
This is an explicit gateway, taking in the URL and using discovery like @p1gp1g suggested. @quqkuk what do you think about this?