Textualize / textual-web

Run TUIs and terminals in your browser
MIT License
684 stars 17 forks source link

How to add slug for terminal #35

Open TideDra opened 7 months ago

TideDra commented 7 months ago

The URL for terminal seems always randomly generated, even if I add slug in the configuration file like this:

[account]
api_key = "xxxx"

[terminal.Terminal]
slug = "a100server"
name = "a100server"
terminal = true

After I run textual-web --config ganglion.toml, I get a url like "https://textual-web.io/MyAccount/3gu25v1b4t3h", and slug seems not work. I wonder how to get a constant URL for terminal service?

vpmartin commented 3 months ago

As per the Readme,

When you serve a terminal in this way it will generate a random public URL. Warning: Don't share this with anyone you wouldn't trust to have access to your machine.

The reasons seem pretty clear to me.

Even though the graphical interface comes from the textual-web.io website, every single interaction you have on the app, even simply moving the mouse or clicking a button, is routed to your computer.

Serving a Terminal like you do, even if the terminal is displayed using a web browser on a website, it mirrors a regular terminal that would be running on your computer, with the same access that the user that launched the textual-web command has, which probably is root access if you're using a personal computer.

Meaning that anyone knowing your account slug could go to textual-web.io/slug/terminal (or brute force the app name if you didn't choose Terminal), and sudo rm -rf / your computer.