remotedesktop 0.14.0__tar.gz → 0.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/CLAUDE.md +1 -1
- remotedesktop-0.17.0/PKG-INFO +148 -0
- remotedesktop-0.17.0/docs/media/client-demo.gif +0 -0
- remotedesktop-0.17.0/docs/media/server-demo.gif +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/pyproject.toml +47 -46
- remotedesktop-0.17.0/readme.md +129 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/__init__.py +1 -1
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/performance.py +138 -19
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/server.py +94 -3
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/sharing.py +50 -1
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_performance.py +119 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_server_window.py +71 -0
- remotedesktop-0.17.0/tools/make_demo_gifs.py +287 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/uv.lock +384 -332
- remotedesktop-0.14.0/PKG-INFO +0 -137
- remotedesktop-0.14.0/readme.md +0 -118
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/.github/workflows/ci.yml +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/.gitignore +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/LICENSE +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/run_claude.bat +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/run_client.bat +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/run_server.bat +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/scripts/make_coverage_badge.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/scripts/make_venv.bat +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/autostart.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/client.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/clipboard.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/config.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/db.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/discovery.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/dxgi.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/frames.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/icon.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/input_injection.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/inventory.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/logs.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/modal_loop.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/preferences.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/protocol.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/tls.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/viewer.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/src/remotedesktop/window_state.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/conftest.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_autostart.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_client_window.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_clipboard.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_config.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_discovery.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_dxgi.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_frames.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_icon.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_input.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_input_injection.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_inventory.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_logs.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_modal_loop.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_preferences.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_protocol.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_sharing.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_smoke.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_tls.py +0 -0
- {remotedesktop-0.14.0 → remotedesktop-0.17.0}/tests/test_window_state.py +0 -0
|
@@ -51,7 +51,7 @@ Managed with `uv` (hatchling build backend, src layout):
|
|
|
51
51
|
- **Log exchange**: either side can fetch the peer's debug log over the connection (`{"type": "log_request"}` → `{"type": "log", "text": ...}`, admitted streams only). `ShareServer`/`ShareClient` take a `log_provider=` callable (the windows pass `logs.read_log_tail("server"/"client")`, capped at `logs.TAIL_BYTES`); a missing provider/file answers with a placeholder rather than hanging the requester. Both windows have a "Get client log"/"Get server log" button in the Connection log tab; the reply opens a `logs.PeerLogDialog`. The server requests from the most recently admitted stream.
|
|
52
52
|
- **Injection is isolated behind `InputInjector`** (`input_injection.py`, Windows `SendInput` via ctypes; inert stub off-Windows). ShareServer takes an `injector=` param so tests pass a recording fake — **never let tests construct a real `InputInjector`, or they will move the host's actual mouse/keyboard.** Normalized 0..1 coords map directly to SendInput's 0..65535 absolute range over the primary monitor.
|
|
53
53
|
- **Transport is TLS + a token handshake** (`tls.py`, `sharing.py`, `config.py`). The Qt SSL backend here is Windows **schannel** (no OpenSSL); it does complete server-side TLS with a `cryptography`-generated self-signed cert loaded from PEM (verified), but be wary of schannel-specific quirks if you change the config. The server persists a self-signed cert/key under the config dir (`tls.load_or_create_credentials`; `ShareServer(credentials=...)`, or ephemeral if omitted). The client connects with `connectToHostEncrypted`, ignores the expected self-signed cert errors (`PeerVerifyMode.VerifyNone`), and pins the cert fingerprint **softly** — a change is logged but does *not* block the connection (robustness over strict security, per the trusted-LAN intent). Authentication: on first connect the server user approves and the server issues a random token (`PairedClients.pair`, stored server-side by client-id; client stores it in `KnownServers` keyed by `host:port` with the fingerprint). On reconnect the client sends the token in its hello and is admitted with no prompt; a missing/invalid token just falls back to re-approval (never hard-fails). **Do not reintroduce hard cert-pinning or challenge-response** — the user explicitly wanted robust connections over maximum security.
|
|
54
|
-
- **Performance monitoring** (`performance.py` + `preferences.py`): `PerformanceMonitor` is an opt-in collaborator (`performance=` on `ShareServer`/`ShareClient`, the `clipboard=` pattern — plain sharing tests leave it off). While admitted streams are attached, a 1 s QTimer samples `MessageStream.bytes_sent/bytes_received` counters into rolling `MetricSeries` (bandwidth, aggregated across streams via per-stream baselines) and pings the most recently admitted stream: `{"type": "ping", "id", "rtt"}` / `{"type": "pong", "id"}` — each side measures its own RTT and piggybacks it on its next ping so both ends graph both directions; peers without the feature ignore pings harmlessly (RTT graphs show "no data"). Ping/pong is admitted-streams-only on the server, like input/clipboard. Both windows have a "Performance" tab (`PerformanceTab`, custom QPainter graphs) that schedules **no paint work while hidden** (gated on `isVisible()`, repaint on `showEvent`) and a "Preferences" tab whose history-window setting persists via the `Settings` store (`performance_window_seconds`, default 120). The monitor's timer runs only while streams are attached; all timing is `time.monotonic()` with an injectable `clock=` for tests — never monkeypatch `time.monotonic` (the test `pump()` helper depends on it).
|
|
54
|
+
- **Performance monitoring** (`performance.py` + `preferences.py`): `PerformanceMonitor` is an opt-in collaborator (`performance=` on `ShareServer`/`ShareClient`, the `clipboard=` pattern — plain sharing tests leave it off). While admitted streams are attached, a 1 s QTimer samples `MessageStream.bytes_sent/bytes_received` counters into rolling `MetricSeries` (bandwidth, aggregated across streams via per-stream baselines) and pings **every** attached stream (each ping id maps to its stream; a pong is honored only on the stream it was sent to). The graphs' RTT series follow only the *active* (most recently admitted) stream; per-stream send/recv/RTT snapshots come from `metrics_for(stream)` and feed the server's Status-tab `ViewersTable` (`server.py`), which joins them with `ShareServer.viewers()` — identity fields (`user`/`host`/`os`) that the client hello reports (`_client_details()`; missing on old clients, shown as dashes). The ping is: `{"type": "ping", "id", "rtt"}` / `{"type": "pong", "id"}` — each side measures its own RTT and piggybacks it on its next ping so both ends graph both directions; peers without the feature ignore pings harmlessly (RTT graphs show "no data"). Ping/pong is admitted-streams-only on the server, like input/clipboard. Both windows have a "Performance" tab (`PerformanceTab`, custom QPainter graphs) that schedules **no paint work while hidden** (gated on `isVisible()`, repaint on `showEvent`) and a "Preferences" tab whose history-window setting persists via the `Settings` store (`performance_window_seconds`, default 120). The monitor's timer runs only while streams are attached; all timing is `time.monotonic()` with an injectable `clock=` for tests — never monkeypatch `time.monotonic` (the test `pump()` helper depends on it).
|
|
55
55
|
- **Clipboard sync is bidirectional** (`clipboard.py` `ClipboardSync`): client copy → server and server copy → all clients, as `{"type": "clipboard", "text"/"image_png"}` messages. It's opt-in — `ShareServer`/`ShareClient` take a `clipboard=` param and do nothing with clipboard if it's None, so only the GUIs (and clipboard tests) enable it; **plain sharing/input tests must leave it off to avoid touching the real OS clipboard.** Echo/loop prevention is by *content signature*, not just a guard flag, because Windows fires `QClipboard.dataChanged` asynchronously (after a flag would be cleared); image signatures hash canonical RGBA pixels so a re-encoded PNG round trip doesn't loop. Server only accepts clipboard from streams past the approval handshake. Tests use a `FakeClipboard(QObject)` with a `changed` signal and recording `apply()` so two independent clipboards exist in one process.
|
|
56
56
|
- The package version lives only in `src/remotedesktop/__init__.py` (`__version__`); hatchling reads it from there (`[tool.hatch.version]`), so bump it in that one place.
|
|
57
57
|
- Widget tests need a `QApplication`; use the session-scoped `qapp` fixture in `tests/conftest.py`.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: remotedesktop
|
|
3
|
+
Version: 0.17.0
|
|
4
|
+
Summary: Remote desktop client/server for Windows computers on the same LAN, with autodiscovery. Provides screen, keyboard, mouse, and clipboard sharing without RDP or Microsoft authentication.
|
|
5
|
+
Author-email: James Abel <j@abel.co>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
9
|
+
Classifier: Environment :: Win32 (MS Windows)
|
|
10
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: System :: Networking
|
|
14
|
+
Requires-Python: >=3.14
|
|
15
|
+
Requires-Dist: cryptography>=49.0.0
|
|
16
|
+
Requires-Dist: platformdirs>=4.10.0
|
|
17
|
+
Requires-Dist: pyside6>=6.11.1
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# Remote Desktop
|
|
21
|
+
|
|
22
|
+
[](https://github.com/jamesabel/remotedesktop/actions/workflows/ci.yml)
|
|
23
|
+

|
|
24
|
+
[](https://pypi.org/project/remotedesktop/)
|
|
25
|
+

|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
**Lossless, low-latency remote desktop for Windows computers on your LAN — pure Python, zero configuration.**
|
|
29
|
+
|
|
30
|
+
Run the server on the computer you want to reach and the client anywhere else
|
|
31
|
+
on the network: the server is discovered automatically, the first connection
|
|
32
|
+
is approved with one click on the server side, and from then on the client
|
|
33
|
+
reconnects instantly whenever the server is running. The screen stream is
|
|
34
|
+
pixel-exact at full resolution — built for documents, code, and terminals
|
|
35
|
+
rather than video — captured with DXGI desktop duplication and delta-compressed
|
|
36
|
+
so only the parts of the screen that changed are sent. No Windows RDP, no
|
|
37
|
+
Microsoft accounts, no cloud: just two apps and your LAN.
|
|
38
|
+
|
|
39
|
+
## See it in action
|
|
40
|
+
|
|
41
|
+
### Client
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
The client discovers the server on the LAN, connects, and streams its
|
|
46
|
+
desktop live in the *Remote Screen* tab — click into the view and your mouse
|
|
47
|
+
and keyboard control the remote machine. The *Performance* tab graphs
|
|
48
|
+
bandwidth and round-trip time with live statistics.
|
|
49
|
+
|
|
50
|
+
### Server
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
The server's *Status* tab shows every connected viewer — who they are (login
|
|
55
|
+
name, computer, OS) and how the connection is doing (bandwidth, round-trip
|
|
56
|
+
time with mean/min/max/p99/jitter over the recent window).
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
- 🔍 **Autodiscovery** — servers announce themselves over UDP; the client lists every server on the LAN, no addresses to type.
|
|
61
|
+
- 🖥️ **Lossless screen sharing** — pixel-exact at full resolution, DXGI desktop-duplication capture (~10 ms per 4K frame), and inter-frame delta compression: an unchanged screen sends nothing.
|
|
62
|
+
- ⌨️🖱️ **Full input control** — mouse, wheel, and keyboard forwarding that is safe against interruptions: anything still held down is released on the server if the viewer loses focus or disconnects, so no stuck keys.
|
|
63
|
+
- 📋 **Two-way clipboard** — text and images copied on either machine appear on the other.
|
|
64
|
+
- 🔒 **TLS + approve-once pairing** — every connection is encrypted; the server user approves a new client once, after which it reconnects with a stored token and no prompt.
|
|
65
|
+
- 📊 **Built-in performance monitoring** — live bandwidth and round-trip-time graphs with window statistics (mean/min/max/p99/jitter), plus a per-viewer table on the server.
|
|
66
|
+
- 🔁 **Robust connections** — dead connections are detected and dropped within seconds, and approved clients reconnect automatically without ceremony.
|
|
67
|
+
- 🚀 **Hands-off operation** — optional start-at-login (per-user, no admin rights) and a *Restart server* button usable from the remote session itself, so you can update the software without visiting the machine.
|
|
68
|
+
- 🗃️ **Persistent peer inventory** — both apps keep a SQLite-backed history of every peer seen on the LAN, with one-click *revoke access* / *forget server*.
|
|
69
|
+
|
|
70
|
+
In scope: screen, keyboard, mouse, and clipboard. Out of scope: shared
|
|
71
|
+
drives, devices, and audio — and smooth playback of fast-changing
|
|
72
|
+
full-screen content (video, games) is a non-goal; the stream is optimized
|
|
73
|
+
for mostly-static desktop work.
|
|
74
|
+
|
|
75
|
+
## Installation
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
pip install remotedesktop
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
or, with [uv](https://docs.astral.sh/uv/):
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
uv tool install remotedesktop
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Or run straight from a clone of this repository: double-click
|
|
88
|
+
`run_server.bat` on the computer to be shared and `run_client.bat` on the
|
|
89
|
+
viewing computer — each prepares the environment on first use and launches
|
|
90
|
+
the app.
|
|
91
|
+
|
|
92
|
+
## Quick start
|
|
93
|
+
|
|
94
|
+
1. On the computer to share, run `remotedesktop-server`.
|
|
95
|
+
2. On the viewing computer, run `remotedesktop-client` — the server appears
|
|
96
|
+
in its *Servers* panel; double-click it.
|
|
97
|
+
3. Approve the connection in the dialog that pops up on the server. That's
|
|
98
|
+
it — future connections from that client need no approval.
|
|
99
|
+
|
|
100
|
+
From a terminal in a clone of this repo, the same apps run with
|
|
101
|
+
`uv run remotedesktop-server` and `uv run remotedesktop-client`.
|
|
102
|
+
|
|
103
|
+
## Security model
|
|
104
|
+
|
|
105
|
+
Connections are TLS-encrypted with a self-signed certificate the server
|
|
106
|
+
generates once and keeps. The trust model is tuned for a **trusted LAN**:
|
|
107
|
+
certificates are trusted on first use and a changed fingerprint is logged
|
|
108
|
+
rather than blocking the connection, favoring reliable reconnection over
|
|
109
|
+
strict certificate checking. Unapproved clients are limited to small
|
|
110
|
+
handshake messages until the server user admits them; access can be revoked
|
|
111
|
+
at any time from the server's *Clients on LAN* tab. There is no dependency
|
|
112
|
+
on Windows RDP or any Microsoft-based authentication.
|
|
113
|
+
|
|
114
|
+
## Requirements
|
|
115
|
+
|
|
116
|
+
- Windows
|
|
117
|
+
- Python 3.14+
|
|
118
|
+
|
|
119
|
+
## How discovery works
|
|
120
|
+
|
|
121
|
+
The client broadcasts a small JSON probe over UDP (port 48653); each server
|
|
122
|
+
on the LAN replies with its hostname and connection port. Windows Firewall
|
|
123
|
+
must allow Python to receive inbound UDP on that port for a server to be
|
|
124
|
+
discoverable from other machines.
|
|
125
|
+
|
|
126
|
+
## Development
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
uv sync # set up the environment
|
|
130
|
+
uv run pytest # run the tests
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Run the tests from PowerShell or cmd, not Git Bash: Git Bash puts Git's
|
|
134
|
+
MinGW OpenSSL DLLs on `PATH`, which Qt's TLS backend loads and crashes on.
|
|
135
|
+
From PowerShell, Qt uses the Windows schannel backend as intended.
|
|
136
|
+
|
|
137
|
+
The demo GIFs above are generated — entirely from synthetic data — by
|
|
138
|
+
`uv run python tools/make_demo_gifs.py`.
|
|
139
|
+
|
|
140
|
+
### The `badges` branch
|
|
141
|
+
|
|
142
|
+
The coverage badge above is served from the `badges` branch
|
|
143
|
+
(`raw.githubusercontent.com/.../badges/coverage.svg`). CI regenerates the
|
|
144
|
+
SVG after each test run on `master` and force-pushes it there as a single
|
|
145
|
+
orphan commit. It lives on its own branch because `master` only accepts
|
|
146
|
+
pull requests (a repository ruleset), so CI cannot commit to it directly;
|
|
147
|
+
keeping the badge in the repo avoids depending on an external coverage
|
|
148
|
+
service. The branch is generated output — never branch from it or merge it.
|
|
Binary file
|
|
Binary file
|
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "remotedesktop"
|
|
3
|
-
dynamic = ["version"]
|
|
4
|
-
description = "Remote desktop client/server for Windows computers on the same LAN, with autodiscovery. Provides screen, keyboard, mouse, and clipboard sharing without RDP or Microsoft authentication."
|
|
5
|
-
readme = "readme.md"
|
|
6
|
-
license = "MIT"
|
|
7
|
-
authors = [{ name = "James Abel", email = "j@abel.co" }]
|
|
8
|
-
requires-python = ">=3.14"
|
|
9
|
-
classifiers = [
|
|
10
|
-
"Development Status :: 2 - Pre-Alpha",
|
|
11
|
-
"Environment :: Win32 (MS Windows)",
|
|
12
|
-
"Intended Audience :: End Users/Desktop",
|
|
13
|
-
"Operating System :: Microsoft :: Windows",
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Topic :: System :: Networking",
|
|
16
|
-
]
|
|
17
|
-
dependencies = [
|
|
18
|
-
"cryptography>=49.0.0",
|
|
19
|
-
"platformdirs>=4.10.0",
|
|
20
|
-
"pyside6>=6.11.1",
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
[project.gui-scripts]
|
|
24
|
-
remotedesktop-client = "remotedesktop.client:main"
|
|
25
|
-
remotedesktop-server = "remotedesktop.server:main"
|
|
26
|
-
|
|
27
|
-
[dependency-groups]
|
|
28
|
-
dev = [
|
|
29
|
-
"
|
|
30
|
-
"pytest
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
#
|
|
46
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "remotedesktop"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
description = "Remote desktop client/server for Windows computers on the same LAN, with autodiscovery. Provides screen, keyboard, mouse, and clipboard sharing without RDP or Microsoft authentication."
|
|
5
|
+
readme = "readme.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
authors = [{ name = "James Abel", email = "j@abel.co" }]
|
|
8
|
+
requires-python = ">=3.14"
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
11
|
+
"Environment :: Win32 (MS Windows)",
|
|
12
|
+
"Intended Audience :: End Users/Desktop",
|
|
13
|
+
"Operating System :: Microsoft :: Windows",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Topic :: System :: Networking",
|
|
16
|
+
]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"cryptography>=49.0.0",
|
|
19
|
+
"platformdirs>=4.10.0",
|
|
20
|
+
"pyside6>=6.11.1",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.gui-scripts]
|
|
24
|
+
remotedesktop-client = "remotedesktop.client:main"
|
|
25
|
+
remotedesktop-server = "remotedesktop.server:main"
|
|
26
|
+
|
|
27
|
+
[dependency-groups]
|
|
28
|
+
dev = [
|
|
29
|
+
"pillow>=12.3.0",
|
|
30
|
+
"pytest>=8",
|
|
31
|
+
"pytest-cov>=7.1.0",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[build-system]
|
|
35
|
+
requires = ["hatchling"]
|
|
36
|
+
build-backend = "hatchling.build"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.version]
|
|
39
|
+
path = "src/remotedesktop/__init__.py"
|
|
40
|
+
|
|
41
|
+
[tool.pytest.ini_options]
|
|
42
|
+
testpaths = ["tests"]
|
|
43
|
+
|
|
44
|
+
[tool.ty.environment]
|
|
45
|
+
# The app targets Windows (SendInput via ctypes.windll); type-check as such
|
|
46
|
+
# even when ty runs on a Linux CI runner.
|
|
47
|
+
python-platform = "win32"
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Remote Desktop
|
|
2
|
+
|
|
3
|
+
[](https://github.com/jamesabel/remotedesktop/actions/workflows/ci.yml)
|
|
4
|
+

|
|
5
|
+
[](https://pypi.org/project/remotedesktop/)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
**Lossless, low-latency remote desktop for Windows computers on your LAN — pure Python, zero configuration.**
|
|
10
|
+
|
|
11
|
+
Run the server on the computer you want to reach and the client anywhere else
|
|
12
|
+
on the network: the server is discovered automatically, the first connection
|
|
13
|
+
is approved with one click on the server side, and from then on the client
|
|
14
|
+
reconnects instantly whenever the server is running. The screen stream is
|
|
15
|
+
pixel-exact at full resolution — built for documents, code, and terminals
|
|
16
|
+
rather than video — captured with DXGI desktop duplication and delta-compressed
|
|
17
|
+
so only the parts of the screen that changed are sent. No Windows RDP, no
|
|
18
|
+
Microsoft accounts, no cloud: just two apps and your LAN.
|
|
19
|
+
|
|
20
|
+
## See it in action
|
|
21
|
+
|
|
22
|
+
### Client
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
The client discovers the server on the LAN, connects, and streams its
|
|
27
|
+
desktop live in the *Remote Screen* tab — click into the view and your mouse
|
|
28
|
+
and keyboard control the remote machine. The *Performance* tab graphs
|
|
29
|
+
bandwidth and round-trip time with live statistics.
|
|
30
|
+
|
|
31
|
+
### Server
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
The server's *Status* tab shows every connected viewer — who they are (login
|
|
36
|
+
name, computer, OS) and how the connection is doing (bandwidth, round-trip
|
|
37
|
+
time with mean/min/max/p99/jitter over the recent window).
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- 🔍 **Autodiscovery** — servers announce themselves over UDP; the client lists every server on the LAN, no addresses to type.
|
|
42
|
+
- 🖥️ **Lossless screen sharing** — pixel-exact at full resolution, DXGI desktop-duplication capture (~10 ms per 4K frame), and inter-frame delta compression: an unchanged screen sends nothing.
|
|
43
|
+
- ⌨️🖱️ **Full input control** — mouse, wheel, and keyboard forwarding that is safe against interruptions: anything still held down is released on the server if the viewer loses focus or disconnects, so no stuck keys.
|
|
44
|
+
- 📋 **Two-way clipboard** — text and images copied on either machine appear on the other.
|
|
45
|
+
- 🔒 **TLS + approve-once pairing** — every connection is encrypted; the server user approves a new client once, after which it reconnects with a stored token and no prompt.
|
|
46
|
+
- 📊 **Built-in performance monitoring** — live bandwidth and round-trip-time graphs with window statistics (mean/min/max/p99/jitter), plus a per-viewer table on the server.
|
|
47
|
+
- 🔁 **Robust connections** — dead connections are detected and dropped within seconds, and approved clients reconnect automatically without ceremony.
|
|
48
|
+
- 🚀 **Hands-off operation** — optional start-at-login (per-user, no admin rights) and a *Restart server* button usable from the remote session itself, so you can update the software without visiting the machine.
|
|
49
|
+
- 🗃️ **Persistent peer inventory** — both apps keep a SQLite-backed history of every peer seen on the LAN, with one-click *revoke access* / *forget server*.
|
|
50
|
+
|
|
51
|
+
In scope: screen, keyboard, mouse, and clipboard. Out of scope: shared
|
|
52
|
+
drives, devices, and audio — and smooth playback of fast-changing
|
|
53
|
+
full-screen content (video, games) is a non-goal; the stream is optimized
|
|
54
|
+
for mostly-static desktop work.
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
pip install remotedesktop
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
or, with [uv](https://docs.astral.sh/uv/):
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
uv tool install remotedesktop
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Or run straight from a clone of this repository: double-click
|
|
69
|
+
`run_server.bat` on the computer to be shared and `run_client.bat` on the
|
|
70
|
+
viewing computer — each prepares the environment on first use and launches
|
|
71
|
+
the app.
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
1. On the computer to share, run `remotedesktop-server`.
|
|
76
|
+
2. On the viewing computer, run `remotedesktop-client` — the server appears
|
|
77
|
+
in its *Servers* panel; double-click it.
|
|
78
|
+
3. Approve the connection in the dialog that pops up on the server. That's
|
|
79
|
+
it — future connections from that client need no approval.
|
|
80
|
+
|
|
81
|
+
From a terminal in a clone of this repo, the same apps run with
|
|
82
|
+
`uv run remotedesktop-server` and `uv run remotedesktop-client`.
|
|
83
|
+
|
|
84
|
+
## Security model
|
|
85
|
+
|
|
86
|
+
Connections are TLS-encrypted with a self-signed certificate the server
|
|
87
|
+
generates once and keeps. The trust model is tuned for a **trusted LAN**:
|
|
88
|
+
certificates are trusted on first use and a changed fingerprint is logged
|
|
89
|
+
rather than blocking the connection, favoring reliable reconnection over
|
|
90
|
+
strict certificate checking. Unapproved clients are limited to small
|
|
91
|
+
handshake messages until the server user admits them; access can be revoked
|
|
92
|
+
at any time from the server's *Clients on LAN* tab. There is no dependency
|
|
93
|
+
on Windows RDP or any Microsoft-based authentication.
|
|
94
|
+
|
|
95
|
+
## Requirements
|
|
96
|
+
|
|
97
|
+
- Windows
|
|
98
|
+
- Python 3.14+
|
|
99
|
+
|
|
100
|
+
## How discovery works
|
|
101
|
+
|
|
102
|
+
The client broadcasts a small JSON probe over UDP (port 48653); each server
|
|
103
|
+
on the LAN replies with its hostname and connection port. Windows Firewall
|
|
104
|
+
must allow Python to receive inbound UDP on that port for a server to be
|
|
105
|
+
discoverable from other machines.
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
uv sync # set up the environment
|
|
111
|
+
uv run pytest # run the tests
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Run the tests from PowerShell or cmd, not Git Bash: Git Bash puts Git's
|
|
115
|
+
MinGW OpenSSL DLLs on `PATH`, which Qt's TLS backend loads and crashes on.
|
|
116
|
+
From PowerShell, Qt uses the Windows schannel backend as intended.
|
|
117
|
+
|
|
118
|
+
The demo GIFs above are generated — entirely from synthetic data — by
|
|
119
|
+
`uv run python tools/make_demo_gifs.py`.
|
|
120
|
+
|
|
121
|
+
### The `badges` branch
|
|
122
|
+
|
|
123
|
+
The coverage badge above is served from the `badges` branch
|
|
124
|
+
(`raw.githubusercontent.com/.../badges/coverage.svg`). CI regenerates the
|
|
125
|
+
SVG after each test run on `master` and force-pushes it there as a single
|
|
126
|
+
orphan commit. It lives on its own branch because `master` only accepts
|
|
127
|
+
pull requests (a repository ruleset), so CI cannot commit to it directly;
|
|
128
|
+
keeping the badge in the repo avoids depending on an external coverage
|
|
129
|
+
service. The branch is generated output — never branch from it or merge it.
|