Windower Plugin
- C++ 97.1%
- CMake 1.9%
- C 1%
|
|
||
|---|---|---|
| .forgejo | ||
| include/vanaportal | ||
| resources | ||
| src | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LICENSE | ||
| README.md | ||
Vanaportal
Vanaportal is a plugin for Windower v4 that acts as a workaround to submit data from the Lua addon of the same name. The reason for this workaround is to avoid freezes caused by limitations in Windower’s Lua engine.
Install Plugin and client
Place the vanaportal.dll in /plugins/ folder and the vanaportal_client.exe in /plugins/Vanaportal/ folder.
For convenience, copy the plugin folder as a whole from releases.
config.ini- plugin settings (key_id,link_token).state.ini- internal plugin state (signing secret encrypted using Windows DPAPI, only your user on this machine can access it). The file is hidden by defaultplugin.log- Troubleshooting logs
Plugin process
- Initialize with
vp_plugin_initialize(plugin_root). - On first setup, call
vp_plugin_bootstrap_link():- Registers addon credentials (
/api/v1/addon/register) if missing. - Requests one-time link token (
/api/v1/addon/link-token) using signed headers. - Persists
key_idandlink_tokeninconfig.ini. - Persists signing secret in
.state.ini.
- Registers addon credentials (
- Read
vp_plugin_get_key_id()andvp_plugin_get_link_token()for the link step on vanaportal.com - Submit payloads with
vp_plugin_submit_payload(payload_json):- Sends to
/api/v1/sync/character- most character data - Sends to
/api/v1/sync/character/warpsfor warp data (homepoints, survival guides and waypoints) - Signs headers for authentication with the backend.
- Retries failures (408/429/5xx)
- Sends to
Localhost client (vanaportal_client)
vanaportal_client is a standalone process for silent addon transport (API client wrapper).
- Listens on
127.0.0.1:39777 - Receives one framed payload:
4-byte big-endian length+ raw JSON. - Enqueues payload into the same signed/retry pipeline used by the plugin core.
- Returns 5-byte ACK:
- byte 0:
1accepted /0rejected - bytes 1-4: signed 32-bit error code (big-endian)
- byte 0:
Client process:
vp_plugin_initialize(...)startsvanaportal_client.exevp_plugin_shutdown()stops that client process.
Error codes:
- 0 ok
- 1 not initialized
- 2 invalid argument
- 5 registration failed
- 6 link token failed
- 7 missing credentials
- 8 ingress limit reached
- 9 ingress session not found
- 10 ingress sequence mismatch
- 11 ingress decode failed
- 12 ingress length mismatch
- 13 ingress too large
- 15 send signing failed
plugin.log in the plugin folder (truncated when it grows beyond ~1 MiB).
Build Instructions
Windows
Visual Studio Build Tools / Visual Studio (RECOMMENDED)
Alternatively:
- cmake,
- ninja,
- C++20 compiler,
- 32-bit x86 toolchain support
Linux Dependencies
Ubuntu 24.04 or higher / Debian 13 or higher
sudo apt install cmake ninja-build g++-mingw-w64-i686 binutils-mingw-w64-i686
Fedora
sudo dnf install cmake ninja-build mingw32-gcc-c++ mingw32-binutils
Arch Linux
sudo pacman -S cmake ninja mingw-w64-gcc