diff --git a/index.js b/index.js index a3a69e8..2a71b0b 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ import { uvPath } from "@titaniumnetwork-dev/ultraviolet"; import { epoxyPath } from "@mercuryworkshop/epoxy-transport"; import { baremuxPath } from "@mercuryworkshop/bare-mux"; +import { libcurlPath } from "@mercuryworkshop/libcurl-transport"; import { createBareServer } from "@tomphttp/bare-server-node"; import express from "express"; import { createServer } from "http"; @@ -16,7 +17,7 @@ import wisp from "wisp-server-node"; dotenv.config(); const LICENSE_SERVER_URL = "https://license.mercurywork.shop/validate?license="; -const whiteListedDomains = ["aluu.xyz"]; // Add any public domains you have here +const whiteListedDomains = ["aluu.xyz", "localhost:3000"]; // Add any public domains you have here const failureFile = fs.readFileSync("Checkfailed.html", "utf8"); if (!existsSync("./dist")) build(); @@ -73,15 +74,15 @@ async function MasqFail(req, res) { // Woooooo masqr yayyyy (said no one) // uncomment for masqr - /* app.use(async (req, res, next) => { +app.use(async (req, res, next) => { if (req.headers.host && whiteListedDomains.includes(req.headers.host)) { next(); return; } - if (req.url.includes("/bare/")) { // replace this with your bare endpoint + // set this to your bare endpoint + if (req.url.includes("/bare/")) { next(); return; - // Bypass for UV and other bares } const authheader = req.headers.authorization; @@ -121,7 +122,7 @@ async function MasqFail(req, res) { MasqFail(req, res) return; -}) */ +}) app.use(express.static(path.join(process.cwd(), "static"))); @@ -129,6 +130,7 @@ app.use(express.static(path.join(process.cwd(), "build"))); app.use("/uv/", express.static(uvPath)); app.use("/epoxy/", express.static(epoxyPath)); app.use("/baremux/", express.static(baremuxPath)); +app.use("/libcurl/", express.static(libcurlPath)); app.use(express.json()); app.use( express.urlencoded({ diff --git a/package-lock.json b/package-lock.json index bc2eab4..bc8a4da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,11 @@ "@astrojs/node": "^8.2.0", "@mercuryworkshop/bare-mux": "^1.0.4", "@mercuryworkshop/epoxy-transport": "^1.0.2", + "@mercuryworkshop/libcurl-transport": "^1.1.0", "@nebula-services/ultraviolet": "^1.0.1-1.patch.7", "@titaniumnetwork-dev/ultraviolet": "^3.0.0", - "@tomphttp/bare-server-node": "^2.0.1", + "@tomphttp/bare-client": "^2.2.0-alpha", + "@tomphttp/bare-server-node": "^2.0.3", "astro": "^4.4.1", "chalk": "^5.3.0", "compression": "^1.7.4", @@ -963,6 +965,19 @@ "ws": "8.16.0" } }, + "node_modules/@mercuryworkshop/libcurl-transport": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mercuryworkshop/libcurl-transport/-/libcurl-transport-1.1.0.tgz", + "integrity": "sha512-332LEbSI19dJJa7TQ+A9ODUUFITh0t/ozD2QDG/OL7x0ESKYHkKUjoY7ZFQTdrFH7alHnjNqj0yyuKzYoWH8Mw==", + "dependencies": { + "esbuild-plugin-umd-wrapper": "^2.0.0", + "libcurl.js": "^0.4.1", + "rollup": "^4.12.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-typescript2": "^0.36.0", + "ws": "8.16.0" + } + }, "node_modules/@nebula-services/bare-client": { "version": "1.1.2-beta.3-patch.1", "resolved": "https://registry.npmjs.org/@nebula-services/bare-client/-/bare-client-1.1.2-beta.3-patch.1.tgz", @@ -1332,17 +1347,21 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/@tomphttp/bare-client": { + "version": "2.2.0-alpha", + "resolved": "https://registry.npmjs.org/@tomphttp/bare-client/-/bare-client-2.2.0-alpha.tgz", + "integrity": "sha512-xhcflOpwr92tkpp8SoDhB3nK3LHMBIjx+vgow37XobQew2k0/mXSxmaU7BsDFpOIa1CcLCEsR8gWn0v7Cy9+7Q==" + }, "node_modules/@tomphttp/bare-server-node": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@tomphttp/bare-server-node/-/bare-server-node-2.0.1.tgz", - "integrity": "sha512-L42TC/AldYRFBRZSxhkI0FC5TL8EC/NAsepNC/cWYTTiHQJ7mGg/vdTqNz8ShTYHr6LTHYkuD3/81nhX55SYtA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@tomphttp/bare-server-node/-/bare-server-node-2.0.3.tgz", + "integrity": "sha512-IGzZspDwzto+oPsvlV99OALJKH3X1nRWnpBE8EY6nrqu5I83xw3uSUacEdHNnW4rXG0IQ8vZwMH87VOMoArJ3A==", "dependencies": { "async-exit-hook": "^2.0.1", "commander": "^10.0.1", "dotenv": "^16.0.3", - "headers-polyfill": "^3.1.2", "http-errors": "^2.0.0", - "ipaddr.js": "^2.0.1", + "ipaddr.js": "^2.1.0", "source-map-support": "^0.5.21", "ws": "^8.13.0" }, @@ -3780,11 +3799,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/headers-polyfill": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/headers-polyfill/-/headers-polyfill-3.3.0.tgz", - "integrity": "sha512-5e57etwBpNcDc0b6KCVWEh/Ro063OxPvzVimUdM0/tsYM/T7Hfy3kknIGj78SFTOhNd8AZY41U8mOHoO4LzmIQ==" - }, "node_modules/html-escaper": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", @@ -4267,6 +4281,11 @@ "node": ">=6" } }, + "node_modules/libcurl.js": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/libcurl.js/-/libcurl.js-0.4.2.tgz", + "integrity": "sha512-WuL2EgeYVuSsHFeJhpq83pOMX8+ei1E4Vpym7SKz6vPvuOEK9TBDCZRXDN/zr9o4T9UIy0FXxwpIEyHvSBNGmA==" + }, "node_modules/load-yaml-file": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", diff --git a/package.json b/package.json index bd8da52..92c8f0e 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,11 @@ "@astrojs/node": "^8.2.0", "@mercuryworkshop/bare-mux": "^1.0.4", "@mercuryworkshop/epoxy-transport": "^1.0.2", + "@mercuryworkshop/libcurl-transport": "^1.1.0", "@nebula-services/ultraviolet": "^1.0.1-1.patch.7", "@titaniumnetwork-dev/ultraviolet": "^3.0.0", - "@tomphttp/bare-server-node": "^2.0.1", + "@tomphttp/bare-client": "^2.2.0-alpha", + "@tomphttp/bare-server-node": "^2.0.3", "astro": "^4.4.1", "chalk": "^5.3.0", "compression": "^1.7.4", diff --git a/src/components/Dropdown.astro b/src/components/Dropdown.astro index ea662f0..0c97b1c 100644 --- a/src/components/Dropdown.astro +++ b/src/components/Dropdown.astro @@ -1,12 +1,11 @@ --- -const { buttonNameDefault, dropdownList, id } = Astro.props; +const { buttonNameDefault, dropdownList, id, localStorageKey } = Astro.props; ---