Skip to content
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

[Question] Questions about youtube-trusted-session-generator #11

Closed
ddscentral opened this issue Sep 30, 2024 · 2 comments
Closed

[Question] Questions about youtube-trusted-session-generator #11

ddscentral opened this issue Sep 30, 2024 · 2 comments
Labels
question Further information is requested

Comments

@ddscentral
Copy link

ddscentral commented Sep 30, 2024

Is your enhancement request related to a problem? Please describe.
Issue #4947

Describe the solution you'd like
You have added documentation on how to enable usage of the web client with session keys to Invidious installation instructions. Your solution works well, however, the documentation could use an improvement. For example, there's no mention that youtube-trusted-session-generator session generator tool requires a working X server and Chromium/Chrome browser installed. And no workarounds are provided for running the tool headlessly.

Since the session generator tool requires no user interaction, there's a simple workaround which would enable the session generator to run on headless systems:
install and run an Xvfb server (I run it as a systemd service, but simple shell backgrounding will work too) and set the DISPLAY variable to it's display before running the session generator tool.

One more thing would be useful is to know approximately how often does one need to rotate the session keys.
I wrote an automated tool for my own internal use but not sure how often I should run it.

@ddscentral ddscentral added the enhancement New feature or request label Sep 30, 2024
@unixfox unixfox transferred this issue from iv-org/invidious Sep 30, 2024
@unixfox
Copy link
Member

unixfox commented Sep 30, 2024

Headless doesn't work: #2

Since the session generator tool requires no user interaction, there's a simple workaround which would enable the session generator to run on headless systems:
install and run an Xvfb server (I run it as a systemd service, but simple shell backgrounding will work too) and set the DISPLAY variable to it's display before running the session generator tool.

That's what the Docker version do: https://github.com/iv-org/youtube-trusted-session-generator/blob/master/docker/scripts/startup.sh


One more thing would be useful is to know approximately how often does one need to rotate the session keys.
I wrote an automated tool for my own internal use but not sure how often I should run it.

We don't know either, theoretically it should be valid for long time. So if you are rotating it just do it like every hour. That's why we said:

There is currently no official automatic tool to periodically change these tokens. This is working in progress but, for the time being, this is the solution the Invidious team is offering.
If you want to be less traceable, you can always script the process by changing the identities every X hour.

Taken from https://docs.invidious.io/installation/#docker

image

@unixfox unixfox closed this as completed Sep 30, 2024
@unixfox unixfox added question Further information is requested and removed enhancement New feature or request labels Sep 30, 2024
@unixfox unixfox changed the title [Enhancement] Make documentation regarding youtube-trusted-session-generator more clear [Question] Make documentation regarding youtube-trusted-session-generator more clear Sep 30, 2024
@unixfox unixfox changed the title [Question] Make documentation regarding youtube-trusted-session-generator more clear [Question] Questions about youtube-trusted-session-generator Sep 30, 2024
@ddscentral
Copy link
Author

ddscentral commented Sep 30, 2024

Thanks. Sorry, didn't notice the tool had a Dockerfile.

I said nothing about using Chromium headless mode, didn't even consider using it.
Even though using Xvfb technically isn't "headless", I consider running this tool using Xvfb to be headless as Xvfb is a purely virtual/dummy X server with no output, perfect for running GUI applications where no manual interaction is required.
Since you have a dedicated section in your documentation on how to setup Invidious without Docker, documenting a way to do run this tool on a headless server without Docker would still be useful.

As for token rotation, I will setup my tool to run once a day, hopefully that will be enough.
Rotating every hour seems a bit overkill to me, considering there's no way to update the tokens without restating the Invidious service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants