Project
OCT 2025

Pavan Dhadge

GoLocalShare

GoLocalShare is a fast and secure file sharing server built in Go designed for seamless transfers over local networks or via temporary cloud links. It eliminates the setup complexity common with cloud-based tools by providing instant access through a private browser interface secured with a session token.

GoLocalShare combines the speed of local area network transfers with optional cloud-based sharing, giving you control and privacy without sacrificing convenience. Simply run one command, and it launches a secure HTTP server, generates a unique session token, and provides a shareable URL for quick file access.


Live Demo

View on GitHub


Why GoLocalShare?

Unlike traditional cloud storage services that often involve slow upload speeds, privacy concerns, and extra steps, GoLocalShare offers:

  • Lightning-fast LAN file transfers with direct access.
  • Token-based secure sessions that expire automatically.
  • Optional short-term cloud sharing through Cloudinary for remote access.

This hybrid architecture provides flexibility for both offline and online sharing needs.


How It Works

Upon startup, GoLocalShare runs a minimal HTTP server that generates a random token for session authentication. This token-based system ensures that only authorized users can access the shared files. The application prints the access URL with the required token to the terminal, which you can distribute to intended recipients.

For remote sessions, GoLocalShare utilizes Cloudinary’s temporary upload service, automatically cleaning up files post-session expiry. The simple HTML/JavaScript frontend supports browsing, downloading, and session management without any additional software requirements.


Example Usage

To share a large file on your LAN for two hours:

./goLocalShare --duration 2h /path/to/video.mp4

Recipients enter the token on the local URL for fast download, bypassing internet constraints.

For a cloud-based secure link valid for one hour:

./goLocalShare --cloud --duration 1h /path/to/video.mp4

The service uploads the file to the cloud temporarily and deletes it after expiry.


Security Focus

Security is paramount with features including:

  • Unique, unpredictable session tokens.
  • Rate limiting with 100 requests per minute per IP.
  • Brute-force attack mitigation via enforced delays on failures.
  • Path and symlink restrictions ensuring no unauthorized file access.
  • HTTP security headers like CSP and no-sniff preconfigured to prevent attacks.

“GoLocalShare taught me how to design for speed, security, and simplicity in a networked application — all while keeping the user experience effortless.”