mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-25 08:27:44 +00:00
Add CONTRIBUTING guide, detailing packet capture and updating to latest patch
This commit is contained in:
parent
1e343d0f10
commit
af6f95fa61
4 changed files with 36 additions and 4 deletions
27
CONTRIBUTING.md
Normal file
27
CONTRIBUTING.md
Normal 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.
|
|
@ -18,7 +18,11 @@ Only the Global region is supported. Only the Windows client is supported. Suppo
|
||||||
|
|
||||||
## Running
|
## 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
|
## Credits & Thank You
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,9 @@ pub mod login;
|
||||||
/// Patch server-specific code.
|
/// Patch server-specific code.
|
||||||
pub mod patch;
|
pub mod patch;
|
||||||
|
|
||||||
|
/// Used in the encryption key.
|
||||||
|
const GAME_VERSION: u16 = 7000;
|
||||||
|
|
||||||
/// Supported boot version.
|
/// Supported boot version.
|
||||||
pub const SUPPORTED_BOOT_VERSION: Version = Version("2025.01.10.0000.0001");
|
pub const SUPPORTED_BOOT_VERSION: Version = Version("2025.01.10.0000.0001");
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,10 @@ use std::io::Cursor;
|
||||||
|
|
||||||
use binrw::BinResult;
|
use binrw::BinResult;
|
||||||
|
|
||||||
use crate::blowfish::Blowfish;
|
use crate::{GAME_VERSION, blowfish::Blowfish};
|
||||||
|
|
||||||
use super::ReadWriteIpcSegment;
|
use super::ReadWriteIpcSegment;
|
||||||
|
|
||||||
const GAME_VERSION: u16 = 7000;
|
|
||||||
|
|
||||||
pub fn generate_encryption_key(key: &[u8], phrase: &str) -> [u8; 16] {
|
pub fn generate_encryption_key(key: &[u8], phrase: &str) -> [u8; 16] {
|
||||||
let mut base_key = vec![0x78, 0x56, 0x34, 0x12];
|
let mut base_key = vec![0x78, 0x56, 0x34, 0x12];
|
||||||
base_key.extend_from_slice(key);
|
base_key.extend_from_slice(key);
|
||||||
|
|
Loading…
Add table
Reference in a new issue