Skip to content
poroburuPublic

About

C++ live packet-capture layer for kparser2.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

kpacket - Advanced FFXI Packet Relay System

A high-performance ZeroMQ-based packet relay system for Final Fantasy XI that captures, analyzes, and streams game packets in real-time.

Features

  • Real-time Packet Streaming - Live packet capture and distribution via ZeroMQ
  • Multi-Socket Architecture - PUB/SUB for streaming, REQ/REP for commands, PUSH/PULL for reliability
  • Packet Classification - Automatic categorization based on XiPackets documentation
  • JSON Serialization - Human-readable packet format with metadata
  • Command Interface - Remote control and packet injection capabilities
  • High Performance - Multi-threaded design with minimal latency
  • Extensible - Modular architecture for custom analyzers and tools

Quick Start

Prerequisites

  • Windows 10/11
  • Visual Studio 2019/2022 or compatible C++ compiler
  • CMake 3.22+
  • vcpkg package manager
  • Ashita v4 SDK

Required Dependencies

Install via vcpkg:

vcpkg install cppzmq nlohmann-json

Building

Preferred on this machine (HorizonXI deploy):

# Close HorizonXI / Ashita first so plugins\kpacket.dll is not locked.
powershell -File C:\Users\porob\git\kdev\kpacket2\build.ps1

That configures against the installed Ashita SDK (%APPDATA%\HorizonXI-Launcher\HorizonXI\Game\plugins\sdk) and copies kpacket.dll plus libzmq into plugins\.

Manual CMake:

  1. Clone the repository with submodules
  2. Point ASHITA4_SDK_PATH at the current launcher SDK (interface 4.30 as of Ashita 4.3)
  3. Configure: cmake --preset=x86-release-win
  4. Build: cmake --build out/build/x86-release-win --config Release

Rebuild after every HorizonXI / Ashita SDK bump. Ashita 4.3 requires the plugin to export expCreatePlugin, expDestroyPlugin, and expGetInterfaceVersion. A DLL built before 4.3 fails /load with missing required exports or an interface-version mismatch.

Usage

  1. Load the plugin in Ashita: /load kpacket (Ashita log: ZMQ relay system initialized successfully)
  2. Start the packet monitor client: ./bin/examples/packet_monitor.exe
  3. Connect your tools to ZMQ endpoints:
    • tcp://localhost:5555 - Packet streaming (SUB)
    • tcp://localhost:5556 - Commands (REQ)
    • tcp://localhost:5557 - Reliable queue (PULL)

Packet Format

Packets are streamed as JSON messages with comprehensive metadata including timestamp, direction, packet type, and base64-encoded data.

Compatibility

Paired RC tags: kpacket2 v0.1.0-rc.1 ↔ kparser2 v0.1.0-rc.1 ↔ wire kpacket.v1.

  • Git semver is in the root VERSION file; hello / status on :5556 expose release_version.
  • Wire version in JSON meta remains v1 until a breaking protocol change.

Documentation

See docs/DESIGN.md for detailed architecture and implementation information.

See docs/RELEASING.md for versioned GitHub releases.

License

GNU Lesser General Public License v3.0

About

C++ live packet-capture layer for kparser2.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

Generated from poroburu/exampleplugin