npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lppx/lanshare

v1.0.9

Published

这是一个局域网分享工具

Downloads

145

Readme

LAN Share(本项目使用智谱GLM系列模型辅助开发)

一个简洁高效的局域网/广域网 文件分享工具。通过简单的命令行操作,快速搭建文件分享服务,支持拖放上传、二维码分享、实时设备连接状态等功能。

本项目可借助中国联通和中国电信的5G SA基站下发的IPV6地址。把自己电脑上的文件分享到世界上的任意位置,而不需要服务器

功能特性

  • 快速启动 - 一条命令启动局域网文件分享服务
  • 拖放上传 - 支持拖放文件到浏览器直接上传
  • 二维码分享 - 生成二维码方便移动设备快速访问
  • 实时设备状态 - Socket.IO 实时显示已连接的设备
  • 多网卡支持 - 自动检测并支持选择不同的网络接口
  • IPv4/IPv6 支持 - 支持两种 IP 协议,适应不同网络环境
  • 自定义目录 - 可指定文件存储位置

安装

npm install -g @lppx/lanshare

使用

启动服务

lanshare start
# 或使用简写
lsh start

启动后会进入交互式配置界面:

  1. 选择网卡 - 从检测到的网络接口中选择一个
  2. 选择 IP 地址 - 支持 IPv4 和 IPv6 地址
  3. 输入端口号 - 默认 3001
  4. 指定存储目录 - 可留空使用默认目录 ~/lanshare-uploads

配置完成后会自动打开浏览器访问分享页面。

直接启动(跳过选择)

如果只有一个可用网卡,可直接运行:

lanshare

Web 界面

启动后在浏览器中可以看到:

| 功能区域 | 描述 | | --- | --- | | 上传区域 | 拖放文件或点击选择文件上传 | | 文件列表 | 显示已分享的文件、大小、下载次数 | | 设备列表 | 实时显示当前连接的设备 | | 分享按钮 | 复制链接或显示二维码 |

API 接口

上传文件

POST /upload
Content-Type: multipart/form-data

file: <文件>

获取文件列表

GET /api/files

下载文件

GET /download/<filename>

获取设备列表

GET /api/devices

开发

环境要求

  • Node.js >= 14.0.0

克隆并构建

git clone https://github.com/lipanpanx/lanshare.git
cd lanshare
npm install
npm run build

本地运行

npm run start

技术栈

  • TypeScript - 类型安全
  • Express.js - Web 框架
  • Socket.IO - 实时通信
  • Commander - CLI 框架
  • Multer - 文件上传处理
  • QRCode - 二维码生成

日志

日志文件存储在 ~/.lanshare/logs/ 目录下,便于排查问题。

License

MIT