rafi1212122 / BH3_PS

A private server implementation for a third impact game sea mainly but should also work for glb and probably cn too
153 stars 38 forks source link

How to operate after “npm run dev ”? It is the official game to start the game directly #4

Closed yehuoshun closed 1 year ago

yehuoshun commented 1 year ago

How to operate after “npm run dev ”? It is the official game to start the game directly(Google Translation)

rafi1212122 commented 1 year ago
LingXI521 commented 1 year ago
  • install mitmproxy
  • run the proxy mitmdump -s proxy.py -k
  • launch the game

I have done it as required, but I can't login

yehuoshun commented 1 year ago

捕获 It is the official game to start the game directly

Kyle873 commented 1 year ago

I was having some issues with using mitmproxy as well for some reason, the game just wouldn't redirect properly and I have no idea why as I've used it just fine for other anime games before. What I did as a stopgap fix is use Fiddler Classic with this script:

import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;

class Handlers
{
    static function OnBeforeRequest(oS: Session)
    {
        if (oS.host.EndsWith(".yuanshen.com") ||
            oS.host.EndsWith(".hoyoverse.com") ||
            oS.host.EndsWith(".mihoyo.com") ||
            oS.host.EndsWith(".yuanshen.com:12401") ||
            oS.host.EndsWith(".starrails.com") ||
            oS.host.EndsWith(".kurogame.com") ||
            oS.host.EndsWith(".zenlesszonezero.com") ||
            oS.host.EndsWith(".api.g3.proletariat.com") ||
            oS.host.EndsWith(".honkaiimpact3.com") ||
            oS.host.EndsWith(".bh3.com") ||
            oS.uriContains("http://overseauspider.yuanshen.com:8888/log"))
        {
            // This can also be replaced with another ip/domain server.
            // oS.oRequest.headers.UriScheme = "http";
            // oS.bypassGateway = true;
            oS.host = "localhost";
            // oS["x-overrideHost"] = '2.0.0.100';
        }
    }
};

This might come with it's own issues though, as I'm not sure how far we're supposed to be able to get into the login/ship entry process yet.

rafi1212122 commented 1 year ago

I was having same issues, image image image

image image

the ps also only work for sea and global game client without some modification.