# lan **Repository Path**: Ressss2023/lan ## Basic Information - **Project Name**: lan - **Description**: Lanzou-Max 蓝奏云第三方管理程序 - **Primary Language**: Go - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-04 - **Last Updated**: 2026-08-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Lanzou-Max 蓝奏云第三方管理程序 [![Release](https://img.shields.io/github/v/release/Cyruss-top/lan?label=release)](https://github.com/Cyruss-top/lan/releases) [![License](https://img.shields.io/github/license/Cyruss-top/lan)](LICENSE) **Lanzou-Max** 是一款本地运行的蓝奏云 Web 管理程序。单文件部署,内置现代化控制台,支持文件管理、分片上传、直链分享、本地预览与管理员登录。 **作者 [Cyruss-top](https://github.com/Cyruss-top)** · 仓库 [github.com/Cyruss-top/lan](https://github.com/Cyruss-top/lan) · 驱动实现参考 [OpenList](https://github.com/OpenListTeam/OpenList) 当前版本:**v1.0.0 重构版**(Lanzou-Max 全新架构,替代旧版 Lan v2.0.0) --- ## 文档 | 文档 | 说明 | |------|------| | [RELEASE.md](./RELEASE.md) | 版本发布说明、13 平台下载、SHA256 校验 | | [DEPLOY.md](./DEPLOY.md) | Windows / Linux 部署、systemd、Nginx、安全与 FAQ | | [scripts/install.sh](./scripts/install.sh) | **Linux 服务器一键安装脚本** | | 程序内 **更新日志** | 与 Release 同步的功能与 UI 变更 | --- ## Linux 一键安装(推荐) 在 Linux 服务器上以 root 执行: ```bash curl -fsSL https://raw.githubusercontent.com/Cyruss-top/lan/main/scripts/install.sh | sudo bash ``` 脚本将自动: 1. 检测 CPU 架构(amd64 / arm64 / armv5–7 / loong64) 2. 从 GitHub Releases 下载 `Lanzou-Max-v1.0.0-linux_*` 3. 安装到 `/opt/lanzou-max/` 并配置 **systemd** 开机自启 4. 默认监听 **http://0.0.0.0:2233** 自定义目录: ```bash curl -fsSL https://raw.githubusercontent.com/Cyruss-top/lan/main/scripts/install.sh | sudo bash -s -- --dir /usr/local/lanzou-max ``` 详见 [DEPLOY.md](./DEPLOY.md#linux-一键安装)。 --- ## 功能概览 ### 控制台与安全 - 首次启动初始化**管理员账号**,登录后访问控制台 - 登录可选 **30 天内自动登录**(Cookie 持久会话) - 管理 API 会话鉴权;分享直链 `/d/`、`/s/` 仍对外公开 ### 文件与链接 | 模块 | 能力 | |------|------| | **普通模式** | 列表、上传、下载、移动、重命名、回收站、批量操作 | | **链接管理** | 固定直链 `/d/`、本站分享 `/s/`,剩余有效期可视化 | | **本地预览** | 图片 / 视频 / 文本缓存到 `data/preview/` 后预览 | | **格式适配** | 不支持格式自动 ZIP 打包上传,下载还原原文件名 | ### 分片系统 - 大文件(默认 > 100MB)智能分片 10–50MB,多线程上传与合并下载 - 分片文件 / 链接独立管理,本地临时缓存可清理 ### 界面 - React 18 + TypeScript + Arco Design,浅色 / 深色双主题 --- ## 快速开始(其他平台) ### 下载预编译包 1. 打开 [GitHub Releases](https://github.com/Cyruss-top/lan/releases/latest) 2. 按平台下载 `Lanzou-Max-v1.0.0-<平台>`(Windows 带 `.exe`) 3. 运行后访问 **http://127.0.0.1:2233**,完成管理员初始化 支持 **13 个平台**:`darwin_amd64` · `darwin_arm64` · `freebsd_amd64` · `freebsd_arm64` · `linux_amd64` · `linux_arm64` · `linux_armv5` · `linux_armv6` · `linux_armv7` · `linux_loong64` · `windows_amd64` · `windows_arm64` ### 源码编译 需要 **Go 1.22+**、**Node.js 18+** ```bash git clone https://github.com/Cyruss-top/lan.git cd lan cd frontend && npm install && npm run build && cd .. go mod tidy go build -ldflags "-s -w" -o Lanzou-Max . ./Lanzou-Max ``` --- ## 启动参数 | 参数 | 默认值 | 说明 | |------|--------|------| | `--addr` | `0.0.0.0:2233` | 监听地址;端口 **2233–3322** 占用时自动递增 | | `--data` | `data` | 数据目录(数据库、缓存、临时文件) | --- ## 数据目录 | 路径 | 说明 | |------|------| | `{data}/lan.db` | SQLite:配置、直链、分享、分片索引、管理员 | | `{data}/preview/` | 文件预览本地缓存 | | `{data}/tmp/` | 上传 / 分片合并临时文件 | --- ## 构建发布版 ```powershell # Windows — 构建全部 13 平台 + SHA256SUMS.txt powershell -ExecutionPolicy Bypass -File scripts/build-all.ps1 ``` ```bash # Linux / macOS chmod +x scripts/build-all.sh && ./scripts/build-all.sh ``` 输出目录:`releases/Lanzou-Max-v1.0.0-*` --- ## 贡献者 本项目由 **[Cyruss-top](https://github.com/Cyruss-top)** 开发与维护。 --- ## 说明与限制 - 蓝奏云**无官方 API**,通过网页接口实现 - 分片单文件默认最大 **100GB**;单片最大 **98MB** - 仅供个人 / 内网管理,请遵守蓝奏云服务条款 --- ## 开源依赖 - [go-resty/resty](https://github.com/go-resty/resty) · [tidwall/gjson](https://github.com/tidwall/gjson) · [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) · [@arco-design/web-react](https://arco.design/)