mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-01 13:04:42 +00:00
complete i18n migration to /[locale]/ with EN+ES content
Full rewrite of the docs site under app/[locale]/ with next-intl in localePrefix:"always" mode. Every page now exists at both /en/<path> and /es/<path>; the root / shows a meta-refresh + JS redirect to /<defaultLocale>/ so GitHub Pages serves something on the apex URL. Highlights: - 107 doc pages migrated to file-per-page JSON namespaces under messages/en/ and messages/es/. Spanish content is fully translated (no copy-of-English placeholders). - New documentation for the Active Suppressions section in the Settings tab and the per-event Dismiss dropdown in the Health Monitor modal. - New screenshots: dismiss-duration-dropdown.png and an updated health-suppression-settings.png. - Pagefind integrated for client-side search; index is built on every CI deploy (not committed). - RSS feeds: per-locale at /<locale>/rss.xml plus root /rss.xml for backward compat. - Removed the dead app/[locale]/guides/[slug]/ route — every guide now has its own static page and no markdown source remains. - Fixed orphan link /guides/nvidia -> /guides/nvidia-manual in docs/hardware/nvidia-host. - Removed obsolete components (footer2, calendar, drawer). Verified locally with `npm ci && npm run build`: 2804 files in out/, 231 pages indexed by pagefind, root redirect intact, both locale roots and the new Active Suppressions docs render OK.
This commit is contained in:
@@ -0,0 +1,282 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import Image from "next/image"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.fail2ban.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/security/fail2ban",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type JailRow = { jail: string; protects: string; retries: string; ban: string }
|
||||
type LoggerRow = { service: string; source: string; output: string }
|
||||
type ManageRow = { action: string; what: string }
|
||||
|
||||
export default async function Fail2BanPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.fail2ban" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { security: { fail2ban: {
|
||||
jails: { rows: JailRow[] }
|
||||
loggers: { rows: LoggerRow[] }
|
||||
manage: { rows: ManageRow[] }
|
||||
hardening: { items: string[] }
|
||||
} } }
|
||||
}
|
||||
const block = messages.docs.security.fail2ban
|
||||
const jailRows = block.jails.rows
|
||||
const loggerRows = block.loggers.rows
|
||||
const manageRows = block.manage.rows
|
||||
const hardeningItems = block.hardening.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const codeNw = (chunks: React.ReactNode) => <code className="whitespace-nowrap">{chunks}</code>
|
||||
const codeXs = (chunks: React.ReactNode) => <code className="text-xs">{chunks}</code>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={8}
|
||||
scriptPath="security/fail2ban_installer.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t("intro.body")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("firstLaunch.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t("firstLaunch.body")}
|
||||
</p>
|
||||
|
||||
<Image
|
||||
src="/security/fail2ban-install.png"
|
||||
alt={t("firstLaunch.imageAlt")}
|
||||
width={900}
|
||||
height={500}
|
||||
className="rounded shadow-lg my-6"
|
||||
/>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("jails.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("jails.headerJail")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("jails.headerProtects")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("jails.headerRetries")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("jails.headerBan")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{jailRows.map((row, idx) => (
|
||||
<tr key={row.jail} className={idx < jailRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.jail}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{row.protects}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">{row.retries}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">{row.ban}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("jails.outro", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("journald.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("journald.intro", { code, codeNw, em })}
|
||||
</p>
|
||||
|
||||
<DataFlowDiagram
|
||||
nodes={[
|
||||
{
|
||||
label: t("journald.diagram.sshLabel"),
|
||||
detail: t("journald.diagram.sshDetail"),
|
||||
variant: "source",
|
||||
},
|
||||
{
|
||||
label: t("journald.diagram.journaldLabel"),
|
||||
detail: t("journald.diagram.journaldDetail"),
|
||||
variant: "bridge",
|
||||
},
|
||||
{
|
||||
label: t("journald.diagram.fail2banLabel"),
|
||||
detail: t("journald.diagram.fail2banDetail"),
|
||||
variant: "target",
|
||||
},
|
||||
]}
|
||||
arrowLabel={t("journald.diagram.arrowLabel")}
|
||||
/>
|
||||
|
||||
<p className="mt-6 mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("journald.afterDiagram", { code, codeXs })}
|
||||
</p>
|
||||
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("journald.code") as string}</pre>
|
||||
|
||||
<p className="mt-4 mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("journald.outro", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("loggers.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("loggers.intro1", { code })}
|
||||
</p>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("loggers.intro2", { code })}
|
||||
</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("loggers.headerService")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("loggers.headerSource")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("loggers.headerOutput")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{loggerRows.map((row, idx) => (
|
||||
<tr key={row.service} className={idx < loggerRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs"><strong>{row.service}</strong></td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.source}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.output}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("loggers.outro", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("backend.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("backend.intro", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("backend.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("hardening.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("hardening.intro", { code, strong })}
|
||||
</p>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t("hardening.installerIntro")}
|
||||
</p>
|
||||
<ol className="list-decimal pl-6 mb-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{hardeningItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`hardening.items.${idx}`, { code, strong })}</li>
|
||||
))}
|
||||
</ol>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">
|
||||
{t.rich("hardening.outro", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manage.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t("manage.intro")}
|
||||
</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("manage.headerAction")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("manage.headerWhat")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{manageRows.map((row, idx) => (
|
||||
<tr key={row.action} className={idx < manageRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap"><strong>{row.action}</strong></td>
|
||||
<td className="px-3 py-2 align-top">{row.what}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("verify.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t("verify.intro")}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("verify.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.neverBansTitle")}>
|
||||
{t.rich("troubleshoot.neverBansBody", { code, em })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.monitorEmptyTitle")}>
|
||||
{t.rich("troubleshoot.monitorEmptyBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.selfBanTitle")}>
|
||||
{t("troubleshoot.selfBanIntro")}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.selfBanCode") as string}</pre>
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.aptFailTitle")}>
|
||||
{t.rich("troubleshoot.aptFailBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.lockoutTitle")}>
|
||||
{t.rich("troubleshoot.lockoutBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
<li>
|
||||
<Link href="/docs/monitor/dashboard/security" className="text-blue-600 hover:underline">
|
||||
{t("related.monitorLabel")}
|
||||
</Link>
|
||||
{t("related.monitorTail")}
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/docs/security/lynis" className="text-blue-600 hover:underline">
|
||||
{t("related.lynisLabel")}
|
||||
</Link>
|
||||
{t("related.lynisTail")}
|
||||
</li>
|
||||
<li>
|
||||
<Link href="/docs/security" className="text-blue-600 hover:underline">
|
||||
{t("related.securityLabel")}
|
||||
</Link>
|
||||
{t("related.securityTail")}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import Image from "next/image"
|
||||
import { ExternalLink } from "lucide-react"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
import { DataFlowDiagram } from "@/components/ui/data-flow-diagram"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.lynis.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://macrimi.github.io/ProxMenux/docs/security/lynis",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type WhyRow = { sourceRich: string; path: string; update: string; fresh: string }
|
||||
type ReportRow = { markerRich: string; meaning: string; action: string }
|
||||
type ReinstallRow = { actionRich: string; whatRich: string }
|
||||
type RelatedItem = { href: string; label: string; tail?: string; tailRich?: string }
|
||||
|
||||
export default async function LynisPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.lynis" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { security: { lynis: {
|
||||
detection: { items: string[] }
|
||||
whyUpstream: { rows: WhyRow[] }
|
||||
report: { rows: ReportRow[] }
|
||||
reinstall: { rows: ReinstallRow[] }
|
||||
related: { items: RelatedItem[] }
|
||||
} } }
|
||||
}
|
||||
const block = messages.docs.security.lynis
|
||||
const detectionItems = block.detection.items
|
||||
const whyRows = block.whyUpstream.rows
|
||||
const reportRows = block.report.rows
|
||||
const reinstallRows = block.reinstall.rows
|
||||
const relatedItems = block.related.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const ok = (chunks: React.ReactNode) => <code className="text-emerald-700">{chunks}</code>
|
||||
const warn = (chunks: React.ReactNode) => <code className="text-amber-700">{chunks}</code>
|
||||
const sugg = (chunks: React.ReactNode) => <code className="text-red-700">{chunks}</code>
|
||||
const linkFail2ban = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/security/fail2ban" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
const linkSecurityTab = (chunks: React.ReactNode) => (
|
||||
<Link href="/docs/monitor/dashboard/security" className="text-blue-600 hover:underline">{chunks}</Link>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={5}
|
||||
scriptPath="security/lynis_installer.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("manageMenu.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("manageMenu.intro")}</p>
|
||||
|
||||
<Image
|
||||
src="/security/lynis-menu.png"
|
||||
alt={t("manageMenu.imageAlt")}
|
||||
width={900}
|
||||
height={500}
|
||||
className="rounded shadow-lg my-6"
|
||||
/>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("whyUpstream.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("whyUpstream.intro", { code })}</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("whyUpstream.headerSource")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("whyUpstream.headerPath")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("whyUpstream.headerUpdate")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("whyUpstream.headerFresh")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{whyRows.map((row, idx) => (
|
||||
<tr key={idx} className={idx < whyRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">{t.rich(`whyUpstream.rows.${idx}.sourceRich`, { strong })}</td>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap font-mono text-xs">{row.path}</td>
|
||||
<td className="px-3 py-2 align-top">{row.update}</td>
|
||||
<td className="px-3 py-2 align-top">{row.fresh}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("install.heading")}</h2>
|
||||
|
||||
<DataFlowDiagram
|
||||
nodes={[
|
||||
{
|
||||
label: t("install.node1Label"),
|
||||
detail: t("install.node1Detail"),
|
||||
variant: "source",
|
||||
},
|
||||
{
|
||||
label: t("install.node2Label"),
|
||||
detail: t("install.node2Detail"),
|
||||
variant: "bridge",
|
||||
},
|
||||
{
|
||||
label: t("install.node3Label"),
|
||||
detail: t("install.node3Detail"),
|
||||
variant: "target",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
<p className="mt-6 mb-4 text-gray-800 leading-relaxed">{t.rich("install.outro", { code })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("detection.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("detection.intro")}</p>
|
||||
<ol className="list-decimal pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
|
||||
{detectionItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`detection.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ol>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("detection.outro", { code, strong })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("audit.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("audit.intro", { strong })}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("audit.code") as string}</pre>
|
||||
<p className="mt-4 mb-4 text-gray-800 leading-relaxed">{t.rich("audit.outro", { code, ok, warn, sugg })}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("audit.summary") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("report.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("report.intro", { code, strong })}</p>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("report.headerMarker")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("report.headerMeaning")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("report.headerAction")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{reportRows.map((row, idx) => (
|
||||
<tr key={idx} className={idx < reportRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">{t.rich(`report.rows.${idx}.markerRich`, { strong })}</td>
|
||||
<td className="px-3 py-2 align-top">{row.meaning}</td>
|
||||
<td className="px-3 py-2 align-top">{row.action}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t.rich("report.outro", { code })}</p>
|
||||
|
||||
<Callout variant="tip" title={t("pairFail2ban.title")}>
|
||||
{t.rich("pairFail2ban.body", { code, link: linkFail2ban })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("update.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("update.body", { code, strong })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("reinstall.heading")}</h2>
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("reinstall.headerAction")}</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">{t("reinstall.headerWhat")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{reinstallRows.map((_, idx) => (
|
||||
<tr key={idx} className={idx < reinstallRows.length - 1 ? "border-b border-gray-100" : ""}>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">{t.rich(`reinstall.rows.${idx}.actionRich`, { strong })}</td>
|
||||
<td className="px-3 py-2 align-top">{t.rich(`reinstall.rows.${idx}.whatRich`, { code })}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("cli.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("cli.intro")}</p>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("cli.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("troubleshoot.heading")}</h2>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.cloneTitle")}>
|
||||
{t.rich("troubleshoot.cloneBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.notFoundTitle")}>
|
||||
{t.rich("troubleshoot.notFoundIntro", { code })}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.notFoundCode") as string}</pre>
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.sshTitle")}>
|
||||
{t.rich("troubleshoot.sshIntro", { code, link: linkFail2ban })}
|
||||
<pre className="mt-2 rounded-md bg-white border border-slate-200 p-3 overflow-x-auto text-xs font-mono text-gray-800">{t.raw("troubleshoot.sshCode") as string}</pre>
|
||||
</Callout>
|
||||
|
||||
<Callout variant="troubleshoot" title={t("troubleshoot.scoreTitle")}>
|
||||
{t.rich("troubleshoot.scoreBody", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("files.heading")}</h2>
|
||||
<pre className="rounded-md bg-gray-100 p-4 overflow-x-auto text-xs font-mono text-gray-800 leading-relaxed border border-gray-200">{t.raw("files.code") as string}</pre>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("sample.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("sample.intro", { link: linkSecurityTab })}</p>
|
||||
|
||||
<figure className="my-4">
|
||||
<Image
|
||||
src="/monitor/security/lynis-report-pdf.png"
|
||||
alt={t("sample.imageAlt")}
|
||||
width={1414}
|
||||
height={2000}
|
||||
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto"
|
||||
/>
|
||||
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
|
||||
{t("sample.captionPrefix")}
|
||||
<a
|
||||
href="/monitor/security/lynis-sample-report.pdf"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-600 hover:underline inline-flex items-center gap-1"
|
||||
>
|
||||
{t("sample.captionLink")}
|
||||
<ExternalLink className="h-3 w-3" aria-hidden="true" />
|
||||
</a>
|
||||
{t("sample.captionSuffix")}
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<p className="mb-4 text-gray-800 leading-relaxed text-sm">{t.rich("sample.cli", { code })}</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
|
||||
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
|
||||
{relatedItems.map((item, idx) => (
|
||||
<li key={item.href}>
|
||||
<Link href={item.href} className="text-blue-600 hover:underline">
|
||||
{item.label}
|
||||
</Link>
|
||||
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
import type { Metadata } from "next"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import Image from "next/image"
|
||||
import { ArrowRight, Ban, ShieldCheck, ScanLine } from "lucide-react"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
keywords: [
|
||||
"proxmox fail2ban",
|
||||
"proxmox lynis",
|
||||
"proxmox security",
|
||||
"proxmox hardening",
|
||||
"proxmox intrusion prevention",
|
||||
"proxmox security audit",
|
||||
"proxmox ssh fail2ban",
|
||||
"proxmox web ui fail2ban",
|
||||
],
|
||||
alternates: { canonical: "https://proxmenux.com/docs/security" },
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://proxmenux.com/docs/security",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary",
|
||||
title: t("twitterTitle"),
|
||||
description: t("twitterDescription"),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type StringItem = string
|
||||
|
||||
interface OptionProps {
|
||||
title: string
|
||||
description: string
|
||||
Icon: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }>
|
||||
href: string
|
||||
}
|
||||
|
||||
function OptionCard({ title, description, Icon, href }: OptionProps) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className="group flex items-start gap-3 rounded-md border border-gray-200 bg-white p-3 transition-colors hover:border-blue-400 hover:bg-blue-50"
|
||||
>
|
||||
<span className="inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md bg-gray-100 text-gray-600 group-hover:bg-blue-100 group-hover:text-blue-700">
|
||||
<Icon className="h-4 w-4" aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-1 text-sm font-medium text-gray-900 group-hover:text-blue-700">
|
||||
{title}
|
||||
<ArrowRight className="h-3.5 w-3.5 text-gray-400 group-hover:text-blue-600 transition-transform group-hover:translate-x-0.5" />
|
||||
</div>
|
||||
<div className="mt-0.5 text-xs text-gray-600 leading-snug">{description}</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
export default async function SecurityOverviewPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.security" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: { security: {
|
||||
cards: {
|
||||
fail2ban: { bullets: StringItem[] }
|
||||
lynis: { bullets: StringItem[] }
|
||||
}
|
||||
} }
|
||||
}
|
||||
const fail2banBullets = messages.docs.security.cards.fail2ban.bullets
|
||||
const lynisBullets = messages.docs.security.cards.lynis.bullets
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={4}
|
||||
scriptPath="menus/security_menu.sh"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t.rich("intro.body", { strong, em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("opening.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("opening.body", { strong })}</p>
|
||||
|
||||
<Image
|
||||
src="/security/security-menu.png"
|
||||
alt={t("opening.imageAlt")}
|
||||
width={900}
|
||||
height={500}
|
||||
className="rounded shadow-lg my-6"
|
||||
/>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("pick.heading")}</h2>
|
||||
<p className="mb-6 text-gray-800 leading-relaxed">{t("pick.body")}</p>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-1 lg:grid-cols-2 mb-8 not-prose">
|
||||
<a
|
||||
href="#fail2ban"
|
||||
className="rounded-lg border-2 border-red-300 bg-red-50 p-5 flex flex-col transition-shadow hover:shadow-md"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-red-100 text-red-700">
|
||||
<Ban className="h-5 w-5" aria-hidden />
|
||||
</span>
|
||||
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("cards.fail2ban.title")}</h3>
|
||||
</div>
|
||||
<p className="text-sm text-gray-800 mb-3">{t("cards.fail2ban.body")}</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{fail2banBullets.map((_, idx) => (
|
||||
<li key={idx}>{t(`cards.fail2ban.bullets.${idx}`)}</li>
|
||||
))}
|
||||
</ul>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="#lynis"
|
||||
className="rounded-lg border-2 border-blue-300 bg-blue-50 p-5 flex flex-col transition-shadow hover:shadow-md"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<span className="inline-flex h-9 w-9 items-center justify-center rounded-full bg-blue-100 text-blue-700">
|
||||
<ScanLine className="h-5 w-5" aria-hidden />
|
||||
</span>
|
||||
<h3 className="text-lg font-semibold text-gray-900 m-0">{t("cards.lynis.title")}</h3>
|
||||
</div>
|
||||
<p className="text-sm text-gray-800 mb-3">{t("cards.lynis.body")}</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{lynisBullets.map((_, idx) => (
|
||||
<li key={idx}>{t(`cards.lynis.bullets.${idx}`)}</li>
|
||||
))}
|
||||
</ul>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<Callout variant="tip" title={t("workflowTip.title")}>
|
||||
{t.rich("workflowTip.body", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 id="fail2ban" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
|
||||
{t("fail2banSection.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("fail2banSection.body")}</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
|
||||
<OptionCard
|
||||
title={t("fail2banSection.optionTitle")}
|
||||
description={t("fail2banSection.optionDescription")}
|
||||
Icon={Ban}
|
||||
href="/docs/security/fail2ban"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h2 id="lynis" className="text-2xl font-semibold mt-10 mb-4 text-gray-900 scroll-mt-24">
|
||||
{t("lynisSection.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("lynisSection.body", { code })}</p>
|
||||
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
|
||||
<OptionCard
|
||||
title={t("lynisSection.optionTitle")}
|
||||
description={t("lynisSection.optionDescription")}
|
||||
Icon={ScanLine}
|
||||
href="/docs/security/lynis"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
|
||||
<ShieldCheck className="inline h-5 w-5 mr-1 -mt-1 text-emerald-600" aria-hidden />
|
||||
{t("componentStatus.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t.rich("componentStatus.body", { code })}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,360 @@
|
||||
import type { Metadata } from "next"
|
||||
import Image from "next/image"
|
||||
import { ExternalLink } from "lucide-react"
|
||||
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
|
||||
import { DocHeader } from "@/components/ui/doc-header"
|
||||
import { Callout } from "@/components/ui/callout"
|
||||
|
||||
export async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.sslLetsencrypt.meta" })
|
||||
return {
|
||||
title: t("title"),
|
||||
description: t("description"),
|
||||
openGraph: {
|
||||
title: t("ogTitle"),
|
||||
description: t("ogDescription"),
|
||||
type: "article",
|
||||
url: "https://proxmenux.com/docs/security/ssl-letsencrypt",
|
||||
},
|
||||
alternates: { canonical: "https://proxmenux.com/docs/security/ssl-letsencrypt" },
|
||||
}
|
||||
}
|
||||
|
||||
type StringItem = string
|
||||
type TableRow = {
|
||||
fileRich: string
|
||||
originRich?: string
|
||||
origin?: string
|
||||
when?: string
|
||||
whenRich?: string
|
||||
}
|
||||
|
||||
export default async function SslLetsEncryptPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
const t = await getTranslations({ locale, namespace: "docs.security.sslLetsencrypt" })
|
||||
|
||||
const messages = (await getMessages({ locale })) as unknown as {
|
||||
docs: {
|
||||
security: {
|
||||
sslLetsencrypt: {
|
||||
twoways: {
|
||||
proxmox: { items: StringItem[] }
|
||||
custom: { items: StringItem[] }
|
||||
}
|
||||
proxmoxCert: { table: { rows: TableRow[] } }
|
||||
letsencrypt: { prereqs: { items: StringItem[] } }
|
||||
custom: { items: StringItem[] }
|
||||
trustCa: { items: StringItem[] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const block = messages.docs.security.sslLetsencrypt
|
||||
const proxmoxItems = block.twoways.proxmox.items
|
||||
const customItems = block.twoways.custom.items
|
||||
const tableRows = block.proxmoxCert.table.rows
|
||||
const prereqItems = block.letsencrypt.prereqs.items
|
||||
const customListItems = block.custom.items
|
||||
const trustCaItems = block.trustCa.items
|
||||
|
||||
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
|
||||
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
|
||||
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
|
||||
const br = () => <br />
|
||||
const extlink1 = (chunks: React.ReactNode) => (
|
||||
<a
|
||||
href="https://pve.proxmox.com/wiki/Certificate_Management"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-600 hover:underline inline-flex items-center gap-1"
|
||||
>
|
||||
{chunks}
|
||||
<ExternalLink className="w-3 h-3" />
|
||||
</a>
|
||||
)
|
||||
const extlink2 = (chunks: React.ReactNode) => (
|
||||
<a
|
||||
href="https://github.com/acmesh-official/acme.sh/wiki/dnsapi"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-600 hover:underline inline-flex items-center gap-1"
|
||||
>
|
||||
{chunks}
|
||||
<ExternalLink className="w-3 h-3" />
|
||||
</a>
|
||||
)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DocHeader
|
||||
title={t("header.title")}
|
||||
description={t("header.description")}
|
||||
section={t("header.section")}
|
||||
estimatedMinutes={5}
|
||||
scriptPath="AppImage/scripts/auth_manager.py"
|
||||
/>
|
||||
|
||||
<Callout variant="info" title={t("intro.title")}>
|
||||
{t("intro.body")}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("wheresetting.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("wheresetting.body", { strong })}
|
||||
</p>
|
||||
|
||||
<figure className="my-6">
|
||||
<Image
|
||||
src="/monitor/security/ssl-https-card.png"
|
||||
alt={t("wheresetting.imageAlt")}
|
||||
width={2000}
|
||||
height={1124}
|
||||
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto"
|
||||
/>
|
||||
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
|
||||
{t("wheresetting.caption")}
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("twoways.heading")}</h2>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-2 mb-8 not-prose">
|
||||
<div className="rounded-lg border-2 border-green-300 bg-green-50 p-5">
|
||||
<h3 className="text-lg font-semibold text-gray-900 mb-2">{t("twoways.proxmox.title")}</h3>
|
||||
<p className="text-sm text-gray-800 mb-3">{t("twoways.proxmox.summary")}</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{proxmoxItems.map((_, idx) => (
|
||||
<li key={idx}>{t(`twoways.proxmox.items.${idx}`)}</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div className="rounded-lg border-2 border-blue-300 bg-blue-50 p-5">
|
||||
<h3 className="text-lg font-semibold text-gray-900 mb-2">{t("twoways.custom.title")}</h3>
|
||||
<p className="text-sm text-gray-800 mb-3">
|
||||
{t.rich("twoways.custom.summaryRich", { code })}
|
||||
</p>
|
||||
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
|
||||
{customItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`twoways.custom.items.${idx}`, { code })}</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
|
||||
{t("proxmoxCert.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("proxmoxCert.intro", { code })}
|
||||
</p>
|
||||
|
||||
<div className="overflow-x-auto mb-6">
|
||||
<table className="w-full text-sm border border-gray-200 rounded-md">
|
||||
<thead className="bg-gray-50 text-gray-900">
|
||||
<tr>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">
|
||||
{t("proxmoxCert.table.headers.file")}
|
||||
</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">
|
||||
{t("proxmoxCert.table.headers.origin")}
|
||||
</th>
|
||||
<th className="text-left px-3 py-2 border-b border-gray-200">
|
||||
{t("proxmoxCert.table.headers.when")}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="text-gray-800">
|
||||
{tableRows.map((row, idx) => (
|
||||
<tr
|
||||
key={idx}
|
||||
className={idx < tableRows.length - 1 ? "border-b border-gray-100" : ""}
|
||||
>
|
||||
<td className="px-3 py-2 align-top whitespace-nowrap">
|
||||
{t.rich(`proxmoxCert.table.rows.${idx}.fileRich`, { code, br })}
|
||||
</td>
|
||||
<td className="px-3 py-2 align-top">
|
||||
{row.originRich
|
||||
? t.rich(`proxmoxCert.table.rows.${idx}.originRich`, { code, strong, em })
|
||||
: t(`proxmoxCert.table.rows.${idx}.origin`)}
|
||||
</td>
|
||||
<td className="px-3 py-2 align-top">
|
||||
{row.whenRich
|
||||
? t.rich(`proxmoxCert.table.rows.${idx}.whenRich`, { code })
|
||||
: t(`proxmoxCert.table.rows.${idx}.when`)}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<Callout variant="info" title={t("proxmoxCert.callout.title")}>
|
||||
{t.rich("proxmoxCert.callout.bodyRich", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
|
||||
{t("letsencrypt.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.intro", { code, em, extlink1 })}
|
||||
</p>
|
||||
|
||||
<Callout variant="info" title={t("letsencrypt.prereqs.title")}>
|
||||
<ul className="list-disc pl-5 space-y-1 mb-0">
|
||||
{prereqItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`letsencrypt.prereqs.items.${idx}`, { strong })}</li>
|
||||
))}
|
||||
</ul>
|
||||
</Callout>
|
||||
|
||||
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">
|
||||
{t("letsencrypt.step1.heading")}
|
||||
</h3>
|
||||
<p className="mb-2 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step1.introRich", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-4">
|
||||
{t("letsencrypt.step1.code")}
|
||||
</pre>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step1.afterRich", { code })}
|
||||
</p>
|
||||
|
||||
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">
|
||||
{t("letsencrypt.step2.heading")}
|
||||
</h3>
|
||||
<p className="mb-3 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step2.http01Rich", { code, strong })}
|
||||
</p>
|
||||
<p className="mb-3 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step2.dns01Rich", { strong })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-4">
|
||||
{t("letsencrypt.step2.code")}
|
||||
</pre>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step2.outroRich", { code, extlink2 })}
|
||||
</p>
|
||||
|
||||
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">
|
||||
{t("letsencrypt.step3.heading")}
|
||||
</h3>
|
||||
<p className="mb-2 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step3.http01Rich", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-3">
|
||||
{t("letsencrypt.step3.code1")}
|
||||
</pre>
|
||||
<p className="mb-2 text-gray-800 leading-relaxed">{t("letsencrypt.step3.dns01")}</p>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-4">
|
||||
{t("letsencrypt.step3.code2")}
|
||||
</pre>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step3.wildcardRich", { code })}
|
||||
</p>
|
||||
|
||||
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">
|
||||
{t("letsencrypt.step4.heading")}
|
||||
</h3>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-3">
|
||||
{t("letsencrypt.step4.code")}
|
||||
</pre>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step4.afterRich", { code })}
|
||||
</p>
|
||||
|
||||
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">
|
||||
{t("letsencrypt.step5.heading")}
|
||||
</h3>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-3">
|
||||
{t("letsencrypt.step5.code")}
|
||||
</pre>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("letsencrypt.step5.afterRich", { code })}
|
||||
</p>
|
||||
|
||||
<Callout variant="tip" title={t("letsencrypt.gui.title")}>
|
||||
{t.rich("letsencrypt.gui.bodyRich", { em })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">
|
||||
{t("switchToHttps.heading")}
|
||||
</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("switchToHttps.bodyRich", { code, strong, em })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("custom.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("custom.intro", { strong })}
|
||||
</p>
|
||||
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
|
||||
{customListItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`custom.items.${idx}`, { code, strong })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">{t("custom.outro")}</p>
|
||||
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-4">
|
||||
{t("custom.code")}
|
||||
</pre>
|
||||
|
||||
<Callout variant="warning" title={t("custom.symlinkCallout.title")}>
|
||||
{t.rich("custom.symlinkCallout.bodyRich", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("afterHttps.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("afterHttps.bodyRich", { code })}
|
||||
</p>
|
||||
|
||||
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">
|
||||
{t("afterHttps.reverse.heading")}
|
||||
</h3>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("afterHttps.reverse.bodyRich", { code })}
|
||||
</p>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("trustCa.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("trustCa.intro1Rich", { code })}
|
||||
</p>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("trustCa.intro2Rich", { code })}
|
||||
</p>
|
||||
<pre className="rounded-md bg-gray-900 text-gray-100 p-4 overflow-x-auto text-xs font-mono mb-4">
|
||||
{t("trustCa.code")}
|
||||
</pre>
|
||||
<p className="mb-3 text-gray-800 leading-relaxed">{t("trustCa.thenImport")}</p>
|
||||
<ul className="list-disc pl-6 space-y-2 text-gray-800 mb-4">
|
||||
{trustCaItems.map((_, idx) => (
|
||||
<li key={idx}>{t.rich(`trustCa.items.${idx}`, { code, strong, em })}</li>
|
||||
))}
|
||||
</ul>
|
||||
<Callout variant="info" title={t("trustCa.standalone.title")}>
|
||||
{t.rich("trustCa.standalone.bodyRich", { code })}
|
||||
</Callout>
|
||||
|
||||
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("disable.heading")}</h2>
|
||||
<p className="mb-4 text-gray-800 leading-relaxed">
|
||||
{t.rich("disable.bodyRich", { strong })}
|
||||
</p>
|
||||
|
||||
<Callout variant="info" title={t("disable.stateCallout.title")}>
|
||||
{t.rich("disable.stateCallout.bodyRich", { code })}
|
||||
</Callout>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user