billchurch / webssh2

Web SSH Client using ssh2, socket.io, xterm.js, and express. webssh webssh2
MIT License
2.36k stars 536 forks source link

feat: Allow setting environment variables from the URL #371

Open billchurch opened 2 months ago

billchurch commented 2 months ago

via @israel-tsadok-silk from https://github.com/billchurch/webssh2/issues/368

Allow setting environment variables from the URL. I would like to be able to create a link that would open a session and (for example) immediately open vim on some file. I think the best way to implement this is to allow a URL like /ssh/host?env=VIM_FILE:somefile.config and then use that env var in .bashrc to decide what to do.