A lightweight, high-performance Go-based server designed for distributing APKs or assets during events. It features team verification, one-time download enforcement, and a sleek real-time admin dashboard.
- Team Verification: Access is restricted to teams pre-registered in the system via
teams.csv. - One-Time Download: Prevents multiple downloads by the same team to ensure resource control and prevent unauthorized sharing.
- Dynamic File Distribution: Supports serving both individual files (e.g.,
.apk) and entire directories. - Real-time Admin Dashboard: A premium, dark-themed dashboard providing:
- Live statistics (Total, Downloaded, and Pending teams).
- Detailed activity logs with timestamps and client IP addresses.
- Categorized views for completed and pending team syncs.
- Automatic Database Management: Environment-ready with automatic SQLite database creation (
teams.dbanddownloads_log.db). - QR Code Utility: Built-in tool to generate and display a QR code in the terminal for the server's network URL, facilitating quick access for mobile users.
- Network Awareness: Automatically detects the host's local network IP to simplify mobile connectivity.
- Embedded UI: All frontend assets are embedded into the Go binary for simple, single-file deployment.
- Backend: Go (Optimized for 1.25+)
- Database: SQLite3
- Frontend: HTML5, CSS3 (Vanilla), Embedded via
go:embed - Design: Premium Dark Mode (Google Fonts: Syne & Poppins)
Create or edit teams.csv in the root directory. The server uses this to seed the internal database.
Team Name, Team Number
Shadow Hunters, 101
Byte Masters, 102Open main.go and adjust the constants to match your environment:
adminPassphrase: Security key for dashboard access.downloadPath: Path to the file or folder you wish to distribute.port: Default is:8080.
go mod tidy
go run main.goTo help participants quickly access the download page, run the QR utility in a separate terminal:
go run utils/qr.goThe dashboard is accessible via:
http://localhost:8080/admin?pass=your_passphrase
Replace your_passphrase with the value set in main.go.
main.go: Main server application logic and API.utils/qr.go: Utility to generate and display server URL as a QR code.index.html: Public-facing verification and download page.admin.html: Real-time administrative dashboard.teams.csv: Source file for registered teams.teams.db: Persistent storage for team data.downloads_log.db: Persistent storage for download history and logs.download_server.log: System log file for auditing.
This project is open-source and available under the MIT License.