Skip to content

Commit 1ec6a70

Browse files
Merge branch 'main' into patches-1.70
2 parents 14a474e + bef78e6 commit 1ec6a70

File tree

14 files changed

+93
-13
lines changed

14 files changed

+93
-13
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ jobs:
609609
fetch-depth: 0
610610

611611
- name: Run Trivy vulnerability scanner in repo mode
612-
uses: aquasecurity/trivy-action@cb606dfdb0d2b3698ace62192088ef4f5360b24f
612+
uses: aquasecurity/trivy-action@12814ff8bcb32c97f4d963e6e7903674b1692fa0
613613
with:
614614
scan-type: "fs"
615615
scan-ref: "."

.github/workflows/trivy-docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: actions/checkout@v3
5252

5353
- name: Run Trivy vulnerability scanner in image mode
54-
uses: aquasecurity/trivy-action@cb606dfdb0d2b3698ace62192088ef4f5360b24f
54+
uses: aquasecurity/trivy-action@12814ff8bcb32c97f4d963e6e7903674b1692fa0
5555
with:
5656
image-ref: "docker.io/codercom/code-server:latest"
5757
ignore-unfixed: true

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,36 @@ Code v99.99.999
2020
2121
-->
2222

23+
## [4.5.2](https://github.com/coder/code-server/releases/tag/v4.5.2) - 2022-08-15
24+
25+
Code v1.68.1
26+
27+
### Security
28+
29+
- Fixed the proxy route not performing authentication. For example if you were
30+
to run a development HTTP server using `python -m http.server 8000` then it
31+
would be accessible at `my.domain/proxy/8000/` without any authentication.
32+
33+
If all of the following apply to you please update as soon as possible:
34+
35+
- You run code-server with the built-in password authentication.
36+
- You run unprotected HTTP services on ports accessible by code-server.
37+
38+
### Changed
39+
40+
- Invoking `code-server` in the integrated terminal will now use the script that
41+
comes with upstream Code. This means flags like `--wait` will be
42+
automatically supported now. However the upstream script only has the ability
43+
to interact with the running code-server and cannot spawn new instances. If
44+
you need to spawn a new code-server from the integrated terminal please
45+
specify the full path to code-server's usual script (for example
46+
`/usr/bin/code-server`).
47+
48+
### Fixed
49+
50+
- Invoking `code-server` in the integrated terminal will now work instead of
51+
erroring about not finding Node.
52+
2353
## [4.5.1](https://github.com/coder/code-server/releases/tag/v4.5.1) - 2022-07-18
2454

2555
Code v1.68.1

ci/helm-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 3.0.0
18+
version: 3.1.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: 4.5.1
23+
appVersion: 4.5.2

ci/helm-chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ replicaCount: 1
66

77
image:
88
repository: codercom/code-server
9-
tag: '4.5.1'
9+
tag: '4.5.2'
1010
pullPolicy: Always
1111

1212
# Specifies one or more secrets to be used when pulling images from a

docs/assets/images/icons/usage.svg

Lines changed: 3 additions & 1 deletion
Loading

