Commit graph

14 commits

Author SHA1 Message Date
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 94ee5f5861
cli: automatically use distro qualities if available (#166961)
A fully-functioning CLI with tunnel capabilities requires product-specific
configuration that is not included in the OSS. This change has the CLI's build
script automatically look for a peer `vscode-distro` folder and, in a debug
build, set its build variables based on that.

It also works to set correct variables if vscode-distro is not found, based on
the OSS product.json (though this is not sufficient to run a fully fledged
tunnel.)
2022-11-22 06:13:16 -08: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 75dfb8993e
Merge branch 'main' into connor4312/cli-self-update 2022-10-17 11:15:23 -07:00
Connor Peet cb1b7ec10b
temporarily disable secret-service pending update 2022-10-17 11:13:51 -07:00
Connor Peet 4772a823d4
cli: fix linux build
This contains the following changes:

https://github.com/hwchen/secret-service-rs/compare/v2.0.2...microsoft:vscode-secret-service-rs:2.0.2-openssl

Previously I had secret-service pulling in patches made against `main`
of secret-service-rs, but that is a newer, not-yet-published 3.x version
that was not compatible. I've now backported the necessary changes
(using openssl for SDL compliance) on the last 2.x release.
2022-10-17 09:43:48 -07:00
Connor Peet 84439a87f6
wip 2022-10-14 15:46:49 -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 9bcc88eafe
cli: get builds in order 2022-09-23 13:28:26 -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.toml (Browse further)