rdpSynopsis="Authorize a session against a target and invoke an RDP client to connect"
)
funcrdpOptions(c*Command,set*base.FlagSets){
f:=set.NewFlagSet("RDP Options")
f.StringVar(&base.StringVar{
Name:"style",
Target:&c.flagRdpStyle,
EnvVar:"BOUNDARY_CONNECT_RDP_STYLE",
Completion:complete.PredictSet("mstsc","open"),
Usage:`Specifies how the CLI will attempt to invoke an RDP client. This will also set a suitable default for -exec if a value was not specified. Currently-understood values are "mstsc", which is the default on Windows and launches the Windows client, and "open", which is the default on Mac and launches via an rdp:// URL.`,
})
}
typerdpFlagsstruct{
flagRdpStylestring
}
func(r*rdpFlags)defaultExec()string{
r.flagRdpStyle=strings.ToLower(r.flagRdpStyle)
switchr.flagRdpStyle{
case"":
switchruntime.GOOS{
case"windows":
r.flagRdpStyle="mstsc"
case"darwin":
r.flagRdpStyle="open"
default:
// We may want to support rdesktop and/or xfreerdp at some point soon