LANShare is a TypeScript/Node.js local network file sharing tool designed for trusted environments. It provides a secure way to share folders between devices on the same LAN without exposing services to the public internet.
- Browser Control UI - Intuitive interface to select folders and start/stop sharing
- Command Line Interface - Direct folder sharing from terminal
- Path Traversal Protection - Blocks directory escape attempts for security
- MIME Type Detection - Proper content-type headers for all file types
- Streaming File Transfer - Efficient byte-streaming without loading entire files into memory
- Health Check Endpoint -
/healthzfor monitoring and uptime checks - Comprehensive Test Suite - Unit, integration, and browser functional tests (Playwright + Vitest)
Designed for trusted networks only:
- No authentication (intended for LAN use behind firewalls)
- Path traversal protection prevents
../../attacks - Read-only file serving - no uploads, deletes, or modifications
- Should NOT be exposed to public internet
# Clone and install
git clone https://github.com/howardsun-dev/LANShare.git
cd LANShare
npm install
# Start with browser UI (default)
npm start
# Or share specific folder directly
npm start -- /path/to/shared/foldersrc/- Main application codetests/- Playwright (browser) + Vitest (unit/integration) testsdocs/- Documentation and screenshots- GitHub Actions CI/CD pipeline (lint → test → build)
- Quick file transfers between trusted devices
- LAN parties, home networks, office workgroups
- Developers needing to share build artifacts locally
- Learning TypeScript backend development with Express