Commit Graph

42 Commits

Author SHA1 Message Date
Mike Sawka
1cd1744317
remove two calls to conn.Connect() (#1757) 2025-01-16 17:32:41 -08:00
Sylvie Crowe
ff5f26709c
WSL Updates for New Architecture (#1756)
This adapts most of the WSL code to follow the new architecture that ssh
uses.

---------

Co-authored-by: sawka <mike@commandline.dev>
2025-01-16 15:54:58 -08:00
Mike Sawka
9dc9066a81
conn updates 5 (#1755)
* token swap
* setting environment variables for different local/remote shells
* bug fixes for init scripts
* more logging
* update connserver startup flow
2025-01-16 11:17:29 -08:00
Evan Simkowitz
68a88857cb
Check for wildcard/conditional host patterns in ~/.ssh/config before normalizing for connections dropdown (#1743) 2025-01-15 20:34:42 -08:00
Mike Sawka
07d07472db
move genconn quote, and getshelltype to shellutil (#1731) 2025-01-14 15:29:36 -08:00
Mike Sawka
a24fe750c5
conn updates 4 (#1726) 2025-01-14 14:09:26 -08:00
Sylvie Crowe
0174e7cd07
RemoteInfo Rpc (#1719)
Adds an Rpc Command for getting RemoteInfo. This is used to replace the
session that was used to determine the shell on remote machines.
2025-01-12 15:22:07 -08:00
Sylvie Crowe
5a7771bf40
Update Wsh Command (#1715)
This adds an RPC command for updating wsh on a remote machine without
starting a new session. It is not being used yet, but will be used for
connections using a single server in the future.
2025-01-10 21:29:06 -08:00
Mike Sawka
ba5f929b3f
conn updates 3 (#1711)
lots of misc connection refactoring / fixes:

* adds blocklogger as a way to writing logging information from the backend directly to the a terminal block
* use blocklogger in conncontroller
* use blocklogger in sshclient
* fix remote name in password prompt
* use sh -c to get around shell weirdness
* remove cmd.exe special cases
* use GetWatcher().GetFullConfig() rather than re-reading the config file
* change order of things we do when establishing a connection.  ask for wsh up front.  then do domain socket, then connserver
* reduce number of sessions required in the common case when wsh is already installed.  running the connserver is now a "multi-command" which checks if it is installed, then asks for the version
* send jwt token over stdin instead of in initial command string
* fix focus bug for frontend conn modal
* track more information in connstatus
* simplify wshinstall function
* add nowshreason
* other misc cleanup
2025-01-10 14:09:32 -08:00
Evan Simkowitz
b51ff834b2
Happy new year! (#1684)
Update all 2024 references to 2025
2025-01-04 20:56:57 -08:00
Sylvie Crowe
e388128010
fix: nil dereference in nowsh error messages (#1673)
This showed up when the domain socket request failed but the connection
request did not. With this fixed, this case correctly enters nowsh mode.
2025-01-02 16:02:27 -08:00
Mike Sawka
4fd6d36d8e
conn updates 2 (#1660)
* use pwsh over powershell if installed (on windows) for default shell
* refactor blockcontroller.DoRunShellCommand into a "setup" and "manage" phase
* fix wshcmd-conn to also disconnect wsl connections
* new genconn interfaces to make a standardized environment to run SSH/WSL commands via `sh -c`.  also create better quoting functions that are composable
* replace html/template with text/template for shell command templating (avoids special chars getting turned into HTML entities, breaking the commands)
* do not reinstall wsh if the installed version has a higher version (prevents flip-flopping on shared systems)
* simplify clientOs/clientArch detection.  use `uname -sm`.  also validate the os/arch combo as compatible with our builds.
* replace CpHostToRemote with CpWshToRemote. hard codes wsh paths inside of the function instead of having them passed in (quoting restrictions)
* new SyncBuffer class to use with commands that properly synchronizes Writes/String output
* fix setTermSize to actually update DB with terminal size
2025-01-02 14:15:32 -08:00
Mike Sawka
fe91d167b6
fix all panichandlers for the new format (inline recover()) (#1659) 2024-12-31 09:31:55 -08:00
Mike Sawka
b59e9e95bd
conn updates (more consistency) (#1657) 2024-12-30 17:11:50 -08:00
Sylvie Crowe
0c9f35791d
fix: do not error out if ssh config is empty (#1632)
As connections can now be stored in the internal connection, a missing
or invalid ssh config should not cause the entire list of connections to
be empty. This change ignores the error from the ssh config and proceeds
to construct the list without it.
2024-12-26 22:52:47 -08:00
Sylvie Crowe
f5305cc8dd
Disable Wsh on Remotes where the Domain Socket Listener Fails (#1542)
A recent change meant that if certain operations for setting up wsh
failed, a fallback would be employed to launch the terminal without the
wsh connection. This adds the domain socket listener to the list of
things that are allowed to fail before retrying without wsh instead of
failing outright.
2024-12-17 12:22:57 -08:00
Sylvie Crowe
0174adea7b
Connections Typeahead Additional Fixes (#1457) 2024-12-10 11:13:15 -08:00
Sylvie Crowe
6dfc85b324
Retry Without Wsh on Fail (#1406)
Adds the ability for connections to continue without wsh if they fail.
This involves creating a menu that warns the user that wsh could not be
used.
2024-12-06 10:11:38 -08:00
Sylvie Crowe
b4b0222c9d
New Connections Configs (#1383)
This adds the following connections changes:
- connections can be hidden from the dropdown in our internal
connections.json config
- `wsh ssh` -i will write identity files to the internal
connections.json config for that connection
- the internal connections.json config will also be used to get identity
files when connecting
- the internal connections.json config allows setting theme, fontsize,
and font for specific connections
- successful connections (including those using wsh ssh) are saved to
the internal connections.json config
- the connections.json config will be used to help pre-populate the
dropdown list
- adds an item to the dropdown to edit the connections config in an
ephemeral block

---------

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
2024-12-05 10:02:07 -08:00
Sylvie Crowe
24103213aa
SSH without using WSH (#1355) 2024-11-27 16:52:00 -08:00
Sylvie Crowe
c003ddff83
Quick Ssh Fix/Logging (#1328)
This adds two things:
- prints a log error if the user isn't parsed properly in ssh
- ensures that a host isn't reused when sending to the conn list
2024-11-20 18:11:47 -08:00
Mike Sawka
360964d4ba
panic handlers everywhere (#1327) 2024-11-20 18:05:13 -08:00
Mike Sawka
1210313d2b
activity updates (#1302) 2024-11-15 16:09:26 -08:00
Sylvie Crowe
94eb165346
fix: ignore the match statement in ssh config (#1155)
This change will skip over match statements in the ssh config without
panicking. Note that this change still does not add match statement
parsing--it merely makes it possible to continue parsing if the match
keyword is present.
2024-10-27 20:35:19 -07:00
Sylvie Crowe
ac6f9a05d4
ProxyJump Support (#1107)
This adds basic ProxyJump support for handling ssh connections.
2024-10-25 12:14:40 -07:00
Sylvie Crowe
1354c34921
fix: add conn prefix to askbeforewshinstall flag (#1013) 2024-10-10 17:23:27 -07:00
Sylvie Crowe
f3e0ba8148
Add Don't Ask Again Checkbox for Wsh Install (#1010)
This provides a checkbox when installing wsh that will prevent the
message from popping up in the future. It can also be disabled by adding
`"askbeforewshinstall": false` to the config file.
2024-10-10 15:50:46 -07:00
Sylvie Crowe
41a34ad49f
Add Extra Log Messages to Improve Debugging Experience (#906)
This adds more debugging statements for connections and ai chat, in
order to provide us more context if users run into bugs.
2024-09-30 12:32:22 -07:00
Evan Simkowitz
936d4bfb30
Migrate websocket eventbus messages to wps (#367)
This migrates all remaining eventbus events sent over the websocket to
use the wps interface. WPS is more flexible for registering events and
callbacks and provides support for more reliable unsubscribes and
resubscribes.
2024-09-11 18:03:55 -07:00
Mike Sawka
acae25f6e3
connmodal updates. connection colors, conn status in modal (#335) 2024-09-05 23:09:30 -07:00
Sylvie Crowe
fc0b1929ec
Connection Typeahead/Suggestions (#332)
Adds a list of potential remotes to add and filters it as you type. It
also provides options for reconnecting on a disconnection and
specifically connecting to a local connection
2024-09-05 17:02:44 -07:00
Mike Sawka
8ad84fd78a
update all gopkg imports (#330) 2024-09-05 14:25:45 -07:00
Mike Sawka
3e0ca6b41e
connection handling / block controller handling (#326) 2024-09-05 00:21:08 -07:00
Sylvie Crowe
b3a7c466e5
Powershell Wsh Integration (#320)
Add wsh to the path in powershell. Should work locally and in remote
connections. Should work on both windows and unix systems.
2024-09-04 02:13:00 -07:00
Mike Sawka
7bc154771a
implement wsh conn commands (#319) 2024-09-03 23:04:19 -07:00
Mike Sawka
afd83f0f6f
wsh connreinstall (#317) 2024-09-03 22:15:02 -07:00
Sylvie Crowe
226bc4ee6f
Connect With Non-Terminal Widgets (#304)
- Adds connection buttons for previews
- Makes it possible for graphs and previews to connect on backend
(without a terminal open to connection)
- Changes the wsh install message
2024-09-02 12:34:49 -07:00
sawka
74f551b212 connstatus fix, update connection icons appropriately for status 2024-08-30 13:56:53 -07:00
Mike Sawka
c2fe3b18e1
move connection switching to blockheader (#276) 2024-08-26 16:19:03 -07:00
Sylvie Crowe
636d71e652
Change Connection UI (#269)
This allows the user to select different connections from the terminal
block. Some features include:
- a status bar at the top of the term block that shows your current
connection
- an icon next to the status bar that shows whether the connection is
currently connected
- the ability to click the status bar and type in a new connection in
order to change the current connection

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-08-23 18:12:40 -07:00
Mike Sawka
037497e7f1
wsh edit working (#252) 2024-08-20 14:56:48 -07:00
Mike Sawka
85874f92ca
set up remote connserver (#245) 2024-08-18 21:26:44 -07:00