# gofs **Repository Path**: godoit/gofs ## Basic Information - **Project Name**: gofs - **Description**: Go File Server. A lightweight and feature-rich file server written in Go, providing a clean web interface for browsing and managing files. - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-06 - **Last Updated**: 2026-02-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Go File Server (gofs) A lightweight and feature-rich file server written in Go, providing a clean web interface for browsing and managing files. ## Features - 📁 **File Browsing**: Browse files and directories with a clean web interface - 🔍 **Search**: Real-time file search with debounced input - 📱 **Responsive Design**: Works on desktop and mobile devices - 🏠 **Home Button**: Quick navigation to the root directory - ←→ **Navigation**: Back and forward navigation buttons - 📄 **File Icons**: Different icons for different file types - ⬆️ **Sticky Header**: Table headers stay visible when scrolling - 🎨 **Smooth Animations**: Header hides on scroll down and shows on scroll up - 📊 **Sorting**: Sort files by name, size, or modification time - 🔒 **Security**: Basic access control (optional) ## Installation ### Prerequisites - Go 1.16 or higher ### From Source ```bash git clone https://gitee.com/godoit/gofs.git cd gofs go build -o gofs.exe ``` ### Download Binary You can also download the pre-built binary from the [releases page](https://gitee.com/godoit/gofs/releases). ## Usage ### Basic Usage ```bash # Start server in current directory on port 8080 ./gofs.exe # Start server in specific directory ./gofs.exe -dir /path/to/directory # Start server on specific port ./gofs.exe -port 3000 # Start server with both directory and port ./gofs.exe -dir /path/to/directory -port 3000 ``` ### Command Line Options | Option | Description | Default | |--------|-------------|---------| | `-dir` | Directory to serve | `.` (current directory) | | `-port` | Port to listen on | `8080` | ## Web Interface ### Navigation - **Home Button**: Navigate to the root directory - **Back Button**: Go to the previous directory - **Forward Button**: Go to the next directory ### Search - Type in the search box to find files by name - Search results are updated in real-time ### Sorting - Click on column headers to sort files - Click again to toggle between ascending and descending order ### File Operations - Click on files to download them - Click on directories to navigate into them ## File Icons The server displays different icons for different file types: - 📁 Directories - 📄 Document files (PDF, DOC, DOCX) - 📝 Text files (TXT, MD) - 📊 Spreadsheet files (XLS, XLSX, CSV) - 🖼️ Image files (JPG, JPEG, PNG, GIF, BMP) - 🎬 Video files (MP4, AVI, MOV, WMV) - 🎵 Audio files (MP3, WAV, OGG) - 💻 Code files (GO, PY, JS, HTML, CSS) - ⚙️ Executable files (EXE, BAT, SH) - 🗜️ Compressed files (ZIP, RAR, 7Z, TAR, GZ) ## Security ### Basic Security - The server runs with the permissions of the user who started it - It is recommended to run the server with limited permissions ### Advanced Security - For production use, consider using a reverse proxy with HTTPS - You can also add basic authentication using a reverse proxy ## Performance - **Fast**: Built with Go's high-performance HTTP server - **Efficient**: Uses minimal resources - **Scalable**: Can handle multiple concurrent connections ## Browser Compatibility - Chrome 60+ - Firefox 55+ - Safari 12+ - Edge 79+ ## Contributing Contributions are welcome! Please feel free to submit a Pull Request. ### Development 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add some amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## Acknowledgments - Built with Go standard library - Uses HTML5, CSS3, and JavaScript - Inspired by simple file servers like Python's `http.server` ## Contact - Project Link: [https://gitee.com/godoit/gofs](https://gitee.com/godoit/gofs) - Author: hhelo - Email: hhelo.w@outlook.com --- **Enjoy using Go File Server!** 🚀