wraith/internal/rdp/freerdp_factory.go
Vantz Stockwell 8a096d7f7b
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Has been cancelled
Wraith v0.1.0 — Desktop SSH + RDP + SFTP Client
Go + Wails v3 + Vue 3 + SQLite + FreeRDP3 (purego)
183 tests, 76 source files, 9,910 lines of code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 08:19:29 -04:00

15 lines
463 B
Go

package rdp
import "runtime"
// NewProductionBackend returns the appropriate RDP backend for the current
// platform. On Windows it returns a FreeRDPBackend that loads freerdp3.dll
// at runtime via syscall. On other platforms it falls back to MockBackend
// so the application can still be developed and tested without FreeRDP.
func NewProductionBackend() RDPBackend {
if runtime.GOOS == "windows" {
return NewFreeRDPBackend()
}
return NewMockBackend()
}