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

[WIP] Script remote type #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

CGamesPlay
Copy link
Contributor

@CGamesPlay CGamesPlay commented Aug 28, 2023

This is a work in progress and not ready to be merged. I recommend reviewing this PR by each commit rather than the overall "files changed" view. Closes #8.

This PR adds a new type of remote called script, which allows the user to specify a custom shell script to use to start an REH before connecting to it.

Remaining items:

  • Add a listenScript which is a short- or long-running process that is expected to listen on the configured host/port.
  • Add listenScriptReady which is a regex. When the listenScript outputs the regex, it is expected to be ready to accept connections. Note: the listenScript can also cleanly exit, but then Remote OSS cannot shut down the process when disconnecting.
  • Support connectScript which is a script that is expected to directly talk to an REH over stdio (required for environments like devcontainers where port forwards cannot be added ad-hoc).
  • Modify connectionToken behavior: true will cause Remote OSS to autogenerate a connection token instead of prompting, which will be provided to the scripts via an environment variable.
  • Expose some useful environment variables to the scripts: REMOTE_HOST, REMOTE_PORT, REH_VERSION, CONNECTION_TOKEN.
  • Verify that reconnections work in a sane way.
  • Make the connection process cancelable.
  • Document everything and provide an example devcontainer configuration.
  • Add support for custom scripts accessible via command palette (e.g. "restart devcontainer").
  • Investigate running the scripts as a process group so that it isn't just the parent process which gets killed when disconnecting.
  • Remove the "manual" item from the top of the GUI and just put all configured hosts in the root (or allow the user to create a custom hierarchy)

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

Successfully merging this pull request may close these issues.

Add "script" connection type
1 participant