Commit Graph

46 Commits

Author SHA1 Message Date
dependabot[bot]
cfd4413a5e build(deps-dev): bump sharp from 0.34.5 to 0.35.0
Bumps [sharp](https://github.com/lovell/sharp) from 0.34.5 to 0.35.0.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Commits](https://github.com/lovell/sharp/compare/v0.34.5...v0.35.0)

---
updated-dependencies:
- dependency-name: sharp
  dependency-version: 0.35.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-22 09:45:57 +00:00
dependabot[bot]
9b122e0e7c build(deps): bump axios from 1.16.0 to 1.18.0
Bumps [axios](https://github.com/axios/axios) from 1.16.0 to 1.18.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.16.0...v1.18.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-20 18:20:47 +00:00
Abner
5f78b2e45b 🔧 chore: 增加生产资源脱链检查并完善质量门禁
新增 check-asset-links,接入 quality-check 与 pre-push;修正 resource-hints 中已失效的 Webpack 产物路径。
2026-07-17 20:48:11 +08:00
Abner
41ec3a91b7 🔒 security: 通过 overrides 升级 ws 至 8.21.0
修复 GHSA-96hv-2xvq-fx4p:小分片导致内存耗尽 DoS(jsdom 传递依赖)。
2026-07-11 13:11:52 +08:00
Abner
5e55f0a569 🔒 security: 升级 morgan 至 1.11.0 修复 Dependabot 告警
修复 GHSA-4vj7-5mj6-jm8m::remote-user 日志伪造(控制字符未中和)。
2026-07-11 13:09:06 +08:00
Neo Vern
7298ae4a0d feat: QR 码本地打包 + Edge Function 直接生成 (#86)
*  feat: 打包 qrcode-generator@1.4.4 到本地 ES 模块

* ♻️ refactor(qrcode): 移除 CDN 加载逻辑,改用本地 import 引入 qrcode-generator

* 🔧 chore: 移除 CDN preconnect 提示,QR 码库已内联

* 🔧 chore: 清理 CSP 配置,移除不再需要的 CDN 域名

*  feat: 将 QR 码生成迁移到 Edge Function,消除后端冷启动延迟

- 在 Edge Function 中内联 qrcode-generator 库(~20KB),直接生成 QR 码
- 删除废弃的 Netlify Function (qrcode-generate.js)
- 更新 server.js 移除对已删除函数的引用
- 更新测试文件适配新的 Edge 内联架构

* ♻️ refactor: 代码质量修复 — 移除死代码、消除变量遮蔽、添加交叉引用注释

* 🔧 chore: 修复非阻塞风险 — 补充 strict 模式、移除废弃 qrcode 依赖

- Edge Function qrcode-lib.js 补充 'use strict' 声明,与浏览器版保持一致
- 移除已废弃的 qrcode npm 依赖(原用于已删除的 Netlify Function)

* ♻️ refactor: 消除魔法数字、补充脆耦合和 async 技术债注释

- Edge Function 中 QR margin 魔法数字 8 替换为 QR_MARGIN_MODULES 常量
- generateQRCodeLocal 补充 async 无 await 的技术债说明
- error.message.startsWith 条件补充校验函数耦合关系注释

* 🐛 fix: 修复边界条件 — null JSON body、vendor 字符串异常、CDN preconnect 残留

- Edge Function: null JSON body 解构移到 try/catch 内,添加 null/非对象检查
- qrcode-generator: 库 throw 字符串时统一转换为 Error 对象,避免 .startsWith 崩溃
- index.html: 移除不再需要的 CDN preconnect 提示(jsdelivr/cdnjs)

* ♻️ refactor: 修复 CSP 恢复、异常归一化、自定义 Error 类、负面路径测试

- netlify.toml: 恢复 script-src 中 cdn.jsdelivr.net(Bootstrap JS 仍依赖)
- Edge Function catch: 归一化非 Error 异常(库可能 throw 字符串)
- Edge Function QR margin: createDataURL(cellSize, 2) → createDataURL(cellSize, cellSize * 2) 对齐模块边距
- Edge Function: 补充认证模型和 QR 格式变更注释
- qrcode-generator.js: 引入 QRCodeValidationError 替代 error.message.startsWith 脆耦合
- tests/bff-proxy: 添加 6 个 Edge QR 负面路径测试(无效 JSON、空/超长/非字符串 data、超范围 size)
- tests/qrcode-generator: 添加库 throw 字符串异常的测试
- scripts/sync-qrcode-lib.js: 新增库代码同步验证脚本

* 🐛 fix: 修复 server.js CSP 缺少 jsdelivr、同步脚本 CRLF 归一化、fallback 拦截校验错误

- server.js: 恢复 script-src 中 cdn.jsdelivr.net(本地开发 Bootstrap JS 依赖)
- sync-qrcode-lib.js: 归一化 CRLF 换行符避免跨平台误报
- qrcode-generator.js: generateQRCodeWithFallback 入口处拦截 QRCodeValidationError,避免无效输入触发无意义的后端降级
2026-06-25 22:15:17 +08:00
dependabot[bot]
04b77f59b8 build(deps-dev): bump @babel/core from 7.29.0 to 7.29.6 (#82)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.29.0 to 7.29.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 12:32:02 +08:00
Neo Vern
e506906f75 Merge pull request #78 from Silentely/dependabot/npm_and_yarn/multi-a23dd1c932
build(deps): bump @opentelemetry/core and @sentry/node
2026-06-23 12:29:07 +08:00
dependabot[bot]
f94269ecd3 build(deps-dev): bump http-proxy-middleware from 3.0.5 to 3.0.7
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 3.0.5 to 3.0.7.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v3.0.7/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v3.0.5...v3.0.7)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-version: 3.0.7
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-20 10:31:01 +00:00
dependabot[bot]
943901a567 build(deps): bump @opentelemetry/core and @sentry/node
Bumps [@opentelemetry/core](https://github.com/open-telemetry/opentelemetry-js) to 2.8.0 and updates ancestor dependency [@sentry/node](https://github.com/getsentry/sentry-javascript). These dependencies need to be updated together.


Updates `@opentelemetry/core` from 2.5.1 to 2.8.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-js/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-js/compare/v2.5.1...v2.8.0)

Updates `@sentry/node` from 10.39.0 to 10.58.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/10.39.0...10.58.0)

---
updated-dependencies:
- dependency-name: "@opentelemetry/core"
  dependency-version: 2.8.0
  dependency-type: indirect
- dependency-name: "@sentry/node"
  dependency-version: 10.58.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-17 16:02:37 +00:00
dependabot[bot]
8c779bbc03 build(deps-dev): bump esbuild from 0.25.12 to 0.28.1
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.12 to 0.28.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2025.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.12...v0.28.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.28.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 12:35:27 +00:00
Abner
f5c5dee5ab 🐛 fix: 修复 Session 恢复后二维码和 LPA 不显示的问题
问题:
- 用户完成 eSIM 激活后,因外部二维码服务不可用导致页面空白
- Session 恢复时未调用 showESimResult() 显示二维码和 LPA 信息

解决方案:
1. 新增通用二维码生成模块 (src/js/modules/qrcode-generator.js)
   - 实现三层降级策略:本地 CDN → 后端 Function → 文本提示
   - 消除对外部服务的依赖,提升隐私保护

2. 新增后端 Function (netlify/functions/qrcode-generate.js)
   - POST /bff/qrcode-generate 接口
   - 返回 base64 编码的 PNG 二维码
   - withAuth 中间件保护 + 输入验证

3. 重构前端二维码生成逻辑
   - Giffgaff/Simyo 统一使用 generateQRCodeWithFallback()
   - 保留并发调用防护和 tooltip 交互
   - 使用 i18n 翻译替代硬编码错误提示

4. 修复 Session 恢复逻辑
   - 在 handleSessionRestore() 中调用 showESimResult()
   - 确保刷新页面后二维码和 LPA 正常显示

技术改进:
- 懒加载 qrcode.js(~13KB gzip),仅在首次调用时加载
- 完整的测试覆盖(前端单元测试 + 后端安全测试)
- 更新 BFF 路由配置(Edge Function + 本地开发服务器)

Closes #75
2026-06-13 19:20:22 +08:00
dependabot[bot]
31098270d2 build(deps): bump axios from 1.15.2 to 1.16.0
Bumps [axios](https://github.com/axios/axios) from 1.15.2 to 1.16.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.2...v1.16.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.16.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-29 16:23:07 +00:00
Abner
defcea2160 🔥 chore: 清理 Legacy 冻结校验工具链及相关残留配置
- 删除 `scripts/verify-legacy-frozen.js` 及 `scripts/legacy-freeze.json`,移除 legacy 文件冻结校验能力
- 删除 `package.json` 中 `verify:legacy` 和 `verify:legacy:update` 两个 npm scripts
- 删除 `build-static.js` 中移除 legacy HTML 文件的构建时清理逻辑
- 移除 `server.js` 中已废弃的 `/simyo-static` 路由及其兼容静态路径
- 更新 CLAUDE.md、scripts/CLAUDE.md 及两个业务模块架构文档,将"Legacy 架构"表述统一改为"原生 ES6 模块"
2026-05-25 20:34:53 +08:00
dependabot[bot]
67aa52db0e build(deps): bump qs and express
Bumps [qs](https://github.com/ljharb/qs) to 6.15.2 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `qs` from 6.14.2 to 6.15.2
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.2...v6.15.2)

Updates `express` from 4.22.1 to 4.22.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/v4.22.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/v4.22.1...v4.22.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.15.2
  dependency-type: indirect
- dependency-name: express
  dependency-version: 4.22.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-23 12:46:21 +00:00
Abner
49ac9e15ff ♻️ refactor: 废弃 Legacy 前端,统一使用 Modular 版本
- 删除 giffgaff_complete_esim.html 和 simyo_complete_esim.html
- 构建脚本自动排除 Legacy HTML 文件
- Netlify 添加 Legacy URL 301 重定向到 Modular 版本
- 移除 verify-legacy-frozen.js 构建检查
- 更新 6 个文档文件中的 Legacy 文件引用

修复 Issue #50: Legacy 前端缺少 simSwapMfaChallenge 步骤导致 500 错误
2026-05-17 23:25:47 +08:00
dependabot[bot]
63fa2bf3d6 build(deps): bump axios from 1.15.0 to 1.15.2 (#43)
Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.0...v1.15.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-06 18:40:59 +08:00
Abner
7df5def91d 🔧 chore: 升级转译目标至 Chrome 90+ 并引入 browserslist 配置
- package.json 新增 browserslist 字段(defaults, Chrome >= 90, not dead)
- transpile-dist-js.js 从 browserslist 动态解析目标,不再硬编码 Chrome 77
- 减少不必要的语法降级,输出更精简的现代 JS
2026-04-25 16:56:26 +08:00
Abner
9cfa35adb3 🔧 chore: 修复 Dependabot 安全告警
- postcss 升级至 8.5.10 (修复 XSS via unescaped </style>)
- uuid 升级至 14.0.0 (修复 buffer bounds check 缺失)
2026-04-25 16:35:41 +08:00
Abner
7fd54dde39 ♻️ refactor: 修复安全漏洞并优化架构债务
安全修复:
- 修复 dom.js 和 simyo/app.js 中的 innerHTML XSS 注入风险
- 使用 HTMLSanitizer.escapeHtml/escapeAttr 替代直接模板拼接
- 将 onclick 内联事件替换为 data-* 属性 + addEventListener
- 移除 server.js 中硬编码的 Simyo X-Client-Token

架构优化:
- 新增 _shared/rate-limiter.js 分布式限流模块 (Netlify Blobs)
- verify-cookie.js 内存限流替换为 KV 跨实例共享方案
- giffgaff/utils.js debounce/throttle 改为委托共享实现
- simyo/app.js 会话存储迁移至 SecureStorage (自动 TTL 过期)
- 合并 notifications-internal.js 至 notifications.js 消除双维护路径
2026-04-25 16:30:19 +08:00
Abner
8cb4d32419 🔧 chore: 更新 Jest 版本至 30.3.0
- 将 package.json 中的 Jest 依赖版本从 ^30.2.0 升级至 ^30.3.0
- 自动更新 package-lock.json 以反映新的依赖锁定文件
- 保留其他开发依赖版本不变,仅针对 Jest 进行指定版本升级
2026-04-23 18:06:52 +08:00
dependabot[bot]
b631dbe356 build(deps): bump axios from 1.13.5 to 1.15.0 (#39)
Bumps [axios](https://github.com/axios/axios) from 1.13.5 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.5...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-13 18:17:12 +08:00
Abner
01df53a9df 🔧 chore(hooks): 新增提交与推送质量门禁 2026-04-06 18:13:44 +08:00
Abner
1db402a372 chore: 更新依赖版本并添加新依赖
- 将 serialize-javascript 依赖版本从 ^7.0.3 更新到 ^7.0.5
- 新增 path-to-regexp 依赖,版本为 ^0.1.13
- 同步更新 package-lock.json 文件以反映依赖变更
2026-03-29 22:03:32 +08:00
Abner
7869a729c9 fix(deps): 修复 Dependabot 安全漏洞
- serialize-javascript: 6.0.2 → ^7.0.3 (RCE 漏洞, GHSA #39)
- minimatch: ^10.2.2 → ^10.2.3 (ReDoS 漏洞, GHSA-7r86/GHSA-23c5)
- rollup: 2.79.2 → ^2.80.0 (路径遍历漏洞, GHSA-mw96)

通过 package.json overrides 强制版本提升,npm audit 0 漏洞
2026-03-01 15:42:58 +08:00
Abner
ea0d187acd fix(deps): 修复 Dependabot 安全漏洞
- 添加 npm overrides 强制使用安全版本
  - minimatch: ^10.2.2 (修复 ReDoS 漏洞 CVE-2026-26996)
  - glob: ^11.1.0
- 更新 Jest 到 v30.2.0
- 漏洞数量: 31 → 0
2026-02-21 17:14:45 +08:00
dependabot[bot]
3e159f4079 build(deps): bump axios from 1.13.2 to 1.13.5 (#21)
Bumps [axios](https://github.com/axios/axios) from 1.13.2 to 1.13.5.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.2...v1.13.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-12 08:08:57 +08:00
dependabot[bot]
2698bb0acb build(deps-dev): bump webpack from 5.103.0 to 5.105.0
升级 webpack 及相关依赖以修复已知问题并提升性能

主要变更:
- webpack: 5.103.0 → 5.105.0
- browserslist: 4.28.0 → 4.28.1
- enhanced-resolve: 5.18.3 → 5.19.0
- es-module-lexer: 1.7.0 → 2.0.0
- terser-webpack-plugin: 5.3.14 → 5.3.16
- watchpack: 2.4.4 → 2.5.1

改进内容:
- 修复 ESM 模块处理 bug
- 优化 import.meta.env 性能
- 改进 Worker 模块解析
- 更新 TypeScript 类型定义

安全审查: 已通过所有安全检查
2026-02-08 09:38:29 +08:00
dependabot[bot]
023dfe3de1 build(deps): bump qs and express
Bumps [qs](https://github.com/ljharb/qs) to 6.14.1 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `qs` from 6.13.0 to 6.14.1
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.13.0...v6.14.1)

Updates `express` from 4.21.2 to 4.22.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/v4.22.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.2...v4.22.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
- dependency-name: express
  dependency-version: 4.22.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 18:29:54 +00:00
Abner
9da2e0bf95 fix: giffgaff tutorial link; freeze legacy pages 2025-12-31 00:21:43 +08:00
Abner
0d99f1f600 feat: 集成 Sentry 错误监控系统
前端监控 (src/js/modules/sentry-init.js):
- 使用 @sentry/browser SDK v10+ 和 browserTracingIntegration()
- 智能环境检测,开发环境自动禁用
- 敏感数据过滤 (authKey, token, password, cookie)
- 性能追踪采样率 10%

后端监控 (netlify/functions/_shared/sentry.js):
- 使用 @sentry/node 用于 Netlify Functions
- 仅上报 5xx 服务端错误,节省配额
- Serverless 环境 flush() 确保错误发送

构建集成 (webpack.config.js):
- @sentry/webpack-plugin 自动上传 Source Maps
- 自动使用 Netlify COMMIT_REF 作为 release 版本
- 上传后自动删除本地 source maps

环境变量:
- SENTRY_DSN: 错误上报端点
- SENTRY_AUTH_TOKEN: Source Maps 上传认证
- SENTRY_ORG / SENTRY_PROJECT: 组织和项目标识
2025-12-13 22:03:02 +08:00
Abner
4a0fcc94fe feat: 重构Netlify Functions架构并增强代码质量
- 新增统一的中间件模块,提供鉴权、CORS和错误处理功能
- 重构所有Functions使用withAuth中间件简化代码结构
- 添加安全存储模块替代localStorage,防御XSS攻击
- 引入HTML清理工具,自动转义特殊字符和验证URL安全性
- 创建代码质量检查脚本,验证语法、环境变量和依赖完整性
- 添加构建日志工具和重构脚本,统一替换console.log为Logger
- 引入ESLint配置,提升代码质量和一致性
- 重构Giffgaff相关API,统一错误处理和验证逻辑
- 优化构建脚本,添加压缩和图片优化功能
- 新增健康检查端点,用于服务监控和状态报告
2025-11-23 22:20:02 +08:00
Abner
5a29e64ec7 feat: 重构部署流程并移除 Service Worker
- 新增部署工具脚本:添加 `build-static.js`、`deploy-prepare.js`、`deploy-analyze.js` 和 `test-deploy-config.js` 标准化构建部署流程
- 配置 Netlify 发布目录:修改 `netlify.toml` 将 `publish` 从根目录切换到 `dist` 目录以增强安全性
- 移除 Service Worker 相关代码:删除 `sw.js` 并清理相关注册逻辑,简化性能优化策略
- 增强服务器静态文件服务:重构静态资源中间件,增加环境检查和错误处理
- 改进 API 密钥处理逻辑:统一 Netlify Functions 的密钥验证流程,增加配置缺失提示
- 添加 Serena AI 配置文件:包含项目元数据、语言服务器设置和常用命令记忆
- 重构 HTML 页面路由:使用配置化的路由表替代硬编码路径,提高可维护性
2025-11-23 19:44:45 +08:00
dependabot[bot]
4183c1ef69 build(deps): bump axios from 1.11.0 to 1.12.0
Bumps [axios](https://github.com/axios/axios) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-13 17:43:14 +00:00
Abner
576f574d29 feat: 更新品牌标识和版权年份
- 将品牌名称从 "eSIM工具集" 修改为 "eSIM Tools"
- 更新 GitHub 仓库地址和相关链接
- 添加自定义应用品牌与年份范围配置功能
- 实现统一版权页脚自动注入
- 优化部分页面结构和样式
2025-08-12 19:17:22 +08:00
Abner
251da627ad docs(security): 更新内容安全策略并移除冗余代码
- 更新内容安全策略以允许 Google Tag Manager
- 移除 verify_cookie.php 文件
- 优化 Service Worker 注册和缓存逻辑
- 更新时间检查逻辑以使用国际时区
- 调整 OAuth 2.0 PKCE 配置,移除前端的 clientSecret
2025-08-09 17:43:44 +08:00
Abner
f97d8339e4 feat(auth): 增加 OAuth 2.0 PKCE 令牌交换功能
- 新增 giffgaff-token-exchange.js 函数,用于交换 authorization code 和 access token
- 更新 verify-cookie.js 函数,增加对 cookie 中 access token 的提取和验证
- 修改 giffgaff-graphql.js、giffgaff-mfa-challenge.js 和 giffgaff-mfa-validation.js 函数,支持使用 access token 或 cookie 进行身份验证
- 更新 README.md 和 COOKIE_LOGIN_SETUP.md 文档,说明新的身份验证流程和安全注意事项
2025-08-09 14:39:29 +08:00
Abner
ce5390b5b6 feat(giffgaff): 添加 Giffgaff eSIM 功能模块
- 新增 Giffgaff eSIM 主应用控制器和相关模块
- 实现 OAuth 登录、Cookie 验证、邮件验证码发送和验证等功能
- 添加会员信息获取、eSIM 预订和下载信息获取等核心功能
- 开发响应式 UI 和状态显示逻辑
- 集成 Jest 测试框架并配置相关测试命令
2025-08-07 22:21:45 +08:00
Abner
d9de45745b fix(deployment): 修复Netlify部署配置并优化性能
- 移除了不支持的配置项,简化了netlify.toml文件结构
- 添加了配置测试脚本,提高了部署的可靠性和稳定性
- 优化了部署流程,大幅减少了部署大小和提高了部署速度
- 调整了服务时间卡片的样式,使布局更加居中和美观
2025-08-06 00:46:34 +08:00
Abner
dd77aabd63 docs(deployment): 添加 Netlify 部署配置和优化指南
- 新增 DEPLOYMENT.md 文件,详细说明 Netlify 部署配置和优化策略
- 更新 .netlifyignore 文件,排除非必要文件以提高部署效率
- 修改 netlify.toml 文件,启用资源压缩和缓存控制
- 添加部署分析脚本,生成部署清单和统计信息
- 优化 package.json,增加部署相关命令
2025-08-06 00:41:33 +08:00
Abner
b6f7434aac feat(images): 重构图片优化脚本并替换为 sharp 库
- 移除 imagemin 及其相关插件依赖,改用更高效的 sharp 库处理图片
- 支持生成多种格式(JPEG、PNG、WebP)和多尺寸缩略图
- 新增命令行参数支持,可自定义输入输出目录及图片质量
- 自动创建示例目录及说明文件,提升易用性
- 优化失败处理逻辑并提供详细日志反馈

此变更提高了图片处理性能与灵活性,同时简化了依赖管理。
2025-08-05 23:40:44 +08:00
Abner
c004e069e7 fix: 本地化 Font Awesome 图标
- 下载并配置本地 Font Awesome 文件
- 修改 HTML 文件中的图标引用路径
- 更新 Content Security Policy 策略
- 创建测试页面验证图标显示
- 优化图标加载性能
2025-08-05 23:15:41 +08:00
Abner
b72de71775 feat(security): 添加内容安全策略 (CSP)
- 在 HTML 头部加入 Content-Security-Policy 元标签
- 配置了各种资源的加载来源,增强了页面的安全性
- 包括脚本、样式、字体、图像等资源的加载限制
2025-08-05 22:55:38 +08:00
Abner
ac0744c4d5 feat(performance): 优化性能并添加离线支持
- 新增 .babelrc 配置文件,使用 Babel 进行代码转换和压缩
- 添加 PERFORMANCE.md 文件,详细说明性能优化措施
- 在 README.md 中增加性能优化相关说明
- 更新 index.html,添加 Service Worker 注册和性能优化脚本
2025-08-05 22:33:56 +08:00
Abner
ab8f0c05d8 🚀 Major upgrade: Convert to Node.js architecture with Netlify Functions
🔄 Complete Architecture Transformation:
- Migrated from PHP to Node.js backend
- Implemented Netlify Functions for serverless deployment
- Added Express.js server for local development
- Full compatibility with modern deployment platforms

🛠️ New Netlify Functions:
- giffgaff-mfa-challenge.js: Handles MFA email verification with proper headers
- giffgaff-mfa-validation.js: Processes MFA code validation
- verify-cookie.js: Cookie authentication converted from PHP to Node.js

 MFA 403 Error Resolution:
- Proper Origin and Referer headers in server-side requests
- Comprehensive error logging for debugging
- Timeout handling and robust error responses
- Should completely resolve MFA authentication issues

🍪 Enhanced Cookie Login:
- Full Node.js implementation replacing PHP dependency
- Works on all deployment platforms (Netlify, Vercel, traditional servers)
- Intelligent cookie parsing and validation
- Secure API calls with proper headers

�� Development Experience:
- package.json with all necessary dependencies
- Local development server (server.js)
- Environment configuration (env.example)
- Hot reload support with nodemon

🌐 Deployment Improvements:
- Netlify Functions integration
- Updated netlify.toml configuration
- Automatic dependency installation
- Zero-config deployment process

🎯 Key Benefits:
-  Resolves MFA 403 errors through proper server-side handling
-  Cookie login works on all platforms (no PHP dependency)
-  Better error handling and logging
-  Modern serverless architecture
-  Improved development experience
-  Full compatibility with static hosting platforms

📋 Technical Stack:
- Frontend: Pure HTML/CSS/JavaScript (unchanged)
- Backend: Node.js + Express.js (local) / Netlify Functions (production)
- Dependencies: axios, cors, helmet, morgan, dotenv
- Deployment: Netlify with automatic function deployment

This major upgrade modernizes the entire backend architecture while maintaining full frontend compatibility. The MFA 403 error should now be completely resolved through proper server-side request handling.
2025-08-01 21:03:25 +08:00
Abner
974b6034f3 🚀 Initial commit: eSIM Tools v1.0
 Features:
- Complete Giffgaff eSIM management with OAuth 2.0 PKCE
- Simyo eSIM tools with device switching support
- Netlify deployment ready with CORS proxy
- Responsive UI with Bootstrap 5
- Comprehensive testing suite
- Multi-language support (Chinese)

🔧 Technical:
- Node.js proxy server for CORS handling
- Environment-aware API endpoints
- Static deployment optimization
- Professional documentation

📦 Deployment:
- Netlify configuration included
- GitHub Actions ready
- Custom domain support
- HTTPS enabled
2025-08-01 18:42:54 +08:00