-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] Add decryption of the sig parameter for bypassing throttling #4649
Comments
Worth mentioning https://github.com/LuanRT/Jinter used in https://github.com/LuanRT/YouTube.js Because it implements ONLY what the decipher function needs (string, arrays, and Math.*) there's no risk with RCE (at least not that I can see). It can't read from disk, read env vars or make network requests, because the functionality doesn't exist. I find it an interesting approach Edit: I guess similar to youtube-dl's interpreter |
Another option could be: https://bun.sh/ |
For C bindings there is https://github.com/jessedoyle/duktape.cr |
Either of those is something I'd prefer, yep. And the more we can contain it, the better. We don't know what kind of API Youtube will use in the future.
Not an option, imo. This would have to run a lot of times for each request. |
What would be the security issue when running untrusted code in an embedded JS interpreter like Duktape or QuickJS? None of this is possible with these embedded interpreters and they would be the fastest and most lightweight solution. |
That's a good question! I have not looked at any of those yet, so I don't know their strengths and weaknesses. Though, whatever the selected solution, I'd greatly prefer for it to be in a separate process, at least to benefit from running on a separate thread than invidious. |
I'm making a helper for Invidious in C, It will use QuickJS and do the following:
In case of a RCE, syscalls can be isolated by the kernel using |
Did you try duktape? It allows for compatibility with C and Javascript and there is less drag than using v8. It might be just what you guys were looking for. |
Check out what I'm making (switched to Rust after some talk with SamantazFox): https://github.com/techmetx11/inv_sig_helper |
Yes already said in #4649 (comment) And PR #2222 was implemented with duktape. |
My program is done (along with the protocol documentation in README), all that's needed is writing some interface code in Invidious |
Thanks a lot for your work! I'll try to check it (and try it) out soon! |
Currently we do not support fetching the streams using WEB client because by default the stream is too slow. So we are only relying on the ANDROID client. But recently the ANDROID client has started to be blocked from youtube unless you pass "droidguard" challenge: #4584
This issue is to discuss how to implement the decryption of the sig parameter in order to avoid throttling.
An atempt was done back in #2222 but was closed due to potential issues around missing isolation when executing untrusted JavaScript code from YouTube.
So there are other solutions:
More ressources:
The text was updated successfully, but these errors were encountered: