Documentation
¶
Index ¶
- func CertFingerprint(configDir string) string
- func CertFlag(configDir string) string
- func HasRoyalTSX() bool
- func InstallHint() string
- func ParseDockerPS(output string) (map[string]string, error)
- func ParseInspectPort(inspectJSON string) (string, error)
- func RDPUrl(port string) string
- func RoyalTSXUrl(port, user, password string) string
- type ClientBinary
- type ContainerMatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertFingerprint ¶ added in v0.3.0
CertFingerprint reads the xrdp server cert from configDir/xrdp/cert.pem and returns its SHA256 fingerprint as a hex string (colon-separated). Returns empty string if the cert doesn't exist or can't be parsed.
func CertFlag ¶ added in v0.3.0
CertFlag returns the FreeRDP /cert: flag. Uses fingerprint verification if the cert exists, otherwise falls back to /cert:ignore.
func HasRoyalTSX ¶ added in v0.3.0
func HasRoyalTSX() bool
HasRoyalTSX checks if Royal TSX is installed on macOS.
func InstallHint ¶ added in v0.3.0
func InstallHint() string
InstallHint returns platform-specific install instructions for FreeRDP.
func ParseDockerPS ¶
ParseDockerPS parses the output of:
docker ps --filter "name=cell-" --format "{{.Names}}\t{{.Ports}}"
and returns a map of AppName -> RDP host port.
func ParseInspectPort ¶
ParseInspectPort extracts the host port for container port 3389 from docker inspect JSON output.
func RDPUrl ¶
RDPUrl returns an RDP URL for the given port. Uses percent-encoded format required by macOS Sonoma+ Windows App:
rdp://full%20address=s%3A127.0.0.1%3A<port>
func RoyalTSXUrl ¶ added in v0.3.0
RoyalTSXUrl returns a Royal TSX URI for the given port and credentials. Note: macOS Royal TSX does not support property_* query params in adhoc URIs. Retina must be enabled via Application → Default Settings → Remote Desktop → Display.
Types ¶
type ClientBinary ¶ added in v0.3.0
type ClientBinary struct {
Path string // absolute path from LookPath
Name string // binary name (e.g. "sdl-freerdp3")
}
ClientBinary holds the resolved FreeRDP binary path and name.
func FindClient ¶ added in v0.3.0
func FindClient() (ClientBinary, bool)
FindClient finds the best available FreeRDP client binary for the current platform.
func FindClientWith ¶ added in v0.3.0
FindClientWith is like FindClient but accepts explicit OS and lookPath for testing.
type ContainerMatch ¶
type ContainerMatch struct {
Name string // full container name, e.g. "cell-devcell-73-run"
AppName string // stripped name, e.g. "devcell-73"
Port string // RDP host port
}
ContainerMatch holds data about a container with RDP port published.
func FindContainersByBind ¶
func FindContainersByBind(inspectJSON, hostDir string) ([]ContainerMatch, error)
FindContainersByBind parses docker inspect JSON (one or many containers) and returns all that have hostDir as the source of a bind mount and have port 3389 published.