Add support for encrypted query parameters #5381
Open
+69
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
May close #2142
Encrypts sensitive query parameters that should be hidden to users like
ip
andpot
using thehmac_key
config option.Taken from iv-org/invidious-companion#65
There is some problems with this current implementation:
hmac_key
config option needs to be at least 16 characters, if we force it, that will break some setups on a new update. I have thought of 3 ways to fix this:hmac_key
for theecb_without_salt
function until it has 16 (which is the minimum required for AES) if it's less than 16invidious_companion_key
invidious_companion_key
but to encrypt the video query parameters.Proxy videos
player preferences (Like I did here: https://git.nadeko.net/Fijxu/invidious/commit/7c9f79e1f146c59370bbe5e7abe82d37ec5fd5de). This will depend of the instance maintainer operator since proxying every video will use a lot of bandwidth, specially on public instancesSince Invidious companion will be become the official way to fetch youtube videos and videoplayback proxying, this may not be very useful on the future since companion is already able to encrypt the
ip
andpot
query parameters, but will work for old setups that are still usinginv_sig_helper
for whatever reason (low memory capacity for example, since Invidious companion uses way more memory thaninv_sig_helper
)