AO2 client (SoF)
Experimental fork of AO2 Client made for Serenade of Flames by Osmium Sorcerer. Features boring cryptography, new audio engine, up-to-date components, various small improvements, and opinions.
Adds SoF extensions compatible with the CSDWASASH server.
Upstream: https://github.com/AttorneyOnline/AO2-Client
This branch is frequently rebased against the upstream master.
My contributions are alternatively available under the MIT license; the project as a whole remains under GPLv3.
Why
I've started working on this primarily to implement secure connections and authentication, which became essential as I was writing CSDWASASH, the server.
Authentication on AO typically involves exchanging plaintext passwords over insecure connections (which are most certainly stored in clear in the server configs). Instead, I proposed public-key authentication. Users have secret keys that they keep on the client (protected by a passphrase). They only share their public keys with the server, so authentication never requires sending secrets or storing them on the server (unlike modpasses).
Next, Secure WebSocket (WSS). The upstream now supports WSS (thank you, sD), and it rightfully prioritizes WSS ports for servers that advertise it on the public list. I rebased my WSS implementation on this idea, additionally extending support to favorite servers and to the direct connect. The UI now provides a clear distinction for WSS servers.
The audio engine has been rewritten, completely getting rid of BASS in favor of miniaudio. BASS was the only proprietary component that had to be separately bundled as a DLL and linked dynamically, so I replaced it with the high-quality, simple, public-domain audio library.
Finally, protocol experiments. Thanks to WebSocket already providing different frames for text and binary messages, I can integrate a custom subprotocol using binary frames while leaving the AO packet distribution in its domain of text frames. The subprotocol is used to implement the authentication with its own wire format. This extended protocol can only be used with CSDWASASH and is incompatible with the vanilla AO.
Other small additions:
- Passworded characters. Specifically, a way for the server to tell the client which characters are passworded. Servers could already use passwords.
- Removed some obsolete features, like unused packets or listing of legacy server entries (we haven't been able to connect to them for a few years now).
- Strictly use HTTPS to connect to the masterserver.
- Show area list by default instead of music, as it's more important.
- IC message input is cleared as soon as the message is sent instead of checking the sender of incoming messages. Should prevent accidental spam.
Limitations: no APNG support, no music flags in the player, extensions only work on CSDWASASH.
Further development:
- AVIF support.
- Proper static linking everywhere. Generally, a sensible build system.
- Removal of legacy cruft (such as the feature list).
- Protocol redesign.
Building
Upstream build scripts are unused, and instead I use CMake directly with LLVM toolchain. Note: this process is bad and barely works.
Three profiles are provided: Release (optimized), Dev (unoptimized, fast build), Debug (added debugging information and AddressSanitizer, slow).
On Linux, with CMake and Ninja:
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_LINKER_TYPE=LLD -GNinja -Bbuildninja -Cbuild
For Windows, I cross-compile via
Clang with
x86_64-pc-windows-gnu target and a custom sysroot (not included in this
repository because it's all dependencies rebuilt from source).
Dependencies (CMake will look for them):
- Qt6: Base, WebSockets, ImageFormats, Tools
- libvorbis
- libopusfile
- libsodium
Additional dependencies you might have to provide manually (in lib):
- Discord RPC if you build with
-DAO_ENABLE_DISCORD_RPC=ON. - APNG image plugin (don't bother, it doesn't work unless you build a fully static plugin).
Credits
The original Attorney Online client was created by FanatSors.
This is an open-source remake of that client created by OmniTroid.
The logo (logo.png and logo.ico) was designed by Lucas Carbí. The characters
depicted in the logo are owned by Capcom.
Copyright
The project is licensed under the GPLv3 license.
Copyright (c) 2016-2018 OmniTroid
Modifications copyright (c) 2017-2018 oldmud0
Case Café additions copyright (c) 2018 Cerapter
Killing Fever Online additions copyright (c) 2019 Crystalwarrior
Serenade of Flames additions © 2026 Osmium Sorcerer
