From 76388f885cf7013ceb415bc4b8700482e5b35dde Mon Sep 17 00:00:00 2001 From: qiudl Date: Sat, 3 Jan 2026 19:15:49 +1030 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E9=A1=B5=E5=AF=86=E7=A0=81=E4=BF=9D=E6=8A=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 CryptoJS AES-256 加密页面内容 - 添加密码输入界面,正确密码解锁显示 - 修复 fnos NAS 端口 5000 → 5667 - 添加加密生成脚本 generate-encrypted.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- generate-encrypted.js | 23 +++++ nav-home-encrypted.html | 214 ++++++++++++++++++++++++++++++++++++++++ nav-home.html | 2 +- package-lock.json | 18 ++++ package.json | 5 + 5 files changed, 261 insertions(+), 1 deletion(-) create mode 100644 generate-encrypted.js create mode 100644 nav-home-encrypted.html create mode 100644 package-lock.json create mode 100644 package.json diff --git a/generate-encrypted.js b/generate-encrypted.js new file mode 100644 index 0000000..4c08870 --- /dev/null +++ b/generate-encrypted.js @@ -0,0 +1,23 @@ +const CryptoJS = require('crypto-js'); +const fs = require('fs'); + +// 读取原始 HTML +const originalHtml = fs.readFileSync('nav-home.html', 'utf8'); + +// 使用密码加密 +const password = 'joylodging'; +const encrypted = CryptoJS.AES.encrypt(originalHtml, password).toString(); + +// 读取模板 +let template = fs.readFileSync('nav-home-encrypted.html', 'utf8'); + +// 替换占位符 +template = template.replace('const ENCRYPTED_CONTENT = "ENCRYPTED_PLACEHOLDER";', + `const ENCRYPTED_CONTENT = "${encrypted}";`); + +// 写入最终文件 +fs.writeFileSync('nav-home-encrypted.html', template); + +console.log('Encryption complete!'); +console.log('Encrypted content length:', encrypted.length); +console.log('First 100 chars:', encrypted.substring(0, 100)); diff --git a/nav-home-encrypted.html b/nav-home-encrypted.html new file mode 100644 index 0000000..58eefeb --- /dev/null +++ b/nav-home-encrypted.html @@ -0,0 +1,214 @@ + + + + + + Access Required + + + +
+ + + + + + + diff --git a/nav-home.html b/nav-home.html index 30aa1e9..0d7e8df 100644 --- a/nav-home.html +++ b/nav-home.html @@ -897,7 +897,7 @@ id: 'fnos', name: '飞牛NAS', description: 'NAS存储 · 文件管理', - url: 'http://100.118.62.18:5000', + url: 'http://100.118.62.18:5667', icon: '💾', isCustom: false }, diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c0cfd35 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "ai-community", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "crypto-js": "^4.2.0" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9bd309c --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "crypto-js": "^4.2.0" + } +}