# KOutNet
KOutNet is a hybrid messenger. On a LAN or VPN it finds peers itself and talks
to them directly. It can also sign into Matrix through a homeserver, and into
Telegram through TDLib (experimental in 0.2). Rocket.Chat and Tox are in the
list but still placeholders.
Written in C++ with Qt 6 and Kirigami. Linux and Windows. Alpha, so expect rough
edges. There is a notes tab and a media player too, so the things you would
normally alt-tab for stay in the same window.
## what works
- Matrix: login, rooms, DMs, media, encrypted rooms
- LAN/VPN: peer discovery, direct chats, voice calls, encrypted transport
- Telegram (experimental): login, text and files, needs TDLib at build time and
an api id/hash from my.telegram.org in settings
- Rocket.Chat, Tox: placeholder pages, nothing is sent
## verifying downloads
Every release tarball comes with a `.sha256` checksum and a detached `.sig`
GPG signature. The public key is `packaging/koutnet-release-public.asc`, also
copied into the tarball. Its fingerprint is:
```text
11E8A93811C0277D1AF284D8A16AFFC7F0D232BB
```
```bash
gpg --import koutnet-release-public.asc
gpg --verify KOutNet-v0.2.0-linux-x86_64.tar.gz.sig KOutNet-v0.2.0-linux-x86_64.tar.gz
sha256sum -c KOutNet-v0.2.0-linux-x86_64.tar.gz.sha256
```
## build
Needs Qt 6.4+, KDE Frameworks 6.8+, kirigami-addons 1.8+, libquotient 0.9+,
libsodium, OpenSSL, TDLib (`tdjson`), extra-cmake-modules, CMake, Ninja and a
compiler with C++23 support. On Linux glibc 2.34+.
TDLib is required from 0.2 on: configure stops with an error when `pkg-config`
cannot find `tdjson`. The version shipped by openSUSE Tumbleweed is known to
work.
```bash
git clone https://invent.kde.org/bitzuka/koutnetwork.git
cd koutnetwork
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
cmake --build build --parallel
./build/bin/KOutNet
```
To install:
```bash
sudo cmake --install build
```
Or configure with `-DCMAKE_INSTALL_PREFIX="$HOME/.local"` and install without
sudo.
Distro packages for KF6 are often too old. A rolling release or KDE neon works.
The CI uses openSUSE Tumbleweed and these exact packages:
openSUSE Tumbleweed
```bash
sudo zypper install gcc-c++ cmake ninja pkgconf-pkg-config kf6-extra-cmake-modules \
'cmake(Qt6Core)' 'cmake(Qt6Gui)' 'cmake(Qt6Qml)' 'cmake(Qt6Quick)' 'cmake(Qt6QuickControls2)' \
'cmake(Qt6QuickDialogs2)' 'cmake(Qt6Multimedia)' 'cmake(Qt6Network)' 'cmake(Qt6Positioning)' \
'cmake(Qt6Widgets)' 'cmake(Qt6Test)' 'cmake(KF6Config)' 'cmake(KF6CoreAddons)' 'cmake(KF6I18n)' \
'cmake(KF6IdleTime)' 'cmake(KF6Kirigami)' 'cmake(KF6Notifications)' 'cmake(KF6StatusNotifierItem)' \
'cmake(KF6Wallet)' 'cmake(KF6ColorScheme)' 'cmake(KF6KirigamiAddons)' 'cmake(QuotientQt6)' \
'pkgconfig(libsodium)' 'pkgconfig(libopenssl)' 'pkgconfig(tdjson)'
```
On other distros install the development packages for the same modules.
Configure names the one it cannot find.
Windows: see `build-windows.ps1` and `packaging/windows/README.md`.
## tests
Configure without `-DBUILD_TESTING=OFF` first.
```bash
ctest --test-dir build --output-on-failure
```
The tests need no display and no network.
## privacy
DMs and calls use TLS 1.3 and pin the peer certificate on first contact. Group
chats add a per-group key. That gives forward secrecy, not identity: the
certificate is derived from the identity seed, so whoever holds the seed can
claim the identity and the pin will not notice. The seed lives in the system key
store, KWallet on KDE. Protect the seed, not the certificate file.
TOFU pins live in `/tofu-pins` (one line per peer:
`\t`). If a peer's key legitimately changed,
verify the new fingerprint out of band, remove that peer's line or use the
trust reset action, then reconnect. Never reset a pin without checking first.
History is sealed with a key from the same store, so the files under
`~/.local/share/KOutNet/history/` are not plain text. Without a key store,
history stays off disk.
## borrowed code and art
- [NeoChat](https://invent.kde.org/network/neochat): the emoji picker and
tables, text handler, poll events and notifications
- [plasma-welcome](https://invent.kde.org/plasma/plasma-welcome): the shape of
the first run tour and its mock applets
- Konoka mascot by Matvey Shcherbinin, CC BY-SA 4.0: the two welcome tour
pictures
## license
GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL. Full texts in `LICENSES/`.
Tasks and bugs: https://tasks.koutnet.pw