From e92b5a2c13744551589185071ea6b21977f6d8b7 Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Tue, 5 Jun 2018 21:10:29 +0200 Subject: [PATCH] Update README.md and split the TODO list in its own file --- README.md | 97 +++++++++---------------------------------------------- TODO.md | 43 ++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 81 deletions(-) create mode 100644 TODO.md diff --git a/README.md b/README.md index 09dbe5e..a0fc3ea 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,18 @@ ![Logo](./resources/Logo.png) -This extension makes use of the new FileSystemProvider, added in version 1.23.0 of Visual Studio Code. +**| [GitHub](https://github.com/SchoofsKelvin/vscode-sshfs) | [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs) |** -## Features + +This extension makes use of the new FileSystemProvider, added in version 1.23.0 of Visual Studio Code. It allows "mounting" a remote folder over SSH as a local Workspace folder. + +## Summary * Use a remote directory (over SSH) as workspace folder * Use agents, including Pageant for Windows -* Get prompted for a password/passphrase (no plain text password in settings) -* Easily create configurations that mirror a PuTTY session -* Have multiple SSH workspace folders at once +* Get prompted for a password/passphrase (plain text password aren't required) +* Easily create configurations that reference a PuTTY session/configuration +* Have multiple SSH (and regular) workspace folders at once +* Make use of SOCKS 4/5 proxies and connection hopping ## Note There is a [bug in VSCode 1.23.0](https://github.com/Microsoft/vscode/issues/49258) related to configurations. This results in configurations that get added/removed to/from the global settings not showing up/disappearing until reload. @@ -23,7 +27,10 @@ Add SSH FS configs to "sshfs.configs" in your User Settings: { // With PuTTY, this can be a complete configuration (with / as root) "name": "quick-putty", - "putty": "My PuTTY session" + "putty": "My PuTTY session", + + // if "putty" is set to true, it'll use the "name" as session name + "putty": true // Would use the "quick-putty" PuTTY session }, { // Unique id, which results in ssh://serverlogs/ @@ -62,38 +69,13 @@ Add SSH FS configs to "sshfs.configs" in your User Settings: "passphrase": "CorrectHorseBatteryStaple", // Same as with the password, we can let it prompt us "passphrase": true - }, - { - // If you're on Windows and have PuTTY installed - "name": "media-server", - "root": "/data/media/", - - - // Either set this to a session name - "putty": "My media server", - - // Or let it find one using the host (and username) - "putty": true, - // Can also be a session name, e.g. "My media server" - "host": "my.media.me", - // (Optional) Filter the session by username - // (This only works if host is NOT a name of a session) - "username": "media", - - - // If the session has an encrypted key - "passphrase": "CorrectHorseBatteryStaple" - - // Note: If the session doesn't specify a username, but - // has "Use system username" enabled, it'll use process.env.USER - - // Note: The "agent" option will be set to "pageant" if the - // session has "Attempt authentication using Pageant" set } ], } ``` -*You could also put them in Workspace settings, all entries get merged together in one array.* +**See auto-complete while in the settings screen for the "full documentation" about all options** + +*You could also put them in Workspace settings. All configurations from Global/Workspace/... settings get merged. Should configurations with the same name exist, the more "lower/specific" configuration gets chosen, e.g. Workspace over Global.* There's an extensive JSON schema, so it'll say when you're missing a field. Mind that when you have to use e.g. either "host" or "putty", VSCode will only say "Missing host". Check your intellisense/autocomplete for all possible options. @@ -107,50 +89,3 @@ This will add a Workspace folder linked to a SSH (SFTP) session: ![Workspace folder added](./media/screenshot-explorer.png) -## Links -- [GitHub](https://github.com/SchoofsKelvin/vscode-sshfs) -- [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs) - -## TO DO *(in order of most likely to implement first)* -* ~~Fix bug where saving a file resets the permissions (when owner/root at least)~~ **DONE** -* ~~Allow loading PuTTY sessions when on windows~~ **DONE** - * Also have a command to directly use a PuTTY session (**TODO**) -* ~~Add proper JSON schema/validation for SSH FS configurations~~ **DONE** -* Fix bug where the Explorer shows a loading bar forever - * *Seems like I might've fixed this bug over time, but difficult to say* -* Fix bug where VSCode shows an error message about `no provider for ssh://NAME/` -* Allow loading (or automatically use) sessions from .ssh/config -* ~~An icon for the extension~~ **DONE** *(not the best, but eh)* -* ~~Configuring a deleted (but active) configuration should show the old config~~ **DONE** -* Add proxy support for SOCKS 4 and SOCKS 5 **EXPERIMENTAL** - * A quick test makes it seem like it works - * Need to check for (common) errors, configuration issues, ... - * Load proxy config from PuTTY session if given **DONE** - * Do more tests using (non-)PuTTY sessions, other (public?) proxies, ... -* Better error handling - * Everything *seems* fine, but I haven't tested (a lot of) error situations - * ~~Handle wrong password/key/... properly~~ **DONE** - * Maybe prompt for a password when one's needed but not configured? (**TODO**) - * Doesn't report when `root` is set to a non-existant directory - * Doesn't (always?) report errors related to lacking permissions -* Offer reconnecting if the User Settings change - * Currently this only refreshes the `SSH File Systems` view - * We do offer this when it's changed using Configure in the context menu -* ~~Icons for the `SSH File Systems` view~~ **DONE** - * ~~Icon for a configuration that isn't active~~ - * ~~Icon for a configuration that's active and connected~~ - * ~~Icon for a configuration that's active but disconnected~~ - * ~~Variant for the above two for deleted configurations~~ -* Better authentication methods - * Currently (basically) everything is directly passed to [ssh2](https://www.npmjs.com/package/ssh2#client-methods) - * ~~Add `promptForPasswordOrPassphrase` *(self-explanatory)*~~ **DONE** - * Both `password` and `passphrase` can be set to `true` to prompt - * ~~Add `privateKeyPath`~~ **DONE** - * Prompt the user for a password if the server prompts - * This would be the `tryKeyboard` option for ssh2's Client.connect - * Would need to hook into the keyboard request and show a prompt -* Add an option to open a SSH terminal *(might as well)* -* Add an option to change the `root` folder (without reconnecting) - * Internally keep track of the original root folder (reset option) - * Allow to "move" the `root` folder up one directory or to `/` - * Add a context menu option for directories in the Explorer diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..f4ce0bc --- /dev/null +++ b/TODO.md @@ -0,0 +1,43 @@ + +* ~~Fix bug where saving a file resets the permissions (when owner/root at least)~~ **DONE** +* ~~Allow loading PuTTY sessions when on windows~~ **DONE** + * Also have a command to directly use a PuTTY session (**TODO**) +* ~~Add proper JSON schema/validation for SSH FS configurations~~ **DONE** +* Fix bug where the Explorer shows a loading bar forever + * *Seems like I might've fixed this bug over time, but difficult to say* +* Fix bug where VSCode shows an error message about `no provider for ssh://NAME/` +* Allow loading (or automatically use) sessions from .ssh/config +* ~~An icon for the extension~~ **DONE** *(not the best, but eh)* +* ~~Configuring a deleted (but active) configuration should show the old config~~ **DONE** +* Add proxy support for SOCKS 4 and SOCKS 5 **EXPERIMENTAL** + * A quick test makes it seem like it works + * Need to check for (common) errors, configuration issues, ... + * Load proxy config from PuTTY session if given **DONE** + * Do more tests using (non-)PuTTY sessions, other (public?) proxies, ... +* Better error handling + * Everything *seems* fine, but I haven't tested (a lot of) error situations + * ~~Handle wrong password/key/... properly~~ **DONE** + * Maybe prompt for a password when one's needed but not configured? (**TODO**) + * Doesn't report when `root` is set to a non-existant directory + * Doesn't (always?) report errors related to lacking permissions +* Offer reconnecting if the User Settings change + * Currently this only refreshes the `SSH File Systems` view + * We do offer this when it's changed using Configure in the context menu +* ~~Icons for the `SSH File Systems` view~~ **DONE** + * ~~Icon for a configuration that isn't active~~ + * ~~Icon for a configuration that's active and connected~~ + * ~~Icon for a configuration that's active but disconnected~~ + * ~~Variant for the above two for deleted configurations~~ +* Better authentication methods + * Currently (basically) everything is directly passed to [ssh2](https://www.npmjs.com/package/ssh2#client-methods) + * ~~Add `promptForPasswordOrPassphrase` *(self-explanatory)*~~ **DONE** + * Both `password` and `passphrase` can be set to `true` to prompt + * ~~Add `privateKeyPath`~~ **DONE** + * Prompt the user for a password if the server prompts + * This would be the `tryKeyboard` option for ssh2's Client.connect + * Would need to hook into the keyboard request and show a prompt +* Add an option to open a SSH terminal *(might as well)* +* Add an option to change the `root` folder (without reconnecting) + * Internally keep track of the original root folder (reset option) + * Allow to "move" the `root` folder up one directory or to `/` + * Add a context menu option for directories in the Explorer