Open FossPrime opened 8 months ago
Turns out, a firewall rule is not needed if you use ssh port forwarding, which is built into gcloud and works from Cloud Shell
This prints a link with a proxy by Google Cloud Shell:
gcloud compute ssh "openvscode-server" -- -L 127.0.0.1:3000:[::1]:3000 "openvscode-server | sed 's|://localhost:3000|s://3000-$WEB_HOST|'"
The url is stored in the env var WEB_HOST
, its port 80 by default but can be turned into 3000 by prepending 3000--
Your session will be terminated every hour unless you interact with the shell
https://cloud.google.com/shell/docs/quotas-limits#non-interactive_usage
Instructions were outdated.
Token is now default and server.sh no longer exists.
Would be nice to have a way to generate the real link... with token and IP... but I see no way to do that. Maybe pipe it in sed?