From d0525eb71863cd0dc7519e51cb9dc8880bca6ab8 Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Mon, 6 Apr 2026 20:32:25 -0400 Subject: [PATCH] Fix extension 404, simplify UDP/relay UI - Add chrome-extension/ to Dockerfile COPY (was missing, caused 404 on download) - Remove UDP Relay tab from admin panel (relay is server-side, no user config needed) - Remove upload mode toggle buttons, replace with clean inline status bar - Extension panel: drop relay port-forwarding note, simplify to 'extension required' message - UDP hint shown inline only when extension is detected in browser Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 1 + public/index.html | 56 ++++++++++++++++++++++------------------------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff05808..5b1660b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN npm install --omit=dev COPY server.js . COPY lib/ ./lib/ COPY public/ ./public/ +COPY chrome-extension/ ./chrome-extension/ # Data volume for persistent config VOLUME ["/data"] diff --git a/public/index.html b/public/index.html index 0455dda..53bfbb1 100644 --- a/public/index.html +++ b/public/index.html @@ -461,18 +461,10 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
-
-
Upload Mode
-
- - -
-
- HTTP Mode: Direct S3 presigned upload. Best for LAN and stable connections. Speeds: 50–200 MB/s. +
+
+ HTTP Mode: Direct S3 presigned upload. Best for LAN and stable connections. +
@@ -524,7 +516,6 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
S3 Storage
-
UDP Relay
AMPP
🧩 Extension
Users
@@ -592,8 +583,8 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
-
Chrome Extension — UDP Upload
-

The Dragon Wind Chrome extension enables UDP-accelerated uploads directly from your browser. Download the extension package below, then follow the steps to install it.

+
Chrome Extension
+

The Chrome extension is required to use fast UDP uploads. Install it once in Chrome — no other setup needed on your end.

@@ -610,7 +601,7 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
2
Open Chrome Extensions -

In Chrome, navigate to chrome://extensions or open the menu → More Tools → Extensions.

+

Navigate to chrome://extensions or open Chrome menu → More Tools → Extensions.

@@ -624,22 +615,17 @@ body::before{content:'';position:fixed;inset:0;background:radial-gradient(ellips
4
Load the extension -

Click Load unpacked, then navigate to and select the dragon-wind-extension folder you unzipped in step 1.

+

Click Load unpacked and select the dragon-wind-extension folder you unzipped in step 1.

5
- Configure the extension -

Click the 🐉 Dragon Wind icon in Chrome's toolbar. Enter this server's URL and log in with your credentials. UDP uploads will now be available from any page.

+ Sign in +

Click the extension icon in Chrome's toolbar, enter this portal's URL, and log in. UDP mode will now be available on the upload page.

- -
- 📡 UDP Port Forwarding
- For uploads from outside your local network, make sure your UDP relay port is forwarded in your router. You can find your assigned UDP port in the .env file (RELAY_UDP_PORT) or check the UDP Relay tab above. -
@@ -925,19 +911,29 @@ async function downloadExtension() { // ============================================================ function setMode(mode) { uploadMode = mode; - document.getElementById('mode-http').className = `mode-btn${mode==='http'?' active-http':''}`; - document.getElementById('mode-udp').className = `mode-btn${mode==='udp' ?' active-udp':''}`; - const btn = document.getElementById('upload-btn'); - const desc = document.getElementById('mode-desc'); + const btn = document.getElementById('upload-btn'); + const label = document.getElementById('mode-label'); + const detail = document.getElementById('mode-detail'); + const hint = document.getElementById('udp-ext-hint'); if (mode === 'http') { btn.className = 'btn-upload'; - desc.innerHTML = 'HTTP Mode: Direct S3 presigned upload. Best for LAN and stable connections. Speeds: 50–200 MB/s.'; + if (label) label.textContent = 'HTTP Mode:'; + if (detail) detail.textContent = 'Direct S3 presigned upload. Best for LAN and stable connections.'; + if (hint) hint.style.display = 'none'; } else { btn.className = 'btn-upload udp'; - desc.innerHTML = 'UDP Mode: Relay-accelerated transfer. 4–8× faster on WAN/lossy networks. Requires relay server.'; + if (label) label.textContent = 'UDP Mode:'; + if (detail) detail.textContent = 'Fast relay-accelerated transfer via the Chrome extension.'; + if (hint) hint.style.display = 'none'; } updateUploadBtn(); } +function checkUdpExtension() { + // Extension injects a flag on the page when active + const extAvailable = !!(window.__dragonWindExtension || window.__dwExt); + const hint = document.getElementById('udp-ext-hint'); + if (hint && extAvailable && uploadMode === 'http') hint.style.display = 'inline'; +} // ============================================================ // FOLDERS