goVNC
A VNC client and proxy server for WebSocket-based VNC connections (noVNC).
Quick Start
make build
./govnc wss://your-vnc-server/websockify
Features
- Interactive mode: Type directly to VNC sessions via terminal
- Server mode: HTTP API and WebSocket proxy for noVNC clients
- Clipboard sync: File-based clipboard transfer with fragmented message support
- One-shot commands: Send text or clipboard content and exit
Code Layout
| Package | Description |
|---|---|
cmd/govnc |
CLI entry point and mode handlers |
pkg/rfb |
RFB protocol (handshake, encodings, messages) |
pkg/transport |
WebSocket dialer and connection |
pkg/input |
Keyboard (keysym) and clipboard handling |
pkg/web |
HTTP server, API routes, WebSocket proxy |
internal/cli |
Flag parsing and configuration |
API Reference
Server mode (--http :8080):
| Endpoint | Method | Description |
|---|---|---|
/api/type |
POST | Send keystrokes (body = text) |
/api/clipboard |
GET | Get last received clipboard |
/api/clipboard |
POST | Send clipboard to VNC |
/api/key |
POST | Send key event (JSON: {"key": "Return"}) |
/ws |
WS | WebSocket proxy to VNC server |