
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
u32-local-server
Advanced tools
本地 HTTP 文件服务器 + CORS 代理,纯 Node.js 零依赖。
npm install -g u32-local-server
# 启动服务器(后台运行)
u32-ls start
# 停止服务器
u32-ls stop
# 开发模式(前台运行,监听文件变化)
npm run dev
默认端口 19527,启动后访问:
http://localhost:19527/config直接通过浏览器访问:
http://localhost:19527/file/~/http://localhost:19527/file/home/user/file.txthttp://localhost:19527/file/C:/Users/user/file.txt或者使用命令行工具:
# 获取文件/目录 URL
u32-ls url /path/to/file
# 在浏览器中打开
u32-ls open /path/to/file
# 复制 URL 到剪贴板
u32-ls copy-url /path/to/file
用于绕过浏览器的跨域限制:
// 原始 URL(可能有跨域问题)
fetch('https://api.example.com/data')
// 使用代理(无跨域问题)
fetch('http://localhost:19527/proxy/https://api.example.com/data')
代理特性:
accept-encoding 头(返回未压缩内容)x-frame-options 头(允许 iframe 嵌入)v1.2.0 起页面内全部使用相对链接,可直接挂到 Nginx 子路径下,无需额外配置:
# 子路径转发(挂在大站下):proxy_pass 结尾带 /,剥掉 /ls 前缀
location /ls/ {
proxy_pass http://127.0.0.1:19527/;
}
# 根路径转发(独立域名/端口)同样支持
location / {
proxy_pass http://127.0.0.1:19527;
}
访问 https://example.com/ls/ 即可,页面内导航、目录浏览、静态资源、配置页均自动适配代理前缀。
位置:~/.u32-local-server/config/main.json
首次启动自动创建,默认配置:
{
"port": 19527,
"file": {
"access": {
"allow": [],
"deny": []
},
"mime": {
".html": "text/html",
".js": "text/javascript",
".png": "image/png"
// ... 更多 MIME 类型
}
},
"proxy": {}
}
allow: 白名单,允许访问的路径前缀deny: 黑名单,拒绝访问的路径前缀deny > allow(黑名单优先)allow 为空时,拒绝访问所有文件(白名单模式)~/ 表示用户主目录示例:
{
"file": {
"access": {
"allow": ["~/", "/mnt/data"],
"deny": ["~/敏感文件夹", "/etc"]
}
}
}
访问 http://localhost:19527/config 可视化管理:
| 命令 | 说明 |
|---|---|
u32-ls start | 启动后台服务器 |
u32-ls stop | 停止服务器 |
u32-ls restart | 重启服务器 |
u32-ls status | 查看服务器状态 |
u32-ls logs [-f] | 查看服务器日志 |
u32-ls url <path> | 获取文件 URL |
u32-ls open <path> | 在浏览器中打开 |
u32-ls copy-url <path> | 复制 URL 到剪贴板 |
u32-ls register | 注册开机自启 + 右键菜单 |
u32-ls unregister | 取消注册 |
u32-ls version | 显示版本号 |
u32-ls --help | 显示帮助信息 |
运行 u32-ls register 后:
Run 键运行 u32-ls register 后:
| 路由 | 功能 |
|---|---|
/proxy/<url> | CORS 代理 |
/config | 配置管理页面 |
/config/api | 配置 REST API |
/file/<path> | 文件访问(Windows 盘符/~/ 支持) |
/ | 直接映射到文件系统(Linux) |
http 模块~# 克隆项目
git clone <repo>
cd u32-local-server
# 开发模式(监听文件变化)
npm run dev
# 手动启动
node src/index.js start
MIT
FAQs
Local HTTP file server and proxy
We found that u32-local-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.