Add dvs_enc.py and document the two-module requirement

The client imports its backend from a module named `dvs_enc`, but the
repository only shipped that backend as `qtmain.py`. Starting the application
from a fresh clone therefore failed immediately:

    ModuleNotFoundError: No module named 'dvs_enc'

`dvs_enc.py` is now included. It carries the same content as `qtmain.py`, so
the import resolves to the identical implementation.

Verified end to end:

  - without dvs_enc.py: import qtmain raises ModuleNotFoundError
  - with dvs_enc.py:    import qtmain succeeds, all 14 backend classes present

Functional tests against a clean copy of the repository pass: text
round-trip, 4096-byte binary round-trip, HMAC authentication, AccountDB and
HistoryDB construction.

Also exercised the full client/server protocol against a live relay: register,
login, create group, join group, and ciphertext relay between two clients.
The relay forwards the payload verbatim without inspecting it.

Documentation
- README: new "Module layout" section explaining why both files are required,
  and what the failure looks like when dvs_enc.py is absent; repository layout
  and troubleshooting table updated to match
- CHANGELOG: structure table updated
This commit is contained in:
dvs
2026-09-27 17:16:56 +08:00
parent faf60fd2e5
commit a2d492e9f8
3 changed files with 4189 additions and 2 deletions
+6
View File
@@ -35,8 +35,14 @@ licence.
| File | Role |
|---|---|
| `qtmain.py` | PyQt5 client together with the complete backend |
| `dvs_enc.py` | The backend module that `qtmain.py` imports at runtime |
| `server.py` | Optional central relay server, standard library only |
`dvs_enc.py` carries the same content as `qtmain.py`. The client imports its
backend classes from `dvs_enc`, so both files must be present in the same
directory or startup fails. Shipping it explicitly makes the package complete
on its own.
### Notes
The application code is byte-for-byte identical to the version shipped with