{ "singleQuote": false, "endOfLine": "crlf", "tabWidth": 2, "useTabs": false, "trailingComma": "none", "plugins": ["prettier-plugin-tailwindcss"] } Welcome to nginx!

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required. If you are expecting another page, please check your network or Refresh this page

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

FROM node:21-alpine WORKDIR /app COPY package*.json . COPY . . RUN npm i -g pnpm RUN pnpm install RUN pnpm run build EXPOSE 8080 CMD ["pnpm", "start"] version: "3" services: nebula: image: nebula:latest build: context: . dockerfile: Dockerfile container_name: nebula restart: unless-stopped ports: # Host:Container (DO NOT MODIFY THE CONTAINER PORT) - "8081:8080" import * as React from "preact/compat"; declare module "framer-motion" { export interface AnimatePresenceProps { children?: React.ReactNode; } }
import fp from "fastify-plugin"; import fs from "fs"; const failureFile = fs.readFileSync("Checkfailed.html", "utf8"); const LICENSE_SERVER_URL = "https://license.mercurywork.shop/validate?license="; const whiteListedDomain = ["nebulaproxy.io"]; async function licenseCheck(req, pass) { try { const resp = await fetch( `${LICENSE_SERVER_URL}${pass}&host=${req.headers.host}` ); const data = await resp.json(); if (data.status === "License valid") { return true; } else { return false; } } catch { return false; } } const plugin = (fastify, opts, done) => { fastify.addHook("onRequest", function (req, reply, next) { if ( req.cookies.authcheck === "true" || whiteListedDomain.includes(req.headers.host) ) { return next(); } const authHeader = req.headers.authorization; if (req.cookies.refreshcheck != "true") { reply .setCookie("refreshcheck", "true", { maxAge: 1000 }) .type("text/html") .send(failureFile); return; } if (!authHeader) { reply .code(401) .header("WWW-Authenticate", "Basic") .type("text/html") .send(failureFile); return; } const auth = Buffer.from(authHeader.split(" ")[1], "base64") .toString() .split(":"); const user = auth[0]; const pass = auth[1]; licenseCheck(req, pass).then((data) => { if (!data) { reply .status(401) .header("WWW-Authenticate", "Basic") .type("text/html") .send(failureFile); return; } else { reply .setCookie("authcheck", "true") .type("text/html") .send(""); return; } }); }); done(); }; const masqr = fp(plugin, { fastify: "4.x", name: "masqr" }); export default masqr; { "name": "nebula", "private": true, "type": "module", "scripts": { "dev": "concurrently \"vite\" \"tsx server.ts\"", "build": "vite build", "bstart": "npm run build && tsx server.ts", "start": "tsx server.ts", "preview": "vite preview", "format": "prettier --write ." }, "dependencies": { "@fastify/compress": "^6.5.0", "@fastify/cookie": "^9.3.1", "@fastify/static": "^6.12.0", "@mercuryworkshop/bare-mux": "^1.0.7", "@mercuryworkshop/epoxy-transport": "^1.1.0", "@mercuryworkshop/libcurl-transport": "^1.3.1", "@nebula-services/dynamic": "0.7.2-patch.2", "@titaniumnetwork-dev/ultraviolet": "^3.0.0", "@tomphttp/bare-server-node": "2.0.3", "@tsparticles/engine": "^3.3.0", "@tsparticles/react": "^3.0.0", "@tsparticles/slim": "^3.3.0", "chalk": "^5.3.0", "classnames": "^2.5.1", "compression": "^1.7.4", "cookie-parser": "^1.4.6", "crypto-js": "^4.2.0", "fastify": "^4.26.2", "fastify-plugin": "^4.5.1", "framer-motion": "^10.18.0", "i18next": "^23.10.1", "i18next-browser-languagedetector": "^7.2.0", "localforage": "^1.10.0", "million": "^2.6.4", "preact": "^10.20.0", "preact-iso": "^2.4.0", "preact-render-to-string": "^6.4.1", "preact-router": "^4.1.2", "rammerhead": "https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz", "react-helmet": "^6.1.0", "react-i18next": "^13.5.0", "react-icons": "^4.12.0", "react-toastify": "^9.1.3", "tsx": "^4.7.1", "wisp-server-node": "^1.0.4", "ws": "^8.16.0" }, "devDependencies": { "@preact/preset-vite": "^2.8.2", "autoprefixer": "^10.4.19", "concurrently": "^8.2.2", "eslint": "^8.57.0", "eslint-config-preact": "^1.3.0", "postcss": "^8.4.38", "prettier": "^3.2.5", "prettier-plugin-tailwindcss": "^0.5.12", "tailwindcss": "^3.4.1", "typescript": "^5.4.3", "vite": "^5.2.3", "vite-plugin-static-copy": "^1.0.1" } }