Skip to content

Instantly share code, notes, and snippets.

@richeney
Last active January 22, 2024 05:27
Show Gist options
  • Save richeney/f9661aa50ba5e9d79aa32c070ab67a99 to your computer and use it in GitHub Desktop.
Save richeney/f9661aa50ba5e9d79aa32c070ab67a99 to your computer and use it in GitHub Desktop.
Code Tunnel

Code Tunnels

https://www.azurecitadel.com/arc/servers/access_vms/#code-tunnels

Install & configure on VM

wget https://code.visualstudio.com/sha/download?build=stable\&os=cli-alpine-x64 -O /tmp/code.tar.gz
sudo tar -zxvf /tmp/code.tar.gz -C /usr/local/bin && rm /tmp/code.tar.gz
code tunnel --name $(hostname) --accept-server-license-terms

Install & configure on Cloud Shell

There is no sudo support on Cloud Shell.

wget https://code.visualstudio.com/sha/download?build=stable\&os=cli-alpine-x64 -O /tmp/code.tar.gz
[[ ! -d ~/.local/bin ]] && mkdir -pm 755 ~/.local/bin
tar -zxvf /tmp/code.tar.gz -C ~/.local/bin && rm /tmp/code.tar.gz
mv ~/.local/bin/code ~/.local/bin/vscode
vscode tunnel --name $(hostname | cut -c1-20) --accept-server-license-terms --no-sleep

Nah - seems to error with too many API calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment