This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Installing
Magix edited this page Apr 11, 2022
·
2 revisions
Open Shen is not ready to go out of the box. Before installing, understand you will need to self provide the following:
- An SSL certificate & private key for the host server
- This isn't required if you are running Fiddler Classic to redirect traffic.
- Protobuffer definitions for the version of Yuan Shen you want to run
- Yuan Shen packet IDs for the version you want to run
- Dummy packet responses for the Yuan Shen version you want to run
- These can be dumped from a tool like Iridium.
- An SSL certificate & private key for the host server
- Protobuffer definitions for your Yuan Shen client
- Yuan Shen packet IDs for your client
- Dummy packet responses for your Yuan Shen client
- Access to your system's hosts file
- You can avoid modifying the hosts file by using Fiddler to redirect traffic to the localhost.
- Port
443
and80
and22102
open (and forwarded if necessary) on the host server
To install Open Shen:
- Download the latest version of Open Shen from GitHub Releases.
- Make sure you download the version for your operating system.
- Place the downloaded executable in a directory on your host.
- In the same directory, create the following directories and place the corresponding files in them.
-
certs
: Add your HTTPS certificate and private key to this directory. -
versions
: Add a version config for your Yuan Shen client to this directory. -
protocol
: Add the protobuffer definitions for your Yuan Shen client to this directory. -
packets
/rawPackets
: Add dummy packet responses for your Yuan Shen client to this directory.
-
- Configure a version of Yuan Shen for the server to use.
- A guide to this can be found here.
- Run Open Shen.
With Open Shen running, use one of the following methods to connect.
Note: This method only works if you have access (usually root or administrator) to your system's hosts file.
Run: notepad C:\Windows\System32\drivers\etc\hosts
in an Administrator Command Prompt and add or remove the hosts block.
Run: sudo vi /etc/hosts
in a Terminal and add or remove the hosts block.
Note: This method has not been completed. Come back to this later for a quick and easy way to configure your hosts file!
127.0.0.1 api-os-takumi.mihoyo.com
127.0.0.1 hk4e-api-os-static.mihoyo.com
127.0.0.1 hk4e-sdk-os.mihoyo.com
127.0.0.1 dispatchosglobal.yuanshen.com
127.0.0.1 osusadispatch.yuanshen.com
127.0.0.1 account.mihoyo.com
127.0.0.1 log-upload-os.mihoyo.com
127.0.0.1 dispatchcntest.yuanshen.com
127.0.0.1 devlog-upload.mihoyo.com
127.0.0.1 webstatic.mihoyo.com
127.0.0.1 log-upload.mihoyo.com
127.0.0.1 hk4e-sdk.mihoyo.com
127.0.0.1 api-beta-sdk.mihoyo.com
127.0.0.1 api-beta-sdk-os.mihoyo.com
127.0.0.1 cnbeta01dispatch.yuanshen.com
127.0.0.1 dispatchcnglobal.yuanshen.com
127.0.0.1 cnbeta02dispatch.yuanshen.com
127.0.0.1 sdk-os-static.mihoyo.com
127.0.0.1 webstatic-sea.mihoyo.com
127.0.0.1 hk4e-sdk-os-static.hoyoverse.com
127.0.0.1 webstatic-sea.hoyoverse.com
127.0.0.1 sdk-os-static.hoyoverse.com
127.0.0.1 api-account-os.hoyoverse.com
127.0.0.1 hk4e-sdk-os.hoyoverse.com
127.0.0.1 uspider.yuanshen.com
- Install & Run Fiddler.
- Open the
FiddlerScript
tab. - Add the following to the
FiddlerScript
tab:
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
var list = [
"https://api-os-takumi.mihoyo.com",
"https://hk4e-api-os-static.mihoyo.com",
"https://hk4e-sdk-os.mihoyo.com",
"https://dispatchosglobal.yuanshen.com",
"https://osusadispatch.yuanshen.com",
"https://account.mihoyo.com",
"https://log-upload-os.mihoyo.com",
"https://dispatchcntest.yuanshen.com",
"https://devlog-upload.mihoyo.com",
"https://webstatic.mihoyo.com",
"https://log-upload.mihoyo.com",
"https://hk4e-sdk.mihoyo.com",
"https://api-beta-sdk.mihoyo.com",
"https://api-beta-sdk-os.mihoyo.com",
"https://cnbeta01dispatch.yuanshen.com",
"https://dispatchcnglobal.yuanshen.com",
"https://cnbeta02dispatch.yuanshen.com",
"https://sdk-os-static.mihoyo.com",
"https://webstatic-sea.mihoyo.com",
"https://webstatic-sea.hoyoverse.com",
"https://hk4e-sdk-os-static.hoyoverse.com",
"https://sdk-os-static.hoyoverse.com",
"https://api-account-os.hoyoverse.com",
"https://hk4e-sdk-os.hoyoverse.com"
];
class Handlers
{
static function OnBeforeRequest(oS: Session) {
var active = true;
if(active) {
if(oS.uriContains("http://overseauspider.yuanshen.com:8888/log")){
oS.oRequest.FailSession(404, "Blocked", "yourmom");
}
for(var i = 0; i < 23 ;i++) {
if(oS.uriContains(list[i])) {
oS.fullUrl = oS.fullUrl.Replace("https://", "http://");
oS.host = "localhost"; // This can also be replaced with another IP address.
break;
}
}
}
}
};
- Click save and launch Yuan Shen.
- You must keep Fiddler open to connect and play.