docs/collaboration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ As `code-server` is based on VS Code, you can follow the steps described on Duck
6060
code-server --enable-proposed-api genuitecllc.codetogether
6161
```
6262

63-
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v4.5.1/FAQ#how-does-the-config-file-work).
63+
Another option would be to add a value in code-server's [config file](https://coder.com/docs/code-server/v4.5.2/FAQ#how-does-the-config-file-work).
6464

6565
3. Refresh code-server and navigate to the CodeTogether icon in the sidebar to host or join a coding session.

docs/guide.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [Stripping `/proxy/<port>` from the request path](#stripping-proxyport-from-the-request-path)
1717
- [Proxying to create a React app](#proxying-to-create-a-react-app)
1818
- [Proxying to a Vue app](#proxying-to-a-vue-app)
19+
- [Proxying to an Angular app](#proxying-to-an-angular-app)
1920
- [SSH into code-server on VS Code](#ssh-into-code-server-on-vs-code)
2021
- [Option 1: cloudflared tunnel](#option-1-cloudflared-tunnel)
2122
- [Option 2: ngrok tunnel](#option-2-ngrok-tunnel)
@@ -382,6 +383,15 @@ module.exports = {
382383

383384
Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#publicpath)
384385

386+
### Proxying to an Angular app
387+
388+
In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app:
389+
390+
1. use `<base href="./.">` in `src/index.html`
391+
2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json`
392+
393+
For additional context, see [this GitHub Discussion](https://github.com/coder/code-server/discussions/5439#discussioncomment-3371983).
394+
385395
## SSH into code-server on VS Code
386396

387397
[![SSH](https://img.shields.io/badge/SSH-363636?style=for-the-badge&logo=GNU+Bash&logoColor=ffffff)](https://ohmyz.sh/) [![Terminal](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff)](https://img.shields.io/badge/Terminal-2E2E2E?style=for-the-badge&logo=Windows+Terminal&logoColor=ffffff) [![Visual Studio Code](https://img.shields.io/badge/Visual_Studio_Code-007ACC?style=for-the-badge&logo=Visual+Studio+Code&logoColor=ffffff)](vscode:extension/ms-vscode-remote.remote-ssh)

docs/helm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# code-server Helm Chart
22

3-
[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.5.1](https://img.shields.io/badge/AppVersion-4.5.1-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.5.1-informational?style=flat-square)
3+
[![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) [![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![AppVersion: 4.5.2](https://img.shields.io/badge/AppVersion-4.5.2-informational?style=flat-square)](https://img.shields.io/badge/AppVersion-4.5.2-informational?style=flat-square)
44

55
[code-server](https://github.com/coder/code-server) code-server is VS Code running
66
on a remote server, accessible through the browser.
@@ -73,7 +73,7 @@ and their default values.
7373
| hostnameOverride | string | `""` |
7474
| image.pullPolicy | string | `"Always"` |
7575
| image.repository | string | `"codercom/code-server"` |
76-
| image.tag | string | `"4.5.1"` |
76+
| image.tag | string | `"4.5.2"` |
7777
| imagePullSecrets | list | `[]` |
7878
| ingress.enabled | bool | `false` |
7979
| nameOverride | string | `""` |

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"versions": ["v4.5.1"],
2+
"versions": ["v4.5.2"],
33
"routes": [
44
{
55
"title": "Home",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-server",
33
"license": "MIT",
4-
"version": "4.5.1",
4+
"version": "4.5.2",
55
"description": "Run VS Code on a remote server.",
66
"homepage": "https://github.com/coder/code-server",
77
"bugs": {

patches/heartbeat.diff

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Add a heartbeat to web socket connections
2+
3+
This prevents them from being killed when they are idle. To test run behind
4+
NGINX, make sure the sockets are idle (check dev tools), then wait 60+ seconds.
5+
6+
Index: code-server/lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts
7+
===================================================================
8+
--- code-server.orig/lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts
9+
+++ code-server/lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts
10+
@@ -7,6 +7,7 @@ import { VSBuffer } from 'vs/base/common
11+
import { Emitter, Event } from 'vs/base/common/event';
12+
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
13+
import { IIPCLogger, IMessagePassingProtocol, IPCClient } from 'vs/base/parts/ipc/common/ipc';
14+
+import { isWeb } from 'vs/base/common/platform';
15+
16+
export const enum SocketDiagnosticsEventType {
17+
Created = 'created',
18+
@@ -828,6 +829,19 @@ export class PersistentProtocol implemen
19+
this._socketDisposables.push(this._socketWriter);
20+
this._socketReader = new ProtocolReader(this._socket);
21+
this._socketDisposables.push(this._socketReader);
22+
+ // Send empty messages to keep the socket alive. We only need this on the
23+
+ // web where sockets can be killed by reverse proxies for inactivity.
24+
+ if (isWeb) {
25+
+ const timer = setInterval(() => {
26+
+ const msg = new ProtocolMessage(ProtocolMessageType.None, 0, 0, getEmptyBuffer());
27+
+ this._socketWriter.write(msg);
28+
+ }, 45000); // NGINX has a 60 second default timeout so try 45 seconds.
29+
+ this._socketDisposables.push({
30+
+ dispose: () => {
31+
+ clearInterval(timer);
32+
+ },
33+
+ });
34+
+ }
35+
this._socketDisposables.push(this._socketReader.onMessage(msg => this._receiveMessage(msg)));
36+
this._socketDisposables.push(this._socket.onClose((e) => this._onSocketClose.fire(e)));
37+
if (initialChunk) {

patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ disable-downloads.diff
2020
telemetry.diff
2121
display-language.diff
2222
cli-window-open.diff
23+
heartbeat.diff

test/e2e/extensions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as path from "path"
21
import { test as base } from "@playwright/test"
3-
import { describe, test, expect } from "./baseFixture"
2+
import * as path from "path"
43
import { getMaybeProxiedCodeServer } from "../utils/helpers"
4+
import { describe, test, expect } from "./baseFixture"
55

66
function runTestExtensionTests() {
77
// This will only work if the test extension is loaded into code-server.

0 commit comments

Comments
 (0)