Documentation
¶
Overview ¶
kkdesk is a remote desktop built with Tango. Its window is drawn by package ui (no WebView); the remote screen is a native video view hosted with uihost.NativeHost.
One binary, two roles: without flags it opens the main window (what "tan dev" runs) and shares this screen; -host does the same and prints one machine-readable line, -connect controls another machine (see flags.go).
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
kkdesk-server
command
kkdesk-server provides device rendezvous and TURN for kkdesk.
|
kkdesk-server provides device rendezvous and TURN for kkdesk. |
|
lockspike/win
command
|
|
|
internal
|
|
|
app
Package app wires the kkdesk pipelines: the host shares this screen (capture → encode → session, session input → inject) and the viewer shows a remote one (session → decode → display, UI input → session).
|
Package app wires the kkdesk pipelines: the host shares this screen (capture → encode → session, session input → inject) and the viewer shows a remote one (session → decode → display, UI input → session). |
|
capture
Package capture grabs the main display as NV12 frames.
|
Package capture grabs the main display as NV12 frames. |
|
clipsync
Package clipsync keeps the clipboard text of the two ends of a session in step.
|
Package clipsync keeps the clipboard text of the two ends of a session in step. |
|
codec
Package codec provides H.264 video encoding and decoding behind platform-independent interfaces.
|
Package codec provides H.264 video encoding and decoding behind platform-independent interfaces. |
|
config
Package config is kkdesk's local configuration: the settings of the 设置 page and the address book of 我的设备.
|
Package config is kkdesk's local configuration: the settings of the 设置 page and the address book of 我的设备. |
|
display
Package display shows decoded video frames in a native view (macOS: an AVSampleBufferDisplayLayer; Windows: a window with a flip-model swap chain fed by a D3D11 video processor), and maps pointer positions in the view to normalized video coordinates.
|
Package display shows decoded video frames in a native view (macOS: an AVSampleBufferDisplayLayer; Windows: a window with a flip-model swap chain fed by a D3D11 video processor), and maps pointer positions in the view to normalized video coordinates. |
|
files
Package files transfers files and folders between the controller (Client) and the host (Server) over one ordered, reliable data channel.
|
Package files transfers files and folders between the controller (Client) and the host (Server) over one ordered, reliable data channel. |
|
inject
Package inject posts remote input events (mouse, keyboard, wheel) to the local session.
|
Package inject posts remote input events (mouse, keyboard, wheel) to the local session. |
|
input
Package input defines the binary wire format for remote input events sent from the viewer to the host over WebRTC data channels.
|
Package input defines the binary wire format for remote input events sent from the viewer to the host over WebRTC data channels. |
|
lockscreen
Package lockscreen connects the host to an optional local lock screen component.
|
Package lockscreen connects the host to an optional local lock screen component. |
|
privacy
Package privacy provides the native operations for a host desktop session.
|
Package privacy provides the native operations for a host desktop session. |
|
rendezvous
Package rendezvous exchanges connection offers between authenticated devices.
|
Package rendezvous exchanges connection offers between authenticated devices. |
|
stats
Package stats records per-frame timestamps on either end of a session, aggregates them once per second into JSON Lines (fps, bitrate, loss, latency percentiles, per-segment medians, CPU) and summarises such a log.
|
Package stats records per-frame timestamps on either end of a session, aggregates them once per second into JSON Lines (fps, bitrate, loss, latency percentiles, per-segment medians, CPU) and summarises such a log. |
|
ui
Package appui is kkdesk's interface (directory internal/ui): the main window (sidebar navigation; the 连接 page with this machine's address and password, the form to control another machine and the recent connections; 我的设备, 远程会话, 文件传输 and 设置; the incoming-connection confirmation and the controlled-side panel) and the session window (tab strip with stats and 控制中心, the remote screen as a native video view).
|
Package appui is kkdesk's interface (directory internal/ui): the main window (sidebar navigation; the 连接 page with this machine's address and password, the form to control another machine and the recent connections; 我的设备, 远程会话, 文件传输 and 设置; the incoming-connection confirmation and the controlled-side panel) and the session window (tab strip with stats and 控制中心, the remote screen as a native video view). |
|
unlockcred
Package unlockcred stores controller-supplied unlock credentials locally.
|
Package unlockcred stores controller-supplied unlock credentials locally. |
|
update
Package update configures kkdesk's self-update: Tango's service/updater checks a signed manifest published with each GitHub release, downloads the new version (a binary patch when possible), installs it after kkdesk quits and rolls back if the new version does not start.
|
Package update configures kkdesk's self-update: Tango's service/updater checks a signed manifest published with each GitHub release, downloads the new version (a binary patch when possible), installs it after kkdesk quits and rolls back if the new version does not start. |
|
winmedia
Package winmedia holds what the Windows capture, codec (encoder and decoder) and display backends share: one process-wide Direct3D 11 device (on the adapter that owns the primary display, multithread protected, wrapped in an IMFDXGIDeviceManager for Media Foundation), a D3D11 video processor that converts and scales the desktop image to NV12, HRESULT formatting and a logger.
|
Package winmedia holds what the Windows capture, codec (encoder and decoder) and display backends share: one process-wide Direct3D 11 device (on the adapter that owns the primary display, multithread protected, wrapped in an IMFDXGIDeviceManager for Media Foundation), a D3D11 video processor that converts and scales the desktop image to NV12, HRESULT formatting and a logger. |
|
scripts
|
|
|
anim
command
Command anim keeps a large part of the screen changing every frame, the content the loopback measurement captures (scripts/loopback.sh): moving coloured bars and a millisecond clock (for photo-based glass-to-glass checks).
|
Command anim keeps a large part of the screen changing every frame, the content the loopback measurement captures (scripts/loopback.sh): moving coloured bars and a millisecond clock (for photo-based glass-to-glass checks). |
|
capdiag
command
Command capdiag captures the main display for a few seconds and prints per-frame timing: SCK frame status counts, delivery interval, SCK display time vs callback arrival, and encode-call→output latency measured from arrival and from display time.
|
Command capdiag captures the main display for a few seconds and prints per-frame timing: SCK frame status counts, delivery interval, SCK display time vs callback arrival, and encode-call→output latency measured from arrival and from display time. |
|
summary
command
Command summary prints the stats.Summary of kkdesk JSON Lines logs.
|
Command summary prints the stats.Summary of kkdesk JSON Lines logs. |



