skip train for now (#7)
This commit is contained in:
parent
438d69c838
commit
3d7b575425
@ -22,6 +22,7 @@ export default class HttpServer {
|
||||
private constructor() {
|
||||
this.server = express();
|
||||
this.server.use(express.json());
|
||||
this.server.use('/asb', express.static(resolve(__dirname, './routes/asb')));
|
||||
this.server.route('/*').all((req, res) => {
|
||||
if (Logger.VERBOSE_LEVEL > VerboseLevel.WARNS) c.log(`${req.method} ${req.url}`);
|
||||
import(`./routes${req.url.split('?')[0]}`).then(async r => {
|
||||
|
@ -0,0 +1,8 @@
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"5a81a0850f254a02c541b5b455a050ac","FileSize":37311,"TimeStamp":1653234742,"FileName":"M_Start_AsbV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"e791b90c638e60a875fa814113579cea","FileSize":388,"TimeStamp":1653234892,"FileName":"M_Start_BlockV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"db85336fec7bb3f1d983129504e843c3","FileSize":5729237,"TimeStamp":1653234806,"FileName":"M_AsbV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"83d0d52ebd31c2574cfcf774494654f1","FileSize":6212,"TimeStamp":1653234892,"FileName":"M_BlockV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"9f0914e34b3d5d23a561006da866bd5a","FileSize":33875,"TimeStamp":1653233190,"FileName":"M_AudioV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"81051bcc2cf1bedf378224b0a93e2877","FileSize":2,"TimeStamp":1653234892,"FileName":"B_M_AudioV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"7bf71dd1cf37259e619bbcdda0cde9f5","FileSize":2124,"TimeStamp":1653233196,"FileName":"M_VideoV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"81051bcc2cf1bedf378224b0a93e2877","FileSize":2,"TimeStamp":1653234892,"FileName":"M_VideoP"}
|
@ -0,0 +1,91 @@
|
||||
import { Request, Response } from "express";
|
||||
|
||||
// Example: These are multiple JSONs in 1 file. Literal file content below
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"5a81a0850f254a02c541b5b455a050ac","FileSize":37311,"TimeStamp":1653234742,"FileName":"M_Start_AsbV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"e791b90c638e60a875fa814113579cea","FileSize":388,"TimeStamp":1653234892,"FileName":"M_Start_BlockV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"db85336fec7bb3f1d983129504e843c3","FileSize":5729237,"TimeStamp":1653234806,"FileName":"M_AsbV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"83d0d52ebd31c2574cfcf774494654f1","FileSize":6212,"TimeStamp":1653234892,"FileName":"M_BlockV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"9f0914e34b3d5d23a561006da866bd5a","FileSize":33875,"TimeStamp":1653233190,"FileName":"M_AudioV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"81051bcc2cf1bedf378224b0a93e2877","FileSize":2,"TimeStamp":1653234892,"FileName":"B_M_AudioV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"7bf71dd1cf37259e619bbcdda0cde9f5","FileSize":2124,"TimeStamp":1653233196,"FileName":"M_VideoV"}
|
||||
// {"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"81051bcc2cf1bedf378224b0a93e2877","FileSize":2,"TimeStamp":1653234892,"FileName":"M_VideoP"}
|
||||
|
||||
|
||||
export default function handle(req: Request, res: Response) {
|
||||
const dataObj = {
|
||||
start_asbv: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "5a81a0850f254a02c541b5b455a050ac",
|
||||
FileSize: 37311,
|
||||
TimeStamp: 1653234742,
|
||||
FileName: "M_Start_AsbV"
|
||||
},
|
||||
start_blockv: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "e791b90c638e60a875fa814113579cea",
|
||||
FileSize: 388,
|
||||
TimeStamp: 1653234892,
|
||||
FileName: "M_Start_BlockV"
|
||||
},
|
||||
asbv: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "db85336fec7bb3f1d983129504e843c3",
|
||||
FileSize: 5729237,
|
||||
TimeStamp: 1653234806,
|
||||
FileName: "M_AsbV"
|
||||
},
|
||||
blockv: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "83d0d52ebd31c2574cfcf774494654f1",
|
||||
FileSize: 6212,
|
||||
TimeStamp: 1653234892,
|
||||
FileName: "M_BlockV"
|
||||
},
|
||||
audiov: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "9f0914e34b3d5d23a561006da866bd5a",
|
||||
FileSize: 33875,
|
||||
TimeStamp: 1653233190,
|
||||
FileName: "M_AudioV"
|
||||
},
|
||||
bmaudiov: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "81051bcc2cf1bedf378224b0a93e2877",
|
||||
FileSize: 2,
|
||||
TimeStamp: 1653234892,
|
||||
FileName: "B_M_AudioV"
|
||||
},
|
||||
videov: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "7bf71dd1cf37259e619bbcdda0cde9f5",
|
||||
FileSize: 2124,
|
||||
TimeStamp: 1653233196,
|
||||
FileName: "M_VideoV"
|
||||
},
|
||||
videop: {
|
||||
MajorVersion: 0,
|
||||
MinorVersion: 5,
|
||||
PatchVersion: 626209,
|
||||
ContentHash: "81051bcc2cf1bedf378224b0a93e2877",
|
||||
FileSize: 2,
|
||||
TimeStamp: 1653234892,
|
||||
FileName: "M_VideoP"
|
||||
}
|
||||
}
|
||||
|
||||
res.send(Object.values(dataObj).map(x => JSON.stringify(x)).join("\n"));
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"5a81a0850f254a02c541b5b455a050ac","FileSize":37311,"TimeStamp":1653234742,"FileName":"M_Start_AsbV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"e791b90c638e60a875fa814113579cea","FileSize":388,"TimeStamp":1653234892,"FileName":"M_Start_BlockV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"db85336fec7bb3f1d983129504e843c3","FileSize":5729237,"TimeStamp":1653234806,"FileName":"M_AsbV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"83d0d52ebd31c2574cfcf774494654f1","FileSize":6212,"TimeStamp":1653234892,"FileName":"M_BlockV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"9f0914e34b3d5d23a561006da866bd5a","FileSize":33875,"TimeStamp":1653233190,"FileName":"M_AudioV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"81051bcc2cf1bedf378224b0a93e2877","FileSize":2,"TimeStamp":1653234892,"FileName":"B_M_AudioV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"7bf71dd1cf37259e619bbcdda0cde9f5","FileSize":2124,"TimeStamp":1653233196,"FileName":"M_VideoV"}
|
||||
{"MajorVersion":0,"MinorVersion":5,"PatchVersion":626209,"ContentHash":"81051bcc2cf1bedf378224b0a93e2877","FileSize":2,"TimeStamp":1653234892,"FileName":"M_VideoP"}
|
BIN
src/http/routes/asb/design/client/Windows/M_DesignV.bytes
Normal file
BIN
src/http/routes/asb/design/client/Windows/M_DesignV.bytes
Normal file
Binary file not shown.
@ -5,14 +5,18 @@ import Config from "../../util/Config";
|
||||
import { Gateserver } from "../../data/proto/StarRail";
|
||||
|
||||
export default function handle(req: Request, res: Response) {
|
||||
const dataObj = Gateserver.fromJSON({
|
||||
const dataObj = Gateserver.fromPartial({
|
||||
retcode: 0,
|
||||
msg: "OK",
|
||||
regionName: "CrepeSR",
|
||||
ip: Config.GAMESERVER.SERVER_IP,
|
||||
port: Config.GAMESERVER.SERVER_PORT,
|
||||
serverDescription: "This is not BingusRail"
|
||||
});
|
||||
serverDescription: "This is not BingusRail",
|
||||
exResourceUrl: "https://localhost/asb/design",
|
||||
dataUseAssetBoundle: false,
|
||||
resUseAssetBoundle: false,
|
||||
assetBundleUrl: "https://localhost/asb",
|
||||
} as Gateserver);
|
||||
|
||||
if (Config.GAMESERVER.MAINTENANCE) {
|
||||
dataObj.retcode = 2;
|
||||
@ -25,7 +29,7 @@ export default function handle(req: Request, res: Response) {
|
||||
try {
|
||||
rsp = Gateserver.encode(dataObj).finish();
|
||||
} catch {
|
||||
rsp = Gateserver.encode(Gateserver.fromJSON({
|
||||
rsp = Gateserver.encode(Gateserver.fromPartial({
|
||||
retcode: 2,
|
||||
msg: "Internal server error",
|
||||
stopBeginTime: Date.now(),
|
||||
|
Loading…
Reference in New Issue
Block a user