Fix SNI lock, update deps, ESM refactor
This commit is contained in:
parent
88662b49bc
commit
447b1b735d
13 changed files with 1204 additions and 1144 deletions
14
app.js
14
app.js
|
|
@ -1,13 +1,13 @@
|
|||
import { config } from "dotenv";
|
||||
import https from "https";
|
||||
import app from "./index.js";
|
||||
import listener from "./src/client.js";
|
||||
import { SniPrepare, SniListener } from "./src/sni.js";
|
||||
// production endpoint (use pm2/phusion/whatever)
|
||||
config();
|
||||
|
||||
require('dotenv').config()
|
||||
const https = require("https");
|
||||
const app = require("./index.js");
|
||||
const listener = require("./src/client.js");
|
||||
const { SniPrepare, SniListener } = require("./src/sni.js");
|
||||
const port80 = parseInt(process.env.HTTP_PORT || "80");
|
||||
const port443 = parseInt(process.env.HTTPS_PORT || "443");
|
||||
|
||||
const main = async () => {
|
||||
await SniPrepare();
|
||||
const httpsServer = https.createServer({
|
||||
|
|
@ -20,4 +20,4 @@ const main = async () => {
|
|||
main().catch((err) => {
|
||||
console.log(err);
|
||||
process.exit(1);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue