This commit is contained in:
2026-07-06 16:21:06 +08:00
commit bb9f685221
41 changed files with 4333 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
// Command lmvpn is the LMVPN client application. It runs in two modes:
//
// lmvpn — GUI mode (default): Fyne desktop application
// lmvpn daemon — privileged daemon: owns the TUN device and
// WebSocket transport, launched as root by the GUI
//
// The split architecture keeps the GUI running as the user (with
// Keychain access) while the daemon runs as root (with TUN/route
// privileges). They communicate over a unix domain socket.
package main
import (
"fmt"
"os"
"lmvpn/internal/daemon"
"lmvpn/internal/ui"
)
func main() {
if len(os.Args) > 1 && os.Args[1] == "daemon" {
if err := daemon.Run(); err != nil {
fmt.Fprintf(os.Stderr, "daemon: %v\n", err)
os.Exit(1)
}
return
}
ui.Run()
}