Skip to content

Commit 985212d

Browse files
committed
docs: add port-forwarding
1 parent 134e9b4 commit 985212d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/guide.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
- [Expose code-server](#expose-code-server)
77
- [Port forwarding via SSH](#port-forwarding-via-ssh)
8+
- [Port forwarding via code-server's built-in proxy](#port-forwarding-via-code-servers-built-in-proxy)
89
- [Using Let's Encrypt with Caddy](#using-lets-encrypt-with-caddy)
910
- [Using Let's Encrypt with NGINX](#using-lets-encrypt-with-nginx)
1011
- [Using a self-signed certificate](#using-a-self-signed-certificate)
@@ -112,6 +113,18 @@ we recommend using another method, such as [Let's Encrypt](#let-encrypt) instead
112113
> [GPG agent](https://wiki.gnupg.org/AgentForwarding) to the instance to
113114
> securely access GitHub and sign commits without having to copy your keys.
114115
116+
### Port forwarding via code-server's built-in proxy
117+
118+
code-server has a proxy built-in for port-forwarding. By default, ports running
119+
on the same machine as code-server can be accessed at
120+
{current_url}/proxy/{port}. For instance, if you have code-server running on
121+
localhost:8080 and a Python server running on localhost:8000, you could access
122+
it via http://localhost:8080/proxy/8000
123+
124+
You can also override the URL scheme for the proxy using the `VSCODE_PROXY_URI`
125+
environment variable. `VSCODE_PROXY_URI=https://{{port}}.kyle.dev` would forward
126+
an application running on localhost:3000 to https://3000.kyle.dev
127+
115128
### Using Let's Encrypt with Caddy
116129

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

0 commit comments

Comments
 (0)