mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-16 13:00:01 -04:00
Merge pull request #213 from IncognitoTGT/seo
better lighthouse scores!?!?!??!?!!?!?!?!?!?!?!?
This commit is contained in:
commit
d213843bbf
11 changed files with 112 additions and 24 deletions
|
@ -32,4 +32,3 @@
|
|||
<p><em>Thank you for using nginx.</em></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
14
index.html
14
index.html
|
@ -3,17 +3,9 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<meta content="Nebula" property="og:title" />
|
||||
<meta
|
||||
content="A stunning and sleak web proxy frontend with support for hundreds of popular sites."
|
||||
property="og:description"
|
||||
/>
|
||||
<meta content="/logo.png" property="og:image" />
|
||||
<meta content="#191724" data-react-helmet="true" name="theme-color" />
|
||||
<script src="/uv/uv.bundle.js"></script>
|
||||
<script src="/uv/uv.config.js"></script>
|
||||
<script src="/dynamic/dynamic.config.js"></script>
|
||||
<script src="/uv/uv.bundle.js" defer></script>
|
||||
<script src="/uv/uv.config.js" defer></script>
|
||||
<script src="/dynamic/dynamic.config.js" defer></script>
|
||||
<script src="/localforage/localforage.min.js" defer></script>
|
||||
<script>
|
||||
if ("serviceWorker" in navigator) {
|
||||
|
|
5
public/robots.txt
Normal file
5
public/robots.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
User-agent: *
|
||||
Disallow: /settings
|
||||
Disallow: /~/
|
||||
Disallow: /go/
|
||||
Disallow: /games
|
|
@ -29,8 +29,7 @@ const uvPromise = new Promise(async (resolve) => {
|
|||
try {
|
||||
const bare =
|
||||
(await localforage.getItem("bare")) || location.origin + "/bare/";
|
||||
const proxyUrl =
|
||||
(await localforage.getItem("HTTPProxy")) || "";
|
||||
const proxyUrl = (await localforage.getItem("HTTPProxy")) || "";
|
||||
const [proxyIP, proxyPort] = proxyUrl.split(":");
|
||||
self.__uv$config.bare = bare;
|
||||
self.__uv$config.proxyPort = proxyPort;
|
||||
|
|
|
@ -77,7 +77,9 @@ const serverFactory = (handler, opts) => {
|
|||
const app = fastify({ logger: true, serverFactory });
|
||||
|
||||
app.register(cookieParser);
|
||||
|
||||
await app.register(
|
||||
import("@fastify/compress")
|
||||
);
|
||||
|
||||
// Uncomment if you wish to add masqr.
|
||||
/* app.addHook("preHandler", async (req, reply) => {
|
||||
|
|
88
src/components/Meta.tsx
Normal file
88
src/components/Meta.tsx
Normal file
|
@ -0,0 +1,88 @@
|
|||
import { Helmet } from "react-helmet";
|
||||
export default function Meta() {
|
||||
return (
|
||||
<Helmet>
|
||||
<meta name="googlebot" content="index, follow, snippet" />
|
||||
<link rel="canonical" href="https://nebulaproxy.io/" />
|
||||
<meta
|
||||
name="keywords"
|
||||
content="proxy, web proxy, unblock websites, unblock chromebook, free web proxy, proxy list, proxy sites, un block chromebook, online proxy, proxy server, proxysite, proxy youtube, bypass securly, bypass iboss, bypass lightspeed filter, chromebooks, titanium network, unblock youtube, youtube proxy, unblocked youtube, youtube unblocked"
|
||||
/>
|
||||
<meta
|
||||
name="description"
|
||||
content="NebulaWeb is an official flagship of Nebula Services and Nebula Developer Labs. NebulaWeb is a stunning, sleek, and functional web-proxy with support for thousands of popular sites. With NebulaWeb, the sky is the limit."
|
||||
/>
|
||||
<meta property="og:site_name" content="Nebula" />
|
||||
<meta property="og:url" content="https://nebulaproxy.io/" />
|
||||
<meta property="og:title" content="Nebula" />
|
||||
<meta property="og:image" content="/logo.png" />
|
||||
<meta property="og:image:secure_url" content="/logo.png" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<meta property="og:title" content="Nebula" />
|
||||
<meta
|
||||
content="A stunning and sleak web proxy frontend with support for hundreds of popular sites."
|
||||
property="og:description"
|
||||
/>
|
||||
<meta name="theme-color" content="#191724" />
|
||||
<script type="application/ld+json">
|
||||
{`
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
"name": "Nebula",
|
||||
"url": "https://nebulaproxy.io",
|
||||
"sameAs": [
|
||||
"https://github.com/NebulaServices",
|
||||
"https://nebulaproxy.io"
|
||||
]
|
||||
}
|
||||
`}
|
||||
</script>
|
||||
<script type="application/ld+json">
|
||||
{`
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [{
|
||||
"@type": "Question",
|
||||
"name": "How do I get more links?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "You can more links by joining our discord server at discord.gg/unblocker"
|
||||
}
|
||||
}, {
|
||||
"@type": "Question",
|
||||
"name": "How can I self host Nebula?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Instructions for self hosting Nebula can be found at our GitHub repository."
|
||||
}
|
||||
}, {
|
||||
"@type": "Question",
|
||||
"name": "What sites can I unblock with Nebula?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "With Nebula you can access sites such as Discord, Spotify, YouTube and other game sites!"
|
||||
}
|
||||
}, {
|
||||
"@type": "Question",
|
||||
"name": "Does Nebula hide my search history?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes! Change your Tab appearance in Settings and make the tab look like another site!."
|
||||
}
|
||||
}, {
|
||||
"@type": "Question",
|
||||
"name": "Is Nebula open-source?",
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": "Yes! Check out our GitHub where you can deploy or host your own instance of Nebula."
|
||||
}
|
||||
}]
|
||||
}
|
||||
`}
|
||||
</script>
|
||||
</Helmet>
|
||||
);
|
||||
}
|
|
@ -2,6 +2,7 @@ import { render } from "preact";
|
|||
import { Suspense, lazy } from "preact/compat";
|
||||
import { LoadSuspense } from "./LoadSuspense";
|
||||
import { Helmet } from "react-helmet";
|
||||
import Meta from "./components/Meta";
|
||||
|
||||
const Routes = lazy(() => import("./routes"));
|
||||
|
||||
|
@ -10,6 +11,8 @@ const theme = localStorage.getItem("theme") || "main";
|
|||
export default function App() {
|
||||
return (
|
||||
<div>
|
||||
{window.location.origin === "https://nebulaproxy.io" && <Meta />}
|
||||
{/* {window.location.origin === "http://localhost:8080" && <Meta />} */}
|
||||
<Helmet>
|
||||
<link rel="stylesheet" href={"/themes/" + theme + ".css"}></link>
|
||||
<link rel="stylesheet" href="/themes/main.css"></link>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.highlighted {
|
||||
background-color: var(--navbar-text-color);
|
||||
transition: background-color 1s ease;
|
||||
transition: background-color 1s ease;
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ export function Home() {
|
|||
const usUrl = "https://us." + nonProtocolOrigin;
|
||||
const jpUrl = "https://jp." + nonProtocolOrigin;
|
||||
|
||||
console.log(usUrl, jpUrl)
|
||||
console.log(usUrl, jpUrl);
|
||||
|
||||
const [usTime, jpTime] = await Promise.all([
|
||||
ping(usUrl),
|
||||
|
@ -157,7 +157,7 @@ export function Home() {
|
|||
}
|
||||
>
|
||||
<div
|
||||
className={`font-roboto w-110 flex h-10 flex-none shrink-0 items-center justify-center border border-input-border-color bg-input p-2 text-xl hover:bg-dropdown-option-hover-color ${
|
||||
className={`font-roboto w-110 flex h-10 flex-none shrink-0 items-center text-input-text justify-center border border-input-border-color bg-input p-2 text-xl hover:bg-dropdown-option-hover-color ${
|
||||
index === suggestions.length - 1 ? "rounded-b-2xl" : ""
|
||||
}`}
|
||||
key={index}
|
||||
|
|
|
@ -68,14 +68,14 @@ function BareInput(props: BareInputProps) {
|
|||
value={inputValue}
|
||||
onKeyPress={(event) => {
|
||||
if (event.key === "Enter") {
|
||||
handleChange()
|
||||
handleChange();
|
||||
}
|
||||
}}
|
||||
id="input"
|
||||
className="font-roboto flex h-14 w-56 flex-row rounded-2xl border border-input-border-color bg-input p-4 text-center text-xl"
|
||||
className="font-roboto flex h-14 w-56 flex-row rounded-2xl border border-input-border-color bg-input p-4 text-center text-xl text-input-text"
|
||||
/>
|
||||
<div
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row text-input-text items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
onClick={handleChange}
|
||||
>
|
||||
{t("settings.bare.select")}
|
||||
|
|
|
@ -116,17 +116,17 @@ function ProxyInput(props: BareInputProps) {
|
|||
}
|
||||
}}
|
||||
id="pinput"
|
||||
className="font-roboto flex h-14 w-56 flex-row rounded-2xl border border-input-border-color bg-input p-4 text-center text-sm"
|
||||
className="font-roboto flex h-14 w-56 flex-row rounded-2xl border text-input-text border-input-border-color bg-input p-4 text-center text-sm"
|
||||
/>
|
||||
<div class="flex flex-row gap-4">
|
||||
<div
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row text-input-text items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
onClick={handleChange}
|
||||
>
|
||||
{t("settings.bare.select")}
|
||||
</div>
|
||||
<div
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row items-center justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
className="font-roboto mt-2 flex h-4 w-36 cursor-pointer flex-row items-center text-input-text justify-center rounded-xl border border-input-border-color bg-input p-5 text-center text-lg"
|
||||
onClick={resetProxy}
|
||||
>
|
||||
{t("settings.httpProxy.reset")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue