Skip to content

Commit 077ad34

Browse files
committed
docs: clean up based on feedback
1 parent b2e683c commit 077ad34

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

docs/guide.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
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)
98
- [Using Let's Encrypt with Caddy](#using-lets-encrypt-with-caddy)
109
- [Using Let's Encrypt with NGINX](#using-lets-encrypt-with-nginx)
1110
- [Using a self-signed certificate](#using-a-self-signed-certificate)
@@ -15,6 +14,7 @@
1514
- [Accessing web services](#accessing-web-services)
1615
- [Using a subdomain](#using-a-subdomain)
1716
- [Using a subpath](#using-a-subpath)
17+
- [Using your own proxy](#using-your-own-proxy)
1818
- [Stripping `/proxy/<port>` from the request path](#stripping-proxyport-from-the-request-path)
1919
- [Proxying to create a React app](#proxying-to-create-a-react-app)
2020
- [Proxying to a Vue app](#proxying-to-a-vue-app)
@@ -306,10 +306,6 @@ By default, ports running on the same machine as code-server can be accessed at
306306
localhost:8080 and a Python server running on localhost:8000, you could access
307307
it via http://localhost:8080/proxy/8000
308308

309-
You can also override the URL scheme for the proxy using the `VSCODE_PROXY_URI`
310-
environment variable. `VSCODE_PROXY_URI=https://{{port}}.kyle.dev` would forward
311-
an application running on localhost:3000 to https://3000.kyle.dev
312-
313309
### Using a subdomain
314310

315311
You will need a DNS entry that points to your server for each port you want to
@@ -326,12 +322,29 @@ To set your domain, start code-server with the `--proxy-domain` flag:
326322
code-server --proxy-domain <domain>
327323
```
328324

329-
Now you can browse to `<port>.<domain>`. Note that this uses the host header, so
325+
For instance, if you have code-server exposed on `domain.tld` and a Python
326+
server running on port 8080 of the same machine code-server is running on, you
327+
could run code-server with `--proxy-domain domain.tld` and access the Python
328+
server via `8080.domain.tld`.
329+
330+
Note that this uses the host header, so
330331
ensure your reverse proxy (if you're using one) forwards that information.
331332

332333
### Using a subpath
333334

334-
Simply browse to `/proxy/<port>/`.
335+
Simply browse to `/proxy/<port>/`. For instance, if you have code-server
336+
exposed on `domain.tld` and a Python server running on port 8080 of the same
337+
machine code-server is running on, you could access the Python server via
338+
`domain.tld/proxy/8000`.
339+
340+
### Using your own proxy
341+
342+
You can make extensions and the ports panel use your own proxy by setting
343+
`VSCODE_PROXY_URI`. For example if you set
344+
`VSCODE_PROXY_URI=https://{{port}}.kyle.dev` when an application is detected
345+
running on port 3000 of the same machine code-server is running on the ports
346+
panel will create a link to https://3000.kyle.dev instead of pointing to the
347+
built-in subpath-based proxy.
335348

336349
### Stripping `/proxy/<port>` from the request path
337350

0 commit comments

Comments
 (0)