mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-13 03:50:02 -04:00
Remove all instances or mention of rammerhead
This commit is contained in:
parent
19a3856768
commit
fc1a07b129
5 changed files with 4913 additions and 4467 deletions
|
@ -361,7 +361,3 @@ docker compose -f ./docker-compose.build.yml build
|
|||
| `wisp` | Whether the server should use the inbuilt wisp server. (Disabled if your using an external wisp server) | `boolean` | `true` |
|
||||
| `logging` | Whether or not to enable logging. *Note: Logs are massive* | `boolean` | `true` |
|
||||
|----------------------------| ----------------------------------------------------------------------------|------------|--------------|
|
||||
| `server.rammerhead` | Configure the Rammerhead server. ***DO NOT TOUCH UNLESS YOU ARE CERTAIN YOU KNOW WHAT YOU ARE DOING*** | `object` | N/A |
|
||||
| `reverseproxy` | Whether or not the Rammerhead server is behind a reverse proxy | `boolean` | `true` |
|
||||
| `localstorage_sync` | Whether or not to use localstorage sync | `boolean` | `true` |
|
||||
| `http2` | Whether to allow http2 or not | `boolean` | `true` |
|
||||
|
|
9082
pnpm-lock.yaml
generated
9082
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -14,11 +14,6 @@ interface TomlData {
|
|||
wisp: boolean;
|
||||
logging: boolean;
|
||||
};
|
||||
rammerhead: {
|
||||
reverseproxy: boolean;
|
||||
localstorage_sync: boolean;
|
||||
http2: boolean;
|
||||
};
|
||||
};
|
||||
db: {
|
||||
name: string;
|
||||
|
@ -55,21 +50,9 @@ verify([
|
|||
{ name: "marketplace.psk", typeOF: parsedDoc.marketplace.psk, type: "string" },
|
||||
{ name: "server", typeOF: parsedDoc.server, type: "object" },
|
||||
{ name: "server.server", typeOF: parsedDoc.server.server, type: "object" },
|
||||
{ name: "server.rammerhead", typeOF: parsedDoc.server.rammerhead, type: "object" },
|
||||
{ name: "server.server.port", typeOF: parsedDoc.server.server.port, type: "number" },
|
||||
{ name: "server.server.wisp", typeOF: parsedDoc.server.server.wisp, type: "boolean" },
|
||||
{ name: "server.server.logging", typeOF: parsedDoc.server.server.logging, type: "boolean" },
|
||||
{
|
||||
name: "server.rammerhead.reverseproxy",
|
||||
typeOF: parsedDoc.server.rammerhead.reverseproxy,
|
||||
type: "boolean"
|
||||
},
|
||||
{
|
||||
name: "server.rammerhead.localstorage_sync",
|
||||
typeOF: parsedDoc.server.rammerhead.localstorage_sync,
|
||||
type: "boolean"
|
||||
},
|
||||
{ name: "server.rammerhead.http2", typeOF: parsedDoc.server.rammerhead.http2, type: "boolean" },
|
||||
{ name: "db", typeOF: parsedDoc.db, type: "object" },
|
||||
{ name: "db.name", typeOF: parsedDoc.db.name, type: "string" },
|
||||
{ name: "db.username", typeOF: parsedDoc.db.username, type: "string" },
|
||||
|
|
|
@ -59,7 +59,6 @@ import { VERSION } from "astro:env/client";
|
|||
<script>
|
||||
import { initSw, setTransport, loadProxyScripts } from "@utils/registerSW.ts"; //../../utils/registerSW.ts
|
||||
import { pageLoad } from "@utils/events";
|
||||
import { RammerheadEncode } from "@rubynetwork/rammerhead-browser";
|
||||
import { SupportedSites } from "@utils/siteSupport";
|
||||
import {
|
||||
SearchEngines,
|
||||
|
@ -72,7 +71,7 @@ import { VERSION } from "astro:env/client";
|
|||
type Suggestion = {
|
||||
phrase: string;
|
||||
};
|
||||
async function proxy(term: string, rh: boolean) {
|
||||
async function proxy(term: string) {
|
||||
const searchEngine = localStorage.getItem(
|
||||
Settings.ProxySettings.searchEngine
|
||||
);
|
||||
|
@ -85,14 +84,6 @@ import { VERSION } from "astro:env/client";
|
|||
searchEngine ? SearchEngines[searchEngine] : SearchEngines.ddg
|
||||
)
|
||||
);
|
||||
if (rh) {
|
||||
proxyUrl = await RammerheadEncode(
|
||||
search(
|
||||
term,
|
||||
searchEngine ? SearchEngines[searchEngine] : SearchEngines.ddg
|
||||
)
|
||||
);
|
||||
}
|
||||
if (openIn === "a:b" || openIn === "blob") {
|
||||
return cloak(
|
||||
openIn as string,
|
||||
|
@ -114,18 +105,11 @@ import { VERSION } from "astro:env/client";
|
|||
const sw = await initSw();
|
||||
await settings.marketPlaceSettings.handlePlugins(sw);
|
||||
iframe.classList.remove("hidden");
|
||||
const url = await proxy(term, false);
|
||||
const url = await proxy(term);
|
||||
if (url) {
|
||||
iframe.src = url;
|
||||
}
|
||||
}
|
||||
async function rh(iframe: HTMLIFrameElement, term: string) {
|
||||
iframe.classList.remove("hidden");
|
||||
const url = await proxy(term, true);
|
||||
if (url) {
|
||||
iframe.src = ("/" + url) as string;
|
||||
}
|
||||
}
|
||||
//we need to rerun this on every page load
|
||||
pageLoad(async () => {
|
||||
const input = document.getElementById("nebula-input") as HTMLInputElement;
|
||||
|
@ -143,9 +127,6 @@ import { VERSION } from "astro:env/client";
|
|||
case "uv":
|
||||
uv(iframe, input?.value);
|
||||
break;
|
||||
case "rh":
|
||||
rh(iframe, input?.value);
|
||||
break;
|
||||
default:
|
||||
uv(iframe, input?.value);
|
||||
break;
|
||||
|
@ -154,10 +135,6 @@ import { VERSION } from "astro:env/client";
|
|||
localStorage.getItem(Settings.ProxySettings.proxy) === "uv"
|
||||
) {
|
||||
uv(iframe, input?.value);
|
||||
} else if (
|
||||
localStorage.getItem(Settings.ProxySettings.proxy) === "rh"
|
||||
) {
|
||||
rh(iframe, input?.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -4,8 +4,8 @@ type ProxyChoices = Exclude<Proxy, "automatic">;
|
|||
const SupportedSites: Record<string, ProxyChoices> = {
|
||||
"discord.gg": "uv",
|
||||
"discord.com": "uv",
|
||||
"spotify.com": "rh",
|
||||
"spotify.link": "rh",
|
||||
"spotify.com": "uv",
|
||||
"spotify.link": "uv",
|
||||
"youtube.com": "uv",
|
||||
"youtu.be": "uv"
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue