Genshin Impact server reverse engineering project
Find a file
2024-08-26 15:29:56 +03:00
data Hi 2024-08-26 15:29:56 +03:00
dbgate Hi 2024-08-26 15:29:56 +03:00
dispatch Hi 2024-08-26 15:29:56 +03:00
framework/common Hi 2024-08-26 15:29:56 +03:00
gameserver Hi 2024-08-26 15:29:56 +03:00
gateserver Hi 2024-08-26 15:29:56 +03:00
hk4e_data Hi 2024-08-26 15:29:56 +03:00
hk4e_proto Hi 2024-08-26 15:29:56 +03:00
kcp Hi 2024-08-26 15:29:56 +03:00
sdkserver Hi 2024-08-26 15:29:56 +03:00
.gitignore Hi 2024-08-26 15:29:56 +03:00
Cargo.lock Hi 2024-08-26 15:29:56 +03:00
Cargo.toml Hi 2024-08-26 15:29:56 +03:00
LICENSE Initial commit 2024-08-26 10:38:25 +00:00
README.md Hi 2024-08-26 15:29:56 +03:00
screenshot.png Hi 2024-08-26 15:29:56 +03:00

MualaniImpact

Current game version: 4.8.50

screenshot

What

MualaniImpact is an open-source project reverse-engineering Genshin Impact server binaries. This means that all logic and architecture code is being reimplemented according to decompiled pseudocode of official servers.

How

The original server binaries are written in C++. This project aims to rewrite them in rust. Because of that, some implementation details may be different (due to rust ownership model and so on).
We also use PostgreSQL instead of MySQL that is used by miHoYo.

Implemented services

  • Dispatch
  • Gateserver
  • Dbgate
  • Gameserver (work-in-progress)
  • SDKServer (not part of game-specific services, but required for authentification, emulates miHoYo account API)

Getting started

Requirements:

NOTE: if you are using MS Windows, use this version of Redis

Setup

Server

a) building from sources
git clone https://git.xeondev.com/ReversedRooms/MualaniImpact.git
cd MualaniImpact
cargo run --bin sdkserver
cargo run --bin dispatch
cargo run --bin dbgate
cargo run --bin gateserver
cargo run --bin gameserver
b) using pre-built binaries

Navigate to the Releases page and download the latest release for your platform.
Launch all services: sdkserver, dispatch, dbgate, gateserver, gameserver

NOTE: you don't have to install Rust if you're going to use pre-built binaries, although the preferred way is building from sources.
We don't provide support for pre-built binaries.

Configuration

You should configure each service using their own config files. They're being created in current working directory upon first startup.

Database section

You have to specify connection strings for PostgreSQL (connection_string) and Redis (redis_url)

[database]
connection_string = "postgres://postgres:@localhost:5432/hk4e"
redis_url = "redis://127.0.0.1/"
Application entries

If you're going to host all services locally, you don't have to modify anything here.
If you're deploying services on different machines, you have to configure their inner_ip.
Every service should have its own unique app_id
Example of application entry for Gateserver:

[[applications.Gateserver]]
app_id = 2
inner_ip = "127.0.0.1:22002"
NOTE: the top most app_id line (before application entries) specifies app_id of current service.

Data

The data files: TSV tables (data/txt) and JSON configs (data/json) are included in this repository. Keep in mind that you need to have the data subdirectory in current working directory.

Connecting

You have to download client of current supported game version (at this moment it's 4.8.50, you can get it here), and apply the encryption patch.

NOTE: once you got all services up and running, you have to create game account.
By default, you can do so at http://127.0.0.1:21000/account/register

Troubleshooting

Visit our discord if you have any questions/issues

Support

If you want to support this project, feel free to send a tip via boosty