Commit graph

48 commits

Author SHA1 Message Date
dependabot[bot] 968f1b2c40
Bump mio from 0.8.4 to 0.8.11 in /cli (#206845)
---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 16:10:24 -07:00
Connor Peet 5bdc31357d
cli: update dev tunnel sdk (#207018) 2024-03-06 16:10:10 -08:00
Connor Peet 2ff1b39452
cli: update dev tunnels (#203997)
Fixes #201417
2024-02-01 10:07:46 -08:00
Connor Peet d7cfba7af7
cli: update dev tunnel sdk (#203763) 2024-01-30 03:01:21 +01:00
dependabot[bot] 442419c7a2
Bump h2 from 0.3.17 to 0.3.24 in /cli (#202867)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.17 to 0.3.24.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.17...v0.3.24)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 11:06:39 -08:00
dependabot[bot] 0c021d3625
Bump openssl from 0.10.55 to 0.10.60 in /cli (#199456)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.55 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.55...openssl-v0.10.60)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 09:18:33 -05:00
dependabot[bot] a632e19c59
Bump rustix from 0.37.19 to 0.37.25 in /cli (#195931)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.19 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.19...v0.37.25)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 10:02:18 -07:00
Connor Peet e0502b5442
cli: update dev tunnels (#195183) 2023-10-09 12:44:12 -07:00
Connor Peet db135a575a
cli: fix decompression loop stalling (#191512)
Fixes #191501

It turns out this was a difference in inflate/deflate implementations
between the extension/SDK and the CLI. The SDK uses Node's zlib bindings,
while by default Rust's flate2 library uses a rust port of [miniz][1].
The 'logic' in the CLI was good, but miniz does not appear to flush
decompressed data as nicely on SYNC'd boundaries as zlib does, which
caused data to 'stall'. Telling the flate2 crate to use the native
bindings fixed this.

This could also be the cause of the flakiness occasionally seen on idle
tunnel connections!

[1]: https://github.com/richgel999/miniz
2023-08-28 21:51:04 +02:00
Connor Peet ac0d0a89c8
cli: adopt latest devtunnels for ipv6 forwarding support (#191236) 2023-08-24 19:53:05 +02:00
Connor Peet 1fe8359ed0
cli: implement 'server of server' for a local web server (#191014)
Closes https://github.com/microsoft/vscode/issues/168492

This implements @aeschli's 'server server' concept in a new
`code serve-web` command.

Command line args are similar to the standalone web server. The first
time a user hits that page, the latest version of the VS Code web server
will be downloaded and run. Thanks to Martin's previous PRs, all
resources the page requests are prefixed with `/<quality-<commit>`.

The latest release version is cached, but when the page is loaded again
and there's a new release, a the new server version will be downloaded
and started up.

Behind the scenes the servers all listen on named pipes/sockets and the
CLI acts as a proxy server to those sockets. Servers without connections
for an hour will be shut down automatically.
2023-08-22 17:29:51 -07:00
Connor Peet 2e9459b34c
cli: add more details to the status command (#190212)
For azml's integration

Closes https://github.com/microsoft/vscode-remote-tunnels/issues/669
2023-08-10 20:13:14 -07:00
Connor Peet 0d22bb7efa
cli: update dependencies for s360 (#189562)
* cli: update dependencies for s360

* update rust
2023-08-03 18:05:46 +01:00
Zuo Zongyuan b0620485c2
Fix: Remote tunnel service running on VM with XGETBV disabled exit with SIGILL when being connected (#187345)
fix: update cpufeatures from v0.2.5 to v0.2.8 (#187343)
2023-07-10 14:58:32 +00:00
Raymond Zhao 300617543f
chore: bump semver and openssl (#186949) 2023-07-03 19:48:04 -07:00
Connor Peet 382cdece5c
cli: bump enumflags2 for dependabot (#185181) 2023-06-15 08:29:27 +02:00
Connor Peet 75c2f321b2
cli: update dependencies (#184189)
Up all the dependencies! Notably:

- russh to the latest main now that tunnel changes are merged
- secret-service-rs to 3.x and dropping our custom fork
- which also fixes SDL pings

Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4328
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/4077
2023-06-02 10:27:47 -07:00
Connor Peet 679bb967c3
cli: add stdio control server
* signing: implement signing service on the web

* wip

* cli: implement stdio service

This is used to implement the exec server for WSL. Guarded behind a signed handshake.

* update distro

* rm debug

* address pr comments
2023-05-19 17:19:52 +02:00
Connor Peet 34f65dc1d7
cli: update hyper for cg (#180135) 2023-04-17 10:19:53 -07:00
dependabot[bot] 1e774371f2
Bump h2 from 0.3.14 to 0.3.17 in /cli (#179890)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.14 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.14...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-15 21:11:48 -07:00
Connor Peet 2d8ff25c85
cli: add streams to rpc, generic 'spawn' command (#179732)
* cli: apply improvements from integrated wsl branch

* cli: add streams to rpc, generic 'spawn' command

For the "exec server" concept, fyi @aeschli.

* update clippy and apply fixes

* fix unused imports :(
2023-04-12 16:51:29 +01:00
dependabot[bot] 29d93918d2
Bump openssl from 0.10.42 to 0.10.48 in /cli (#178296)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.42 to 0.10.48.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.42...openssl-v0.10.48)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 08:20:29 -07:00
Connor Peet f299f6f423
cli: fix windows terminal erroring on tunnel first run (#178267)
* cli: fix tunnel message command

Fixes #177394

* fix: windows terminal erroring on tunnel first run

Was fixed by https://github.com/console-rs/dialoguer/pull/192

Fixes #175747
2023-03-24 15:46:42 -07:00
Connor Peet 0e7d14d32d
cli: allow client process to control singleton process (#177141)
Other connected clients will now print:

```
Connected to an existing tunnel process running on this machine. You can press:

- Ctrl+C to detach
- "x" to stop the tunnel and exit
- "r" to restart the tunnel
```

These are then sent to the server to have that take effect. This is
mostly some refactors in the singleton_server to make the lifecycle work.
2023-03-14 17:55:28 -07:00
Connor Peet 1b5fd140fb
Run tunnels as singleton process (for a --cli-data-dir) (#177002)
* wip on singleton

* wip

* windows support

* wip

* wip

* fix clippy
2023-03-14 08:09:47 -07:00
Connor Peet 863b9261a3
cli: bump tempfile->remove_dir_all for cve (#176206) 2023-03-06 10:10:01 +01:00
Connor Peet 26fe31fc66
update openssl-prebuild for musl failures (#175731)
* update openssl-prebuild for musl failures

* reapply vendoring

* reapply macos pipeline fix
2023-03-01 08:57:45 +01:00
Connor Peet f8119e9beb
Revert "cli: fix static import of openssl (#175681)" (#175727)
This reverts commit 7014a17b1f.
2023-03-01 07:43:32 +01:00
Connor Peet 7014a17b1f
cli: fix static import of openssl (#175681)
* cli: fix static import of openssl

* update dev tunnels
2023-02-28 11:20:58 -08:00
Benjamin Pasero 2cad803acf
Revert "Bump openssl-src from 111.22.0+1.1.1q to 111.25.0+1.1.1t in /cli (#173883)"
This reverts commit be0f82c93a.
2023-02-28 08:37:33 +01:00
dependabot[bot] be0f82c93a
Bump openssl-src from 111.22.0+1.1.1q to 111.25.0+1.1.1t in /cli (#173883)
Bumps [openssl-src](https://github.com/alexcrichton/openssl-src-rs) from 111.22.0+1.1.1q to 111.25.0+1.1.1t.
- [Release notes](https://github.com/alexcrichton/openssl-src-rs/releases)
- [Commits](https://github.com/alexcrichton/openssl-src-rs/commits)

---
updated-dependencies:
- dependency-name: openssl-src
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 16:05:56 +00:00
Martin Aeschlimann beb9ed3758
update tokio (#173784) 2023-02-08 17:10:14 +07:00
Connor Peet b5aa3e0a3d
cli: use better approach to Windows services (#172679)
Fixes #167741

This eschews the offical Windows service system in favor of registering
into `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run`.
Unlike services, this can be done without administrative permissions,
does not require the current username/password, and is not blocked by
miscellaneous and mysterious system policies.

Since the process is basically unmanaged by the OS, this requires a
little legwork to start and stop the process when registering and
unregistering.
2023-01-27 15:04:56 -08:00
Connor Peet 758bc69404
cli: implement --no-sleep for windows 2023-01-20 18:57:11 -08:00
Connor Peet 4cf496e905
cli: add --no-sleep flag, implementation for macos (#171885)
First part of https://github.com/microsoft/vscode-remote-release/issues/7127
2023-01-20 15:42:09 -08:00
Connor Peet c600c10579
Merge remote-tracking branch 'origin/main' into connor4312/cli-wsl-control-2 2023-01-20 11:32:17 -08:00
Connor Peet a4585b072e
dep: bump the bumpalo 🦬 (#171651)
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/3426
2023-01-18 16:40:11 -08:00
Connor Peet 2c2ead679b
cli: initial wsl control server
Adds an stdin/out json rpc server for wsl.

Exposes a singular install_local command to install+boot the vscode server on a port from a local archive.

Also refines the common rpc layer some more. I'm decently happy with it now.
2023-01-18 08:23:04 -08:00
dependabot[bot] 2584c4b68b
Bump tokio from 1.21.2 to 1.23.1 in /cli (#170729)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.2 to 1.23.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.2...tokio-1.23.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 08:18:25 -08:00
Connor Peet adcffbdce9
cli: use connection token for CLI connections (#167426)
This uses a hash of the tunnel ID to create the connection token, which
should be sufficient to resolve the issues.

We also now publish the protocol version in the tunnel tags, since the
connection token must be supplied in the resolver, which is before we
start connecting to the tunnel.

See https://github.com/microsoft/vscode-internalbacklog/issues/3287
2022-11-28 18:03:15 +01:00
Connor Peet 796ee2bf3c
chore: pull more strings from the product.json (#166769)
Fixes the bulk of https://github.com/microsoft/vscode-cli/issues/560
2022-11-18 18:52:52 -08:00
Connor Peet c47751948c
cli: add service integration for systemd (#166328)
systemd, like most 'modern' linux components, has a nice dbus API. This uses
that API to register the tunnel as a service of the calling user.

The dbus dependency is temporarily duplicated, until secret-service 3 is
released, where they update to the latest version (should be a week or two).

For https://github.com/microsoft/vscode-cli/issues/367. Next up, macOS,
then it's done :)
2022-11-14 21:39:05 -08:00
Connor Peet c536595a7f
cli: fallback to system installs in the standalone CLI
The standalone CLI should detect and fall back to using and
system-installed VS Code instance, rather than trying to download zips
and manage its own VS Code instances.

There are three approaches used for discovery:

- On Windows, we can easily and quickly read the register to find
  installed versions based on their app ID.
- On macOS, we initially look in `/Applications` and fall back to the
  slow `system_profiler` command to list app .app's if that fails.
- On Linux, we just look in the PATH. I believe all Linux installers
  (snap, dep, rpm) automatically add VS Code to the user's PATH.

Failing this, the user can also manually specify their installation dir,
using the command `code version use stable --install-dir /path/to/vscode`.

Fixes #164159
2022-10-20 10:54:13 -07:00
Connor Peet 7c3740a7e7
update prepare scripts, license, lockfile 2022-10-17 11:50:49 -07:00
Connor Peet 450f8e65b6
run cli tests on pr 2022-10-17 09:56:15 -07:00
Connor Peet a2dd71c0fe
cli: use openssl for all crypto-related activities
For compliance with SDL and MSFT crypto standards. Right now this uses
our forks of russh and secret-service. russh seems amenable to getting
this merged (https://github.com/warp-tech/russh/pull/52) but TBD about
the secret-service crate.

Fixes https://github.com/microsoft/vscode-internalbacklog/issues/3158
2022-10-14 11:09:31 -07:00
Connor Peet 5b24e93b35
cli: update problematic dependencies 2022-09-20 08:57:55 -07:00
Connor Peet 3762635fe1
move cli to top level 2022-09-20 08:42:44 -07:00
Renamed from src/cli/Cargo.lock (Browse further)