Skip to content

A simple, lightweight, HTTP server for exposing local directories over a local network, with basic UI.

Notifications You must be signed in to change notification settings

khalidibnwalid/DirServe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DirServe

A simple, lightweight, HTTP server for exposing local directories over a local network. DirServe provides a simple way to serve files from any directory on your system with optional security features.

Note: currently videos are not supported.

Screenshot

Features

  • Serve files from any local directory
  • Basic authentication support

Installation

Via go install (Recommended)

go install github.com/khalidibnwalid/DirServe@latest

Via Manual Build

# Clone the repository
git clone https://github.com/khalidibnwalid/DirServe

# Build the application
cd dirserve
go build

Usage

dirserve [flags]

Command-line Flags

Flag Default Description
-port 8080 Port to serve on
-dir . Directory to serve files from
-auth false Enable basic authentication
-user "" Username for basic authentication
-pass "" Password for basic authentication

Examples

Serve the current directory on the default port (8080)

./dirserve

Serve a specific directory on port 3000

./dirserve -port 3000 -dir /path/to/your/files

Serve with basic authentication

./dirserve -auth -user admin -pass secret

Endpoints

  • /raw/ - Direct file server access
  • /raw/ - web ui for browsing
  • /ping - Health check endpoint (returns "pong")

Security Considerations

When using DirServe, be aware that you are exposing files to the network. Use the authentication option when serving sensitive content, and be careful about which directories you choose to expose.

About

A simple, lightweight, HTTP server for exposing local directories over a local network, with basic UI.

Topics

Resources

Stars

Watchers

Forks