Go to file
2022-05-28 18:20:50 +05:00
kcp@1b8ded3cac Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
lua_serde@ab1544174d Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
mhycrypt@230a4e03e6 Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
misc Add new hosts to certificate 2022-02-17 19:42:32 +05:00
packet-processor Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
packet-processor-macro One step close to DB 2021-11-25 04:57:09 +05:00
proto@2c10e95978 Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
src A bunch of stuff for 2.7.50. With some workarounds it's now possible to play. 2022-05-22 17:46:50 +05:00
.gitignore Implement Lua Scene loading 2022-02-02 20:42:41 +05:00
.gitmodules Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
Cargo.toml Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00
LICENSE Add license 2022-01-21 23:07:40 +05:00
README.md Move project library crates to git submodules to make life a bit easier 2022-05-28 18:20:50 +05:00

RustySamovar

Custom server for YuanShen / Genshin Impact video game.

Supported game versions: 1.4.5x - 2.7.5x (depends on protocol definitions provided and keys used)

Note: Github repo is a mirror of the main repo located at Invisible Internet Bublik. In case Github mirror dies, use I2P to access the main site.

Building

Toolkit preparation

You'll need any C/C++ toolkit installed:

  • On Windows, MS VS Community or MinGW will do the job;
  • On *nix, you just need GCC / Clang

Also you'll need to install Rust.

  • On Windows, refer to official instructions
  • On Linux, use system package manager to install rustc and cargo

Preparing the workplace

Clone repository with git clone --recurse-submodules <repo_url>. This is required to initialize all submodules.

Retrieving protocol definitions

Look at the instructions in the proto project on how to get the required file set.

Retrieving an SSL certificate and traffic encryption keys

To generate an SSL certificate, you'll need openssl tool installed.

  • On *nix, use misc/ssl_stuff/get_cert.sh script
  • On Windows, TODO

To get the traffic encryption key, TODO.

Compiling

Just plain and simple cargo build.

Running

Preparation

To run the game, you'll need some of the game's files:

  • Lua scripts, grab them from DecompiledLua/Lua subdirectory and put into data/lua/ subfolder of the server
  • ExcelBinOutput configs, grab them from ExcelBinOutput subdirectory and put into data/json/game/ subfolder of the server
  • BinOutput configs, grab them from 2.5.52/Data/_BinOutput subdirectory and put into data/json/game/ subfolder of the server

Alternatively you can dump everything by yourself using tools available at Bublik.

Redirecting the game's traffic to the server

The simplest method is by modifying the hosts file. Copy the contents from the provided file into your system-wide one. Note that you'll need to comment those lines as soon as you'll want to play on the official servers or access official resources (like web events or daily login rewards).

Starting the server

Just cargo run but with a caveat. Server listens on privileged ports (80, 443), so it needs permissions for that.

  • On Windows, UAC prompt should automatically pop up and ask you to elevate server's priviledges. If it's not happening, run the server's executable as admin.
  • On *nix, you'll need to grant the server the specific capability. You can do it by running sudo setcap 'cap_net_bind_service=+ep' ./target/debug/RustySamovar. Please don't run the server as root!