feat: add host actions, lifecycle hooks and operational tools
This commit is contained in:
1 parent
8d4915543e
commit
e5bde9c61f
32 files changed
+2083
-64
No files matched your search
@@ -24,6 +24,7 @@ func editSSHOptions(title string, o config.SSHOptions) (config.SSHOptions, error
|
||||
options := formatOptions(o.Options)
|
||||
forwards := formatForwards(o.Forwards)
|
||||
preConnect := o.PreConnect
|
||||
postDisconnect := o.PostDisconnect
|
||||
|
||||
err := huh.NewForm(huh.NewGroup(
|
||||
huh.NewInput().
|
||||
@@ -70,6 +71,7 @@ func editSSHOptions(title string, o config.SSHOptions) (config.SSHOptions, error
|
||||
_, err := parseForwards(s)
|
||||
return err
|
||||
}),
|
||||
huh.NewInput().Title("Post-disconnect script").Description("Local command after the client exits; none disables inheritance.").Value(&postDisconnect),
|
||||
huh.NewInput().
|
||||
Title("Pre-connect hook").
|
||||
Description("Shell command run locally before connecting, e.g. vpn-check.sh \"$NETSSH_HOST\".\n"+
|
||||
@@ -94,6 +96,7 @@ func editSSHOptions(title string, o config.SSHOptions) (config.SSHOptions, error
|
||||
ExtraArgs: parseLines(extraArgs),
|
||||
Options: parsed,
|
||||
PreConnect: strings.TrimSpace(preConnect),
|
||||
PostDisconnect: strings.TrimSpace(postDisconnect),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user