- Internally we now have a `subscribeToGlobalFlags` to use up-to-date global flags
- Currently, this makes it that changing the global flags can immediately have an effect for some flags
- Global flags are those defined in your User Settings or Workspace(Folder) Settings
@ -31,6 +32,7 @@
- Although this can change, for workspace folders, paths specified in the global/workspace settings are also scanned
### Development changes
- Move the whole flag system from config.ts to flags.ts
- Updated Yarn to version 3.5.0
- Upgrade a ton of dependencies
@ -38,10 +40,12 @@
- Upgrade TypeScript from ~4.5.5 to ~5.0.2
- Upgrade Webpack from ^5.69.1 to ^5.76.3
- Upgrade a bunch of plugins and other dependencies
- Fix linter warnings in Markdown files and remove default webview/README.md
## v1.25.0 (2022-06-01)
### Major change
- Updated from `ssh2@0.8.9` to `ssh@1.6.0` (2e14709)
- Part of this update forces me to ditch `ssh2-streams` which played a major role for SFTP
- The `ssh2` package has a built-in but unexposed alternative we can more or less use directly
@ -57,12 +61,14 @@
- Mind that some (future) features won't work (maybe just for now, maybe forever) on Windows
### New features
- Added `FS_NOTIFY_ERRORS` flag to display notifications for FS errors (ddfafd5, #282)
- Added a `${workingDirectory}` variable that gets replaced during terminal creation (ddfafd5, #323)
- This applies to both the `Terminal Command` setting and `ssh-shell` task type
- See the issue (#323) for why this got added and how you can use it
### Changes
- Small improvements to Dropdown(WithInput) UI components (9c83b07)
- Delay and wait for loadConfigs() after logging version info (8c8b950)
- This solves a small issue/annoyance where logs regarding loading logs appear before the version logging
@ -72,6 +78,7 @@
- The extension will no longer show notification bubbles for failed `stat` operations due to non-existing files
### Development changes
- Added `semver` as dependency in preparation of `FS_NOTIFY_ERRORS` flag (57b8ec6)
- Pin some dependencies and in-range upgrade recursively (c7ac129)
- More specifically, we now use `typescript@~version` instead of `typescript@^version`
@ -85,14 +92,17 @@
## v1.24.1 (2021-12-07)
### New features
- The settings UI now has a table-like field to modify `newFileMode` (b904fb9, #214)
### Changes
- The default `newFileMode` is now `0o664` instead defaulting to the underlying library's `0o666` (af76438, #214)
- **This changes the permission for newly created files**, defaulting to `rw-rw-r--` instead of `rw-rw-rw-`
- While `0o664` is the default umask for non-root users and `0o644` for root, **we default to `0o664` regardless**
### Development changes
- Fix/improve `map-error.js` utility (now also uses `formatId` from `webpack.plugin.js`) (768bfda)
- Update build process (fa3bc68)
- Build workflow broke due to using `yarn dlx vsce` and an `vsce` major version update requiring Node 14
@ -106,6 +116,7 @@
## v1.24.0 (2021-11-02)
### Changes
- Set `$TERM` to `xterm-256color` instead of the default `vt100` (16ffd1e, #299)
- Terminals that exit within 5 seconds should now remain open until a key is pressed (55d7216)
- Refactored the `REMOTE_COMMANDS` beta feature (#270) to use the new `ShellConfig` system (b9f226e)
@ -114,34 +125,41 @@
- Using `$PATH` should allow support for recursive shells, switching shells, ...
### Fixes
- Write `REMOTE_COMMANDS` profile script to separate file for each user (69c2370, #292)
- Multiple users making use of this feature would use the same `/tmp/...` file, resulting in permission issues
### New features
- Added a `ShellConfig` system to support more shells regarding `environment`, home detection and `REMOTE_COMMANDS` (cc823c6)
## v1.23.1 (2021-10-06)
### Hotfix
- Fix the issue with failing home detecting for `csh`/`tcsh` shells (7605237, #295)
### Development changes
- More improvements in logging, especially regarding async stack tracing (e326a16)
- Properly "set boundaries", detect/analyze and log `toPromise`/`catchingPromise` calls
## v1.23.0 (2021-10-02)
### Fixes
- Fix remote `code` command (#267) not working without the filesystem already connected (#292) (b821bae)
- Fix bug with broken connections when connections are initiated by spawning named terminals (6f6e3ad)
- Fix issue where `.bashrc` echoing would result in home directory detection failing (860f65a, #294)
### Changes
- Proxy hop field now actually lists all known configs to pick from, instead of "TO DO" (1f7e333, #290)
- Remote `code` command (#267) now prompts to create an empty file for non-existing path (30c213a)
- Remote `code` command (#267) now displays a help message when not providing arguments (518e246)
### Development changes
- Webpack setup has been improved quite a bit, mostly to clean up long ugly paths and make builds deterministic:
- The custom `ProblemMatcherReporter` plugin is moved to `/webpack.plugin.js` and renamed to `WebpackPlugin`
- Now both webpack configs (extension and webview) make use of this plugin
@ -165,35 +183,43 @@
## 1.22.0 (2021-09-21)
### Fixes
- Partially fix issue with debug mode on code-server (05e1b69, #279)
### Development changes
- I've added a `CHANGELOG.md` file to the repository containing the changelog for earlier versions. It'll contain already committed changes that have yet to be released.
- The extension now only enters debug mode when the environment variable `VSCODE_SSHFS_DEBUG` is the (case insensitive) string `"true"`. The `ExtensionContext.extensionMode` provided by Code does not influence this anymore. This is part due to #279, implemented in 05e1b69 which supersedes 48ef229.
## 1.21.2 (2021-08-05)
### Fixes
- Fix bug in connect command with `Root` starting with `~` (803dc59, #280)
### Changes
- Remove `(SSH FS)` label from editor titles (fcbd6d7, #278)
## 1.21.1 (2021-08-01)
### Fixes
- Improve effect of `CHECK_HOME` flag (ef40b07b2d, #277)
### Changes
- Better error handling and `CHECK_HOME` flag support for `tryGetHome` (87d2cf845a)
### Development changes
- Improve `map-error.js` to work for `/dist/extension.js` and error report better (bda36c998c)
- Improve logging of errors through promises (c7f1261311)
## 1.21.0 (2021-07-01)
### Major change (315c255)
- An internal change happened, making URIs now represent an absolute path on the server
- In the past, `ssh://config/some/path` for a config with `/root` as Root would actually point to `/root/some/path` on the remote server
- Now, the Root is ignored, so `ssh://config/some/path` will actually point at `/some/path` on the remote server
@ -202,9 +228,11 @@
- This change simplifies a lot of complex code accounting for calculating/validating relative paths, and also allows for future improvements, a good example being a beta feature shown in #267
Fixes:
- Fix proxies breaking when no port is defined (which should default to 22) (a41c435, #266)
See microsoft/vscode#122102 for info and [this](https://code.visualstudio.com/updates/v1_56#_remote-indicator-menu) for an example (with different extensions)
- Add support for environment variables (3109e97, #241)
@ -222,6 +250,7 @@ It will tell the extension (and thus VS Code) to open the file/directory. Files
Due to how complex and unreliable it is to inject aliases, this feature is still in beta and subject to change.
Minor changes:
- Added `virtualWorkspaces` capabilities to `package.json` (8789dd6)
@ -15,10 +16,12 @@ This extension allows mounting remote folders as local workspace folders, launch
## Features
### Config editor
The built-in config editor makes it easy to create and edit configurations:
![Config editor](./media/config-editor.png)
The config editors stores this, by default, in your User Settings (`settings.json`) as:
```json
"sshfs.configs": [
{
@ -30,11 +33,13 @@ The config editors stores this, by default, in your User Settings (`settings.jso
}
],
```
This config is configured to copy settings (e.g. username, host, ...) from my PuTTY session. Due to me having loaded my private key in Pageant (PuTTY's agent), this config allows me to create a connection without having to provide a password/passphrase. It also specifies that all file operations _(`ssh://hetzner/some/file.js`)_ are relative to the `/root` directory on the server.
Configurations are read from your global User Settings, the current workspace's settings, and any JSON files configured with `sshfs.configpaths`. Even when the workspace overrides this setting, the globally-configured paths will still be read. The workspace versions do have higher priority for merging or ignoring duplicates.
### Terminals
Using a simple button or the command palette, a remote terminal can be started:
![Terminals](./media/terminals.png)
@ -43,16 +48,18 @@ _Uses `$SHELL` by default to launch your default user shell. A config option exi
If a connection is already opened for a configuration, there is no need to reauthenticate. As long as the configuration hasn't changed, existing connections (both for workspace folders and terminals) will be reused.
### Remote shell tasks
A new task type `ssh-shell` is added to run shell commands remotely:
![Remote shell tasks](./media/shell-tasks.png)
The task terminal opens a full PTY terminal on the server.
### Remote workspace folders
Using a simple button or the command palette, we can mount a remote workspace folder as a regular local workspace folder:
_Same configuration used as from the [Config editor](#Config%20editor) above._
_Same configuration used as from the [Config editor](#Configeditor) above._
This works seamlessly with extensions using the `vscode.workspace.fs` API _(added in VS Code 1.37.0)_, although not all extensions switched over, especially ones making use of binary files.
@ -61,16 +68,19 @@ As can be seen, right-clicking a remote directory gives the option to instantly
The extension supports any `ssh://` URI. I actually opened `ssh://hetzner/ng-ui` as my folder, which resolves to `/root/ng-ui` on my remote server. By default, the button/command opens `ssh://hetzner/` which would then mount `/root`, as that is what my `Root` config field is set to. You can set it to whatever, including `~/path`.
### Miscellaneous
The extension comes with a bunch of other improvements/features. Internally the [ssh2](https://www.npmjs.com/package/ssh2) package is used. The raw config JSON objects _(as seen in [Config editor](#Config%20editor))_ is, apart from some special fields, a one-on-one mapping of the config options supported by this package. Power users can edit their `settings.json` to e.g. make use of the `algorithms.cipher` field to specify a list of ciphers to use.
The extension comes with a bunch of other improvements/features. Internally the [ssh2](https://www.npmjs.com/package/ssh2) package is used. The raw config JSON objects _(as seen in [Config editor](#Config editor))_ is, apart from some special fields, a one-on-one mapping of the config options supported by this package. Power users can edit their `settings.json` to e.g. make use of the `algorithms.cipher` field to specify a list of ciphers to use.
Some other features worth mentioning:
#### Prompt host/username/password/... for every connection
![Prompt username](./media/prompt-username.png)
Active connections are reused to minimize prompts. A connection gets closed if there's no terminal or file system using it for over 5 seconds.
#### Proxy settings
Several proxy types (SSH hopping, HTTP and SOCKS 4/5) are supported:
![Proxy settings](./media/proxy-settings.png)
@ -80,15 +90,17 @@ Several proxy types (SSH hopping, HTTP and SOCKS 4/5) are supported:
![Hop config field](./media/hop-config.png)
#### SFTP Command/Sudo and Terminal command
![SFTP and Terminal Command config fields](./media/sftp-config.png)
The extension supports using a custom `sftp` subsystem command. By default, it uses the `sftp` subsystem as indicated by the remote SSH server. In reality, this usually results in `/usr/lib/openssh/sftp-server` being used.
The `SFTP Command` setting allows specifying to use a certain command instead of the default subsystem. The `SFTP Sudo` setting makes the extension try to create a sudo shell _(for the given user, or whatever sudo defaults to)_ and run `SFTP Command`_(or `/usr/lib/openssh/sftp-server` by default)_. For most users, setting this to `<Default>` should allow operating on the remote file system as `root`. Power users with esoteric setups can resort to changing `SFTP Command` to e.g. `sudo /some-sftp-server`, but might run into trouble with password prompts.
The `Terminal command` option, as mentioned in [Terminals](#Terminals), allows overriding the command used to launch the remote shell. By default, the extension launches a remote shell over the SSH connection, runs `cd ...` if necessary, followed by `$SHELL` to start the user's default shell. This config option allows to replace this `$SHELL` with a custom way way of starting the shell, or configuring the provided default SSH shell.
The `Terminal command` option, as mentioned in [Terminals](#terminals), allows overriding the command used to launch the remote shell. By default, the extension launches a remote shell over the SSH connection, runs `cd ...` if necessary, followed by `$SHELL` to start the user's default shell. This config option allows to replace this `$SHELL` with a custom way way of starting the shell, or configuring the provided default SSH shell.