# network-audit **Repository Path**: kelch/network-audit ## Basic Information - **Project Name**: network-audit - **Description**: 能够稽核网络操作脚本 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-09 - **Last Updated**: 2026-09-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # network-audit # 介绍 能够稽核网络操作脚本 # network-audit 运行方式 工程位于 `e:\dsh_workspace\network-audit`,前端已构建到 `dist/`,由 Express 服务统一提供页面和 `/api/audit` 接口。 ## 方式一:生产运行(推荐,最简单) ```powershell cd e:\dsh_workspace\network-audit node server/index.js ``` 打开 **http://localhost:3000** 即可使用。 > 注意:package.json 里的 `npm start` 用了 `NODE_ENV=production` 前缀,这是 Linux 写法,Windows PowerShell 下会报错,直接用 `node server/index.js` 即可(两者效果一致,该环境变量只影响 vite 的 console 压缩配置,不影响服务端)。 ## 方式二:开发模式(改前端代码实时生效) ```powershell cd e:\dsh_workspace\network-audit npm run dev ``` 这会同时启动: - `dev:server` — 后端服务 (端口 3000) - `dev:client` — build.mjs watch 模式,src 变更后自动重建 dist ## 首次部署(新机器) ```powershell cd e:\dsh_workspace\network-audit npm install # 安装依赖 npm run build # 构建前端到 dist/ node server/index.js # 启动服务 ``` ## 使用流程 1. 浏览器打开 `http://localhost:3000` 2. 上传 tobework 结构的 ZIP 压缩包: ``` your-project.zip └── tobework/ └── 场景目录名/ ← 如 新增VPN、带宽扩容、自定义场景均可 ├── *.xls ← Excel调整单(可选) ├── *.txt ← 操作步骤(设备1、设备2...) └── *.log ← 设备配置 LOG ``` 3. 页面直接返回稽核报告(六节结构),可下载 Markdown 报告 ## 其他可配置项 - **端口**:`set PORT=8080 && node server/index.js`(默认 3000) - 场景识别:目录名含“带宽扩容/CE退网/路由调整/新CE入网/新增VPN”走 IP-RAN 领域规则(CM 系列),其他目录名走通用规则(G-01~G-08),无需配置