Skip to content

docs: add port-forwarding #5979

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

Merged
merged 6 commits into from
Jan 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

- [Expose code-server](#expose-code-server)
- [Port forwarding via SSH](#port-forwarding-via-ssh)
- [Port forwarding via code-server's built-in proxy](#port-forwarding-via-code-servers-built-in-proxy)
- [Using Let's Encrypt with Caddy](#using-lets-encrypt-with-caddy)
- [Using Let's Encrypt with NGINX](#using-lets-encrypt-with-nginx)
- [Using a self-signed certificate](#using-a-self-signed-certificate)
Expand Down Expand Up @@ -112,6 +113,18 @@ we recommend using another method, such as [Let's Encrypt](#let-encrypt) instead
> [GPG agent](https://wiki.gnupg.org/AgentForwarding) to the instance to
> securely access GitHub and sign commits without having to copy your keys.

### Port forwarding via code-server's built-in proxy

code-server has a proxy built-in for port-forwarding. By default, ports running
on the same machine as code-server can be accessed at
{current_url}/proxy/{port}. For instance, if you have code-server running on
localhost:8080 and a Python server running on localhost:8000, you could access
it via http://localhost:8080/proxy/8000

You can also override the URL scheme for the proxy using the `VSCODE_PROXY_URI`
environment variable. `VSCODE_PROXY_URI=https://{{port}}.kyle.dev` would forward
an application running on localhost:3000 to https://3000.kyle.dev

### Using Let's Encrypt with Caddy

Using [Let's Encrypt](https://letsencrypt.org) is an option if you want to
Expand Down