The --socket-fd flag never worked. The wrapper forks the process that
listens, but only the IPC channel was inherited as fd 3, so the socket
passed by the caller was not available to the child. Node then tried to
listen on the IPC pipe and failed with "listen EEXIST".
Pass the socket to the child as stdio entry 4 and tell the child to use
that fd in the handshake.
Node also reports no address for a Unix socket adopted by fd, which made
startup fail with "Server has no address". Log the listener as fd:<n>
in that case.
Add an integration test that starts the code-server binary with a Unix
or TCP socket as fd 3 and checks that /healthz answers over it.
The origin check compared the host header to the origin's host as plain
strings, so `example.com:443` did not match `https://example.com`, and a
proxy forwarding `$host` (no port) together with X-Forwarded-Port failed
on any non-default port.
Default ports (80 for http, 443 for https) are now treated as no port,
and when X-Forwarded-Host has no port the port from X-Forwarded-Port is
used. Everything else is still an exact match. getHost() is unchanged
for the domain proxy.
The shell expands ~ in command-line arguments, but values read from
config.yaml were passed to path.resolve as-is, so
`user-data-dir: ~/.config/code-server-data` resolved to
`<cwd>/~/.config/code-server-data`.
Options like `enable-remote-storage: false` in config.yaml are converted to
`--enable-remote-storage=false`, but the parser set any boolean option to
true regardless of its value. Booleans set to false are now ignored, the
same way optional strings set to false already are.
* Update Code to 1.139.1
* Bump proxy-addr to 2.0.8
* Add preinstall setup to build
Already had this in the release build step, not sure why it is not in
the main build step. But we started getting errors building native
modules in ci, and this seems to be why.
* Fix quick input
It types too quickly, before the input is visible.
The lower bound check ran before the parser had resolved the value, so it
only saw a value with the --idle-timeout-seconds=<value> form. With the
space-separated form the value was still undefined at that point,
Number(undefined) is NaN, and NaN <= 60 is false, so anything got through.
Move the check below the block that pulls the value from the next
argument so both forms are validated the same way.