add version config #2
@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"autoCreateAccount": true,
|
"autoCreateAccount": true,
|
||||||
"buildLabel": "2023.05.23.12.37/kM-ONnYx6PjFfVyxn0zuvw",
|
"buildLabel": "2023.05.23.12.37/kM-ONnYx6PjFfVyxn0zuvw",
|
||||||
"matchmakingBuildId": "4920386201513015989"
|
"matchmakingBuildId": "4920386201513015989",
|
||||||
|
"version": "33.0.12",
|
||||||
|
"worldSeed": "SBripfQVIPcz+hCzf1LUSvFpsmnJaAfTEH2x/7YAWaiCGT8vxTMtVlk+SLLalLy5gtrFxHflQET2BJOKe8r0py9xFJAwi+TEP2VsfPGcs3l75kYvcpL7X7sEiISEFCt85O99GjXdGyyFwMhtvEvL5pzEVpaQu7dw4KcLtHY30q3aTM9pI4m4Qx1gPDkmyMrCKq7pzHHtA9QsFKWOunSwpfNJ49xCIZADeD30h5nshcFMl/3yipL9K0WHoouMZMLMwfCWMgFnxAazRznwda8XRjNgyuhfAQTeaPnFuLf3YJVde3FbJ4PBWX4uysx1PJHuVqMNaAe1TsDV6f2UzQ2M/g=="
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
|
import config from "@/config.json";
|
||||||
|
|
||||||
import { toLoginRequest } from "@/src/helpers/loginHelpers";
|
import { toLoginRequest } from "@/src/helpers/loginHelpers";
|
||||||
import { Account } from "@/src/models/loginModel";
|
import { Account } from "@/src/models/loginModel";
|
||||||
import { createAccount, isCorrectPassword } from "@/src/services/loginService";
|
import { createAccount, isCorrectPassword } from "@/src/services/loginService";
|
||||||
import { ILoginResponse } from "@/src/types/loginTypes";
|
import { ILoginResponse } from "@/src/types/loginTypes";
|
||||||
import { DTLS, groups, HUB, IRC, Nonce, NRS, platformCDNs } from "@/static/fixed_responses/login_static";
|
import { DTLS, groups, HUB, IRC, Nonce, NRS, platformCDNs } from "@/static/fixed_responses/login_static";
|
||||||
import { RequestHandler } from "express";
|
|
||||||
import config from "../../../config.json";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const loginController: RequestHandler = async (request, response) => {
|
const loginController: RequestHandler = async (request, response) => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument
|
||||||
const body = JSON.parse(request.body); // parse octet stream of json data to json object
|
const body = JSON.parse(request.body); // parse octet stream of json data to json object
|
||||||
const loginRequest = toLoginRequest(body);
|
const loginRequest = toLoginRequest(body);
|
||||||
// console.log(body);
|
// console.log(body);
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
|
import config from "@/config.json";
|
||||||
import worldState from "@/static/fixed_responses/worldState.json";
|
import worldState from "@/static/fixed_responses/worldState.json";
|
||||||
|
|
||||||
const worldStateController: RequestHandler = (_req, res) => {
|
const worldStateController: RequestHandler = (_req, res) => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
|
worldState.WorldSeed = config.worldSeed;
|
||||||
|
worldState.BuildLabel = config.buildLabel;
|
||||||
res.json(worldState);
|
res.json(worldState);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import express from "express";
|
import express from "express";
|
||||||
|
import config from "@/config.json";
|
||||||
|
|
||||||
const cacheRouter = express.Router();
|
const cacheRouter = express.Router();
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ cacheRouter.get("/B.Cache.Windows_en.bin*", (_req, res) => {
|
|||||||
cacheRouter.get(/^\/origin\/([a-zA-Z0-9]+)\/H\.Cache\.bin.*$/, (_req, res) => {
|
cacheRouter.get(/^\/origin\/([a-zA-Z0-9]+)\/H\.Cache\.bin.*$/, (_req, res) => {
|
||||||
// console.log("asd", path.join(__dirname, "../data"));
|
// console.log("asd", path.join(__dirname, "../data"));
|
||||||
// console.log("asd", __dirname);
|
// console.log("asd", __dirname);
|
||||||
res.sendFile("static/data/H.Cache_33.0.12.bin", { root: "./" });
|
res.sendFile(`static/data/H.Cache_${config.version}.bin`, { root: "./" });
|
||||||
});
|
});
|
||||||
|
|
||||||
export { cacheRouter };
|
export { cacheRouter };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user