Skip to content

Repository files navigation

LANShare

GitHub license GitHub issues GitHub stars GitHub last commit TypeScript Node.js GitHub Actions

Overview

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.

✨ Key Features

  • 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 - /healthz for monitoring and uptime checks
  • Comprehensive Test Suite - Unit, integration, and browser functional tests (Playwright + Vitest)

🔒 Security First

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

🚀 Quick Start

# 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/folder

📦 What's Included

  • src/ - Main application code
  • tests/ - Playwright (browser) + Vitest (unit/integration) tests
  • docs/ - Documentation and screenshots
  • GitHub Actions CI/CD pipeline (lint → test → build)

💼 Perfect For

  • 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

View Live Demo | Report Bug | Request Feature

About

TypeScript/Node.js LAN file-sharing tool with browser control UI, CLI mode, path traversal protection, and CI-backed tests (Playwright + Vitest).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages