diff --git a/astro.config.ts b/astro.config.ts index 07ab795..b474e0c 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -18,7 +18,7 @@ const viteWispServer = (): Plugin => { name: "vite-wisp-server", configureServer(server) { server.httpServer?.on("upgrade", (req, socket, head) => { - req.url.startsWith("/wisp") ? wisp.routeRequest(req, socket, head) : undefined; + req.url.startsWith("/wisp") || req.url.startsWith("/adblock") ? wisp.routeRequest(req, socket, head) : undefined; }); } }; diff --git a/server/index.ts b/server/index.ts index ca58c6d..4dab568 100644 --- a/server/index.ts +++ b/server/index.ts @@ -23,7 +23,8 @@ const serverFactory: FastifyServerFactory = ( handler(req, res); }) .on("upgrade", (req, socket, head) => { - if (req.url?.endsWith("/wisp/")) { + if (req.url?.endsWith("/wisp/") || req.url?.endsWith("/adblock/")) { + console.log(req.url); wisp.routeRequest(req, socket as Socket, head); } }); diff --git a/src/components/Loader.astro b/src/components/Loader.astro index 2141ae6..5c2ccb5 100644 --- a/src/components/Loader.astro +++ b/src/components/Loader.astro @@ -7,6 +7,7 @@ const init = async () => { settings.searchEngine(); settings.proxy(); + settings.adBlock(); await sw.wispServer(); } diff --git a/src/components/ui/Dropdown.astro b/src/components/ui/Dropdown.astro index b0a59e7..751d95e 100644 --- a/src/components/ui/Dropdown.astro +++ b/src/components/ui/Dropdown.astro @@ -2,12 +2,13 @@ import type { DropdownOptions } from "@utils/types"; interface Props { id: string; + classes?: string; options: DropdownOptions[]; } -const { id, options } = Astro.props; +const { id, options, classes } = Astro.props; --- - {options.map((el) => )} diff --git a/src/pages/settings/index.astro b/src/pages/settings/index.astro index b487ee6..d539f1a 100644 --- a/src/pages/settings/index.astro +++ b/src/pages/settings/index.astro @@ -37,6 +37,15 @@ Object.keys(SearchEngines).forEach((k) =>

Wisp Server

+