1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-25 00:17:45 +00:00

Add CONTRIBUTING guide, detailing packet capture and updating to latest patch

This commit is contained in:
Joshua Goins 2025-03-23 08:33:07 -04:00
parent 1e343d0f10
commit af6f95fa61
4 changed files with 36 additions and 4 deletions

27
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,27 @@
# Contributing and working on Kawari
Here are various helpful resources and tips when working on Kawari.
## Packet capture
The well-tested packet capturing solutions are [TemporalStasis](https://github.com/WorkingRobot/TemporalStasis/) and [Project Chronofoil](https://github.com/ProjectChronofoil). You should use Project Chronofoil under most circumstances, but it requires Dalamud. TemporalStasis works like a standalone proxy server, and can work with a vanilla game.
To extract `.cfcap` captures from Project Chronofoil, use `cfcap-expand` from [XIVPacketTools](https://github.com/redstrate/XIVPacketTools).
## Updating to new patches
Here are the various things that should be checked when updating Kawari to a newer patch:
* Bump the supported game versions in `lib.rs` so the patch server lets you through.
* Double check IPC struct sizes in `calc_size()` if the structures changed.
* Replace testing data in `resources/tests` and re-run the tests.
* The IPC opcodes _will_ change and must all be replaced.
* Check the game version used in the encryption key in `lib.rs`.
## Contributing
Before making a pull request, make sure:
* Kawari compiles and runs fine. At a minimum, you should be able to login to the World server.
* Run `cargo fmt` to ensure your code is formatted.
* Run `cargo clippy` and fix all of the warnings for any new code, to the best of your ability.

View file

@ -18,7 +18,11 @@ Only the Global region is supported. Only the Windows client is supported. Suppo
## Running
A guide to running Kawari can be followed [here](USAGE.md).
Kawari is designed to be easy to run. A guide to running Kawari can be followed [here](USAGE.md).
## Contributing
Pull requests for new features, patch updates, and documentation are welcome. A guide for contributing and updating Kawari can be found [here](CONTRIBUTING.md).
## Credits & Thank You

View file

@ -32,6 +32,9 @@ pub mod login;
/// Patch server-specific code.
pub mod patch;
/// Used in the encryption key.
const GAME_VERSION: u16 = 7000;
/// Supported boot version.
pub const SUPPORTED_BOOT_VERSION: Version = Version("2025.01.10.0000.0001");

View file

@ -2,12 +2,10 @@ use std::io::Cursor;
use binrw::BinResult;
use crate::blowfish::Blowfish;
use crate::{GAME_VERSION, blowfish::Blowfish};
use super::ReadWriteIpcSegment;
const GAME_VERSION: u16 = 7000;
pub fn generate_encryption_key(key: &[u8], phrase: &str) -> [u8; 16] {
let mut base_key = vec![0x78, 0x56, 0x34, 0x12];
base_key.extend_from_slice(key);