/csharp-Protoshift

csharp-Protoshift is an advanced, manageable compatibility layer for a certain anime game.

Primary LanguageC#MIT LicenseMIT

csharp-Protoshift

GitHub release (latest by date) GitHub GitHub last commit GitHub Workflow Status
Discord - miHomo Software

EN | 中文

csharp-Protoshift is an advanced, manageable compatibility layer for a certain anime game.

Note: We always welcome contributors to the project. But before making contributions, please read our Contributing note carefully.

Current Features

  • Basic Protoshift functionality. It can enhance the compatibility of certain secondary game servers.

  • Simple proxy server management commands.

  • Automatic compilation and execution of Windy (lua) scripts. The image below shows the welcome-to-csharp-Protoshift.lua configuration that is enabled by default in config_example.json. You can disable it by setting #/WindyConfig/OnlineExecWindys/[0]/OnlineExecMode to Disabled.

    Windy Preview

  • Protobuf / query_cur_region / Ec2b and other utility commands.

Quick Installation Guide

Prerequisites

First, you need to make sure you have installed the following software:

  • .NET 6.0 Runtime. It is used to generate and run the software.
  • Git. It is used to clone the source code and receive updates for this software.
  • Protocol Buffers Compiler (protoc), and add it to your system's PATH environment variable. It is used for real-time compilation of necessary files. For consistency, we recommend using version 21.12.
    Please download the zip package starting with protoc at the bottom of the release page according to your system. Here are some download links: v21.12 Windows x64 | v21.12 Linux x64
  • A real server.

In addition, I strongly recommend that you:

  • Ensure stable access to GitHub when running the build (./update).
  • Use VS Code for path shortcut jumps, JSON Schema support, etc.

If for some reason you cannot add the above software to the system environment variables, you can instruct the program to call their absolute paths. For details on this special configuration, please refer to the Wiki - Building - Prerequisites guide.

Build and Run

Once the prerequisites are met, just run the following commands:

git clone --branch main https://github.com/YYHEggEgg/csharp-Protoshift
cd csharp-Protoshift
./update

After that, you need to do some configuration. Open csharp-Protoshift/config.json, and you will see the commented lines (note that this file only exists after the build is complete):

{
// ...
  "NetConfig": {
    "BindAddress": "0.0.0.0",
    "BindPort": 22102,
    // Set your real server ip here
    // "RemoteAddress": {
    //   "IpAddress": "127.0.0.1",
    //   "AddressPort": 20041
    // }
  },
// ...
}

Uncomment and replace with your real server address to complete the minimum configuration of config.json. After configuring config.json, you should confirm whether resources is correctly configured. For how to correctly configure resources, please refer to Wiki - Resources.

Finally, run the following command to start the server immediately:

./run

You can also use ./run to start the Protoshift server at any time, and use ./update to get updates. Of course, if you want to run in Release mode (for higher performance), you can use ./scripts/run-rel.

More Usage