-
Notifications
You must be signed in to change notification settings - Fork 8
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 encrypted query parameters #65
feat: add support for encrypted query parameters #65
Conversation
Why are you encrypting all query parameters, instead of only the ones you consider sensitive? This will break multiple audio track support as well as detecting when the streaming data has expired in 3rd party clients like FreeTube. Then again I doubt most people are using Invidious with FreeTube anymore these days as public instances have the API disabled and it's a lot easier to use FreeTube's local API than self-hosting Invidious. |
You are right. I was only thinking on the Invidious side of things when I was doing it. I'll fix it |
I agree too, "ip", "pot" parameters would have been enough. The rest is OK for anybody to know the value of these parameters. And encrypting everything adds unnecessary load, on top of the fact that just dealing with two parameters would be easier to implement in piped-proxy. |
3c28b02
to
91c849e
Compare
I was also thinking to add a configuration option to insert a list of query parameters that need to be encrypted. Something like this: |
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.
I'd look at using the fact that URLSearchParams objects are just arrays of arrays to avoid a bunch of string appending and handling you're having to do here. It's a lot more fallible than doing everything you need to do with a URLSearchparams object and then calling .toString()
once at the end.
7d60cd4
to
5d427dd
Compare
queryParams.toString() percent-encodes non URL safe characters like '+' and '/' automatically, so there is no need to replace them here. Ref: iv-org#65 (comment)
5d427dd
to
741184a
Compare
I think we can make it evolve in the code instead as more parameters comes out. |
529390c
to
10de73b
Compare
Closes #29
Requires support in Invidious if videoplayback is going to be proxied trough Invidious, but that doesn't make that much sense since companion already does that. Same thing applies to piped-proxy