5
5
6
6
- [ Expose code-server] ( #expose-code-server )
7
7
- [ 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 )
9
8
- [ Using Let's Encrypt with Caddy] ( #using-lets-encrypt-with-caddy )
10
9
- [ Using Let's Encrypt with NGINX] ( #using-lets-encrypt-with-nginx )
11
10
- [ Using a self-signed certificate] ( #using-a-self-signed-certificate )
15
14
- [ Accessing web services] ( #accessing-web-services )
16
15
- [ Using a subdomain] ( #using-a-subdomain )
17
16
- [ Using a subpath] ( #using-a-subpath )
17
+ - [ Using your own proxy] ( #using-your-own-proxy )
18
18
- [ Stripping ` /proxy/<port> ` from the request path] ( #stripping-proxyport-from-the-request-path )
19
19
- [ Proxying to create a React app] ( #proxying-to-create-a-react-app )
20
20
- [ 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
306
306
localhost:8080 and a Python server running on localhost:8000, you could access
307
307
it via http://localhost:8080/proxy/8000
308
308
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
-
313
309
### Using a subdomain
314
310
315
311
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:
326
322
code-server --proxy-domain <domain>
327
323
```
328
324
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
330
331
ensure your reverse proxy (if you're using one) forwards that information.
331
332
332
333
### Using a subpath
333
334
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.
335
348
336
349
### Stripping ` /proxy/<port> ` from the request path
337
350
0 commit comments