Landing page: always use absolute http:// service URLs
Show full http://host:port links on every card, fall back from localhost to the LAN IP, and warn about HTTPS-only browsers breaking plain HTTP.
This commit is contained in:
parent
7e5444a177
commit
60f8a89c87
1 changed files with 120 additions and 35 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>Homelab · Resource map</title>
|
<title>Homelab · Resource map</title>
|
||||||
<meta name="color-scheme" content="dark" />
|
<meta name="color-scheme" content="dark" />
|
||||||
|
<!-- These services are plain HTTP on the LAN (no TLS certs). Do not use https:// -->
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg: #0c0e12;
|
--bg: #0c0e12;
|
||||||
|
|
@ -17,6 +18,7 @@
|
||||||
--dim: #5c667a;
|
--dim: #5c667a;
|
||||||
--accent: #6ea8fe;
|
--accent: #6ea8fe;
|
||||||
--accent-soft: rgba(110, 168, 254, 0.12);
|
--accent-soft: rgba(110, 168, 254, 0.12);
|
||||||
|
--warn: #f0b429;
|
||||||
--media: #7dd3a0;
|
--media: #7dd3a0;
|
||||||
--download: #f0b429;
|
--download: #f0b429;
|
||||||
--ai: #c4a1ff;
|
--ai: #c4a1ff;
|
||||||
|
|
@ -79,7 +81,23 @@
|
||||||
|
|
||||||
.host-pill span { color: var(--dim); }
|
.host-pill span { color: var(--dim); }
|
||||||
|
|
||||||
/* Visual map lanes */
|
.http-note {
|
||||||
|
margin-top: 0.85rem;
|
||||||
|
padding: 0.65rem 0.85rem;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid rgba(240, 180, 41, 0.35);
|
||||||
|
background: rgba(240, 180, 41, 0.08);
|
||||||
|
color: var(--warn);
|
||||||
|
font-size: 0.88rem;
|
||||||
|
max-width: 44rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.http-note code {
|
||||||
|
font-family: var(--mono);
|
||||||
|
font-size: 0.85em;
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
.map {
|
.map {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -131,7 +149,7 @@
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -171,13 +189,14 @@
|
||||||
|
|
||||||
.card-url {
|
.card-url {
|
||||||
font-family: var(--mono);
|
font-family: var(--mono);
|
||||||
font-size: 0.75rem;
|
font-size: 0.72rem;
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
background: var(--accent-soft);
|
background: var(--accent-soft);
|
||||||
padding: 0.25rem 0.45rem;
|
padding: 0.3rem 0.45rem;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: inline-block;
|
display: block;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
line-height: 1.35;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-howto {
|
.card-howto {
|
||||||
|
|
@ -188,11 +207,6 @@
|
||||||
color: var(--dim);
|
color: var(--dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card.offline {
|
|
||||||
opacity: 0.55;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.guide {
|
section.guide {
|
||||||
margin-top: 2.5rem;
|
margin-top: 2.5rem;
|
||||||
background: var(--bg-elev);
|
background: var(--bg-elev);
|
||||||
|
|
@ -230,6 +244,8 @@
|
||||||
color: var(--dim);
|
color: var(--dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noscript .grid { margin-top: 0.75rem; }
|
||||||
|
|
||||||
@media (max-width: 560px) {
|
@media (max-width: 560px) {
|
||||||
.lane-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
|
.lane-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
|
||||||
}
|
}
|
||||||
|
|
@ -243,11 +259,49 @@
|
||||||
Everything below is available to PCs on this home network.
|
Everything below is available to PCs on this home network.
|
||||||
Click a card to open it. New here? Read the short guide at the bottom.
|
Click a card to open it. New here? Read the short guide at the bottom.
|
||||||
</p>
|
</p>
|
||||||
<div class="host-pill"><span>server</span> <strong id="host">…</strong></div>
|
<div class="host-pill"><span>server</span> <strong id="host">192.168.8.123</strong></div>
|
||||||
|
<p class="http-note">
|
||||||
|
All service links use plain <code>http://</code> (no HTTPS certificates on the LAN).
|
||||||
|
If a link fails, check the browser is not forcing HTTPS / “HTTPS-Only mode” for local IPs.
|
||||||
|
</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="map" id="map">
|
<div class="map" id="map">
|
||||||
<!-- filled by JS so host IP stays correct on any LAN address -->
|
<!-- Static fallback (no JS): explicit http:// URLs -->
|
||||||
|
<noscript>
|
||||||
|
<section class="lane media">
|
||||||
|
<div class="lane-head"><h2><span class="dot"></span>Watch & enjoy</h2></div>
|
||||||
|
<div class="grid">
|
||||||
|
<a class="card" href="http://192.168.8.123:8096/"><div class="card-title">Jellyfin</div><span class="card-url">http://192.168.8.123:8096/</span></a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="lane download">
|
||||||
|
<div class="lane-head"><h2><span class="dot"></span>Find & download</h2></div>
|
||||||
|
<div class="grid">
|
||||||
|
<a class="card" href="http://192.168.8.123:8989/"><div class="card-title">Sonarr</div><span class="card-url">http://192.168.8.123:8989/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:7878/"><div class="card-title">Radarr</div><span class="card-url">http://192.168.8.123:7878/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:8686/"><div class="card-title">Lidarr</div><span class="card-url">http://192.168.8.123:8686/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:9696/"><div class="card-title">Prowlarr</div><span class="card-url">http://192.168.8.123:9696/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:6767/"><div class="card-title">Bazarr</div><span class="card-url">http://192.168.8.123:6767/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:8080/"><div class="card-title">qBittorrent</div><span class="card-url">http://192.168.8.123:8080/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:8085/"><div class="card-title">SABnzbd</div><span class="card-url">http://192.168.8.123:8085/</span></a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="lane ai">
|
||||||
|
<div class="lane-head"><h2><span class="dot"></span>Local AI</h2></div>
|
||||||
|
<div class="grid">
|
||||||
|
<a class="card" href="http://192.168.8.123:3000/"><div class="card-title">Open WebUI</div><span class="card-url">http://192.168.8.123:3000/</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:8081/v1"><div class="card-title">Bonsai API</div><span class="card-url">http://192.168.8.123:8081/v1</span></a>
|
||||||
|
<a class="card" href="http://192.168.8.123:3001/"><div class="card-title">OpenHands</div><span class="card-url">http://192.168.8.123:3001/</span></a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="lane code">
|
||||||
|
<div class="lane-head"><h2><span class="dot"></span>Code & git</h2></div>
|
||||||
|
<div class="grid">
|
||||||
|
<a class="card" href="http://192.168.8.123:3002/"><div class="card-title">Forgejo</div><span class="card-url">http://192.168.8.123:3002/</span></a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</noscript>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section class="guide">
|
<section class="guide">
|
||||||
|
|
@ -257,23 +311,37 @@
|
||||||
<li><strong>Request / automate media</strong> — use <em>Sonarr</em> (TV), <em>Radarr</em> (movies), <em>Lidarr</em> (music). They search via <em>Prowlarr</em> and download with torrents or Usenet.</li>
|
<li><strong>Request / automate media</strong> — use <em>Sonarr</em> (TV), <em>Radarr</em> (movies), <em>Lidarr</em> (music). They search via <em>Prowlarr</em> and download with torrents or Usenet.</li>
|
||||||
<li><strong>Downloads</strong> — <em>qBittorrent</em> is for torrents (goes through the VPN). <em>SABnzbd</em> is for Usenet/NZB files. You usually don’t open these unless something is stuck.</li>
|
<li><strong>Downloads</strong> — <em>qBittorrent</em> is for torrents (goes through the VPN). <em>SABnzbd</em> is for Usenet/NZB files. You usually don’t open these unless something is stuck.</li>
|
||||||
<li><strong>Talk to the local AI</strong> — <em>Open WebUI</em> is the chat box. The model runs on this mini PC (private, no cloud).</li>
|
<li><strong>Talk to the local AI</strong> — <em>Open WebUI</em> is the chat box. The model runs on this mini PC (private, no cloud).</li>
|
||||||
<li><strong>Code & git</strong> — <em>Forgejo</em> is our GitHub-like site. <em>OpenHands</em> is an AI coding agent (optional; start it if the link fails).</li>
|
<li><strong>Code & git</strong> — <em>Forgejo</em> is our GitHub-like site. <em>OpenHands</em> is an AI coding agent.</li>
|
||||||
<li><strong>Only on this Wi‑Fi / LAN</strong> — these links use the server’s local address. They won’t work from the mobile internet unless you set up remote access later.</li>
|
<li><strong>HTTP only</strong> — use <code>http://</code> links as shown. There are no TLS certificates on these ports yet; <code>https://</code> will fail.</li>
|
||||||
|
<li><strong>Only on this Wi‑Fi / LAN</strong> — these links won’t work from mobile data unless you set up remote access later.</li>
|
||||||
</ol>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
Served by Caddy · arr-stack · dark map for LAN browsers
|
Served by Caddy · arr-stack · plain HTTP on the LAN
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
const host = location.hostname || "192.168.8.123";
|
// Prefer the host you used to open this page; never upgrade to https.
|
||||||
|
// If opened via localhost on the server, fall back to the LAN IP.
|
||||||
|
const DEFAULT_HOST = "192.168.8.123";
|
||||||
|
let host = (location.hostname || DEFAULT_HOST).trim();
|
||||||
|
if (!host || host === "localhost" || host === "127.0.0.1" || host === "::1") {
|
||||||
|
host = DEFAULT_HOST;
|
||||||
|
}
|
||||||
document.getElementById("host").textContent = host;
|
document.getElementById("host").textContent = host;
|
||||||
|
|
||||||
const u = (port, path) =>
|
/** Always absolute plain-HTTP URL with trailing slash for UIs */
|
||||||
"http://" + host + ":" + port + (path || "");
|
function httpUrl(port, path) {
|
||||||
|
path = path || "/";
|
||||||
|
if (path.charAt(0) !== "/") path = "/" + path;
|
||||||
|
// APIs like /v1 should not force trailing slash doubling
|
||||||
|
var base = "http://" + host + ":" + String(port);
|
||||||
|
if (path === "/") return base + "/";
|
||||||
|
return base + path;
|
||||||
|
}
|
||||||
|
|
||||||
const lanes = [
|
const lanes = [
|
||||||
{
|
{
|
||||||
|
|
@ -285,6 +353,7 @@
|
||||||
name: "Jellyfin",
|
name: "Jellyfin",
|
||||||
what: "TV, movies & music player (like Netflix at home)",
|
what: "TV, movies & music player (like Netflix at home)",
|
||||||
port: 8096,
|
port: 8096,
|
||||||
|
path: "/",
|
||||||
how: "Open → pick a library → play. Best starting point for family.",
|
how: "Open → pick a library → play. Best starting point for family.",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -298,42 +367,49 @@
|
||||||
name: "Sonarr",
|
name: "Sonarr",
|
||||||
what: "TV show manager — finds and downloads episodes",
|
what: "TV show manager — finds and downloads episodes",
|
||||||
port: 8989,
|
port: 8989,
|
||||||
|
path: "/",
|
||||||
how: "Add a series → it searches and grabs new episodes automatically.",
|
how: "Add a series → it searches and grabs new episodes automatically.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Radarr",
|
name: "Radarr",
|
||||||
what: "Movie manager — finds and downloads films",
|
what: "Movie manager — finds and downloads films",
|
||||||
port: 7878,
|
port: 7878,
|
||||||
|
path: "/",
|
||||||
how: "Add a movie → it searches and downloads when available.",
|
how: "Add a movie → it searches and downloads when available.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Lidarr",
|
name: "Lidarr",
|
||||||
what: "Music manager — albums & artists",
|
what: "Music manager — albums & artists",
|
||||||
port: 8686,
|
port: 8686,
|
||||||
|
path: "/",
|
||||||
how: "Add an artist/album → downloads to the music library.",
|
how: "Add an artist/album → downloads to the music library.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Prowlarr",
|
name: "Prowlarr",
|
||||||
what: "Search hub — talks to torrent/Usenet indexers",
|
what: "Search hub — talks to torrent/Usenet indexers",
|
||||||
port: 9696,
|
port: 9696,
|
||||||
|
path: "/",
|
||||||
how: "Usually leave alone; Sonarr/Radarr use it under the hood.",
|
how: "Usually leave alone; Sonarr/Radarr use it under the hood.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Bazarr",
|
name: "Bazarr",
|
||||||
what: "Subtitles for TV & movies",
|
what: "Subtitles for TV & movies",
|
||||||
port: 6767,
|
port: 6767,
|
||||||
|
path: "/",
|
||||||
how: "Fetches subs once Sonarr/Radarr have the files.",
|
how: "Fetches subs once Sonarr/Radarr have the files.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "qBittorrent",
|
name: "qBittorrent",
|
||||||
what: "Torrent downloads (VPN-protected)",
|
what: "Torrent downloads (VPN-protected)",
|
||||||
port: 8080,
|
port: 8080,
|
||||||
|
path: "/",
|
||||||
how: "Check the queue if a torrent is stuck. Login: admin (see server docs).",
|
how: "Check the queue if a torrent is stuck. Login: admin (see server docs).",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "SABnzbd",
|
name: "SABnzbd",
|
||||||
what: "Usenet / NZB downloads",
|
what: "Usenet / NZB downloads",
|
||||||
port: 8085,
|
port: 8085,
|
||||||
|
path: "/",
|
||||||
how: "Queue for NZB jobs from Prowlarr/Sonarr. SSL to the provider.",
|
how: "Queue for NZB jobs from Prowlarr/Sonarr. SSL to the provider.",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
@ -347,6 +423,7 @@
|
||||||
name: "Open WebUI",
|
name: "Open WebUI",
|
||||||
what: "Chat with the local AI (docs, questions, coding help)",
|
what: "Chat with the local AI (docs, questions, coding help)",
|
||||||
port: 3000,
|
port: 3000,
|
||||||
|
path: "/",
|
||||||
how: "Create an account on first visit. Chat stays on your network.",
|
how: "Create an account on first visit. Chat stays on your network.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -358,9 +435,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "OpenHands",
|
name: "OpenHands",
|
||||||
what: "AI coding agent (optional service)",
|
what: "AI coding agent",
|
||||||
port: 3001,
|
port: 3001,
|
||||||
how: "AI coding agent — always on with this stack. Point it at /workspace for projects.",
|
path: "/",
|
||||||
|
how: "Always on with this stack. Point it at /workspace for projects.",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -373,35 +451,42 @@
|
||||||
name: "Forgejo",
|
name: "Forgejo",
|
||||||
what: "Git hosting — our private GitHub",
|
what: "Git hosting — our private GitHub",
|
||||||
port: 3002,
|
port: 3002,
|
||||||
|
path: "/",
|
||||||
how: "Sign in → browse repos (e.g. tim/stack). Clone over HTTP or SSH port 2222.",
|
how: "Sign in → browse repos (e.g. tim/stack). Clone over HTTP or SSH port 2222.",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function esc(s) {
|
||||||
|
return String(s)
|
||||||
|
.replace(/&/g, "&")
|
||||||
|
.replace(/</g, "<")
|
||||||
|
.replace(/>/g, ">")
|
||||||
|
.replace(/"/g, """);
|
||||||
|
}
|
||||||
|
|
||||||
const map = document.getElementById("map");
|
const map = document.getElementById("map");
|
||||||
map.innerHTML = lanes
|
map.innerHTML = lanes
|
||||||
.map((lane) => {
|
.map(function (lane) {
|
||||||
const cards = lane.items
|
const cards = lane.items
|
||||||
.map((item) => {
|
.map(function (item) {
|
||||||
const href = u(item.port, item.path || "");
|
const href = httpUrl(item.port, item.path);
|
||||||
const pathLabel = item.path ? item.path : "";
|
|
||||||
return (
|
return (
|
||||||
'<a class="card" href="' +
|
'<a class="card" href="' +
|
||||||
href +
|
esc(href) +
|
||||||
'" target="_blank" rel="noopener">' +
|
'" target="_blank" rel="noopener noreferrer">' +
|
||||||
'<div class="card-title">' +
|
'<div class="card-title">' +
|
||||||
item.name +
|
esc(item.name) +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
'<div class="card-what">' +
|
'<div class="card-what">' +
|
||||||
item.what +
|
esc(item.what) +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
'<span class="card-url">:' +
|
'<span class="card-url">' +
|
||||||
item.port +
|
esc(href) +
|
||||||
pathLabel +
|
|
||||||
"</span>" +
|
"</span>" +
|
||||||
'<div class="card-howto">' +
|
'<div class="card-howto">' +
|
||||||
item.how +
|
esc(item.how) +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</a>"
|
"</a>"
|
||||||
);
|
);
|
||||||
|
|
@ -409,12 +494,12 @@
|
||||||
.join("");
|
.join("");
|
||||||
return (
|
return (
|
||||||
'<section class="lane ' +
|
'<section class="lane ' +
|
||||||
lane.id +
|
esc(lane.id) +
|
||||||
'">' +
|
'">' +
|
||||||
'<div class="lane-head"><h2><span class="dot"></span>' +
|
'<div class="lane-head"><h2><span class="dot"></span>' +
|
||||||
lane.title +
|
esc(lane.title) +
|
||||||
'</h2><span class="hint">' +
|
'</h2><span class="hint">' +
|
||||||
lane.hint +
|
esc(lane.hint) +
|
||||||
"</span></div>" +
|
"</span></div>" +
|
||||||
'<div class="grid">' +
|
'<div class="grid">' +
|
||||||
cards +
|
cards +
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue