1
0
mirror of synced 2025-01-20 08:52:47 +01:00

this is worth a shot

This commit is contained in:
Rin 2022-07-12 12:17:36 +01:00
parent 868d3fd3bd
commit 7481f3ef45
2 changed files with 7 additions and 4 deletions

View File

@ -15,7 +15,9 @@ export default class AllnetModule extends Module {
type: '*/*' type: '*/*'
})); }));
app.use("/sys/servlet/PowerOn", async function(req, res, next) { app.use("/sys/servlet/PowerOn", function(req, res, next) {
console.log('amauthd');
if (req.method !== "POST") { if (req.method !== "POST") {
return res.status(405).end(); return res.status(405).end();
} }

View File

@ -4,6 +4,7 @@
import express from 'express'; import express from 'express';
import {PrismaClient} from '@prisma/client'; import {PrismaClient} from '@prisma/client';
import https, {globalAgent} from 'https'; import https, {globalAgent} from 'https';
import http from 'http';
import fs from 'fs'; import fs from 'fs';
import bodyParser from 'body-parser'; import bodyParser from 'body-parser';
import AllnetModule from './allnet'; import AllnetModule from './allnet';
@ -62,14 +63,14 @@ new MuchaModule().register(muchaApp);
let key = fs.readFileSync('./server_wangan.key'); let key = fs.readFileSync('./server_wangan.key');
let cert = fs.readFileSync('./server_wangan.crt'); let cert = fs.readFileSync('./server_wangan.crt');
https.createServer({key, cert}, allnetApp).listen(PORT_ALLNET, () => { http.createServer(allnetApp).listen(PORT_ALLNET, '0.0.0.0', 511, () => {
console.log(`ALL.net server listening on port ${PORT_ALLNET}!`); console.log(`ALL.net server listening on port ${PORT_ALLNET}!`);
}) })
https.createServer({key, cert}, muchaApp).listen(PORT_MUCHA, () => { https.createServer({key, cert}, muchaApp).listen(PORT_MUCHA, '0.0.0.0', 511, () => {
console.log(`Mucha server listening on port ${PORT_MUCHA}!`); console.log(`Mucha server listening on port ${PORT_MUCHA}!`);
}) })
https.createServer({key, cert}, app).listen(PORT_BNGI, () => { https.createServer({key, cert}, app).listen(PORT_BNGI, '0.0.0.0', 511, () => {
console.log(`Game server listening on port ${PORT_BNGI}!`); console.log(`Game server listening on port ${PORT_BNGI}!`);
}) })