{"id":31794472,"url":"https://github.com/0xrelogic/go-shareit","last_synced_at":"2025-10-10T19:45:57.246Z","repository":{"id":305364136,"uuid":"1022683482","full_name":"0xReLogic/Go-ShareIt","owner":"0xReLogic","description":"A simple, secure, and self-hosted file sharing application built with Go. Cross-platform and dependency-free.","archived":false,"fork":false,"pushed_at":"2025-08-21T03:55:58.000Z","size":12414,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-21T05:50:47.270Z","etag":null,"topics":["cross-platform","file-sharing","go","golang","http-server","one-time-link-privacy","secure-local-network","self-hosted","zero-dependencies"],"latest_commit_sha":null,"homepage":"https://github.com/0xReLogic/Go-ShareIt","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xReLogic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-19T15:48:43.000Z","updated_at":"2025-08-21T03:56:01.000Z","dependencies_parsed_at":"2025-07-19T20:07:08.842Z","dependency_job_id":"687eda49-f44b-495a-804f-daec0d126344","html_url":"https://github.com/0xReLogic/Go-ShareIt","commit_stats":null,"previous_names":["0xrelogic/go-shareit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xReLogic/Go-ShareIt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xReLogic%2FGo-ShareIt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xReLogic%2FGo-ShareIt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xReLogic%2FGo-ShareIt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xReLogic%2FGo-ShareIt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xReLogic","download_url":"https://codeload.github.com/0xReLogic/Go-ShareIt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xReLogic%2FGo-ShareIt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005025,"owners_count":26083827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","file-sharing","go","golang","http-server","one-time-link-privacy","secure-local-network","self-hosted","zero-dependencies"],"created_at":"2025-10-10T19:45:54.879Z","updated_at":"2025-10-10T19:45:57.219Z","avatar_url":"https://github.com/0xReLogic.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ashleymcnamara/gophers/master/dancing_gopher.gif\" width=\"100\" alt=\"Dancing Gopher\"/\u003e\n  \u003ch1\u003eGo-ShareIt\u003c/h1\u003e\n  \u003cp\u003eA simple, secure, and self-hosted file sharing application.\u003c/p\u003e\n\n  \u003ca href=\"https://github.com/0xReLogic/Go-ShareIt/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/0xReLogic/Go-ShareIt.svg?style=for-the-badge\u0026logo=github\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/0xReLogic/Go-ShareIt\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/0xReLogic/Go-ShareIt?style=for-the-badge\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/0xReLogic/Go-ShareIt/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/0xReLogic/Go-ShareIt?style=for-the-badge\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003cbr/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Go-1.22+-00ADD8?style=for-the-badge\u0026logo=go\" alt=\"Go Version\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-blue?style=for-the-badge\u0026logo=windows\" alt=\"Platform\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/MartinHeinz/MartinHeinz/master/images/gopher.gif\" height=\"32\" alt=\"Running Gopher\"\u003e\n\u003c/div\u003e\n\n---\n\nGo-ShareIt is a lightweight, local-first file sharing application built entirely with the Go standard library. It is designed for users who need a quick and secure way to transfer a file with a self-destructing link. Run it on one machine and access it from any other device on the same Wi-Fi network or mobile hotspot to transfer files without using internet data. Once a file is downloaded, it is permanently deleted from the server, ensuring privacy and security.\n\n## Screenshots\n\n| 1. Main Upload Page | 2. Upload Successful | 3. Link Expired |\n| :---: | :---: | :---: |\n| \u003cimg src=\"https://i.imgur.com/q3t3Nob.png\" alt=\"Main Upload Page\" width=\"100%\"\u003e | \u003cimg src=\"https://i.imgur.com/ZPQi7XX.png\" alt=\"Upload Successful\" width=\"100%\"\u003e | \u003cimg src=\"https://i.imgur.com/rko7BYF.png\" alt=\"Link Expired\" width=\"100%\"\u003e |\n\n## Features\n\n- **Secure One-Time Downloads**: Each generated link is valid for only a single download. \n- **Self-Destructing Files**: After a successful download, the file is immediately and permanently deleted from the server's storage.\n- **End-to-End Encryption**: Client-side encryption ensures the server never sees the unencrypted content of your files.\n- **Large File Support**: Efficiently handles large files of any size through streaming, ensuring low memory usage.\n- **Stateless \u0026 Always Ready**: After each download, the file and token are instantly destroyed. The server is immediately ready for the next share without needing a restart.\n- **Customizable Expiration**: Links can be set to expire after 5 minutes, 15 minutes, 1 hour, or 24 hours.\n- **Password Protection**: Add an optional password to protect sensitive files.\n- **File Type Restrictions**: Limit uploads to specific file types for enhanced security.\n- **Admin Dashboard**: Monitor and manage all active file shares through a secure admin interface.\n- **Automatic Compression**: Automatically compresses compatible files to reduce transfer size and speed up downloads.\n- **Multi-File Upload**: Upload multiple files at once and get individual shareable links for each one.\n- **Token Encryption**: Secure download links with encrypted tokens to prevent manipulation.\n- **Offline Local Transfers**: Share files across devices on the same Wi-Fi or mobile hotspot network without using internet data.\n- **Zero External Dependencies**: Built using only the Go standard library, making it lightweight and fast.\n- **Cross-Platform**: Comes with a simple build script to generate binaries for Windows, macOS, and Linux.\n- **Self-Contained Executable**: All necessary assets, including the web interface, are embedded directly into the executable file. This means you can run it anywhere without needing extra files.\n- **Modern Web Interface**: A clean, responsive interface with progress indicators and detailed file information.\n- **API Support**: RESTful API endpoints for integration with other applications.\n\n## Usage\n\n1.  **Download** the latest release for your operating system from the [Releases](https://github.com/0xReLogic/Go-ShareIt/releases) page.\n2.  **Run** the executable file. A terminal window will open, indicating that the server is running.\n3.  **Allow Firewall Access**: If your operating system's firewall prompts for permission, make sure to **Allow Access**, especially for **Private Networks**. This is crucial for other devices to connect.\n4.  **Start Sharing**:\n    -   **On the same computer**: Open your web browser and navigate to `http://localhost:8080`.\n    -   **From another device (phone/laptop)**:\n        1.  Connect the device to the **same Wi-Fi network or mobile hotspot**.\n        2.  Find the local IP address of the computer running Go-ShareIt:\n            -   **Windows**: Open Command Prompt (`cmd`) and type `ipconfig`. Look for the `IPv4 Address`.\n            -   **macOS/Linux**: Open a terminal and type `ip addr` or `ifconfig`.\n        3.  On your other device's browser, enter `http://\u003cYOUR_LOCAL_IP\u003e:8080` (e.g., `http://192.168.1.10:8080`).\n5.  **Upload Files**:\n    -   **Single File Upload**: On the main page\n        -   Select a file to upload\n        -   Choose an expiration time (5 minutes, 15 minutes, 1 hour, or 24 hours)\n        -   Optionally add password protection\n        -   Click \"Upload File\" and wait for the upload to complete\n    -   **Multi-File Upload**: Go to `http://localhost:8080/multi`\n        -   Select multiple files to upload\n        -   Configure expiration time and password (applies to all files)\n        -   Click \"Upload Files\" and wait for all uploads to complete\n    -   **End-to-End Encrypted Upload**: Go to `http://localhost:8080/e2e`\n        -   Select a file to encrypt and upload\n        -   The file is encrypted in your browser before being uploaded\n        -   The encryption key never leaves your device\n        -   Share both the link and the decryption key with the recipient\n6.  **Share the Links**: Copy the generated links and share them with recipients.\n7.  **Admin Dashboard**: Access the admin dashboard at `http://localhost:8080/admin` (username: admin, password: admin123) to monitor and manage all active file shares.\n\n## How to Build (For Developers)\n\nTo build the project from the source code, you will need to have Go installed. \n\n1.  Clone the repository:\n    ```sh\n    git clone https://github.com/0xReLogic/Go-ShareIt.git\n    cd Go-ShareIt\n    ```\n2.  Run the build script provided. This will create a `releases` directory and populate it with binaries for multiple platforms.\n    - On Windows:\n      ```cmd\n      .\\build.bat\n      ```\n    - On macOS/Linux:\n      ```sh\n      chmod +x build.sh\n      ./build.sh\n      ```\n\n## For Contributors: Making it Publicly Accessible\n\nThe default way to run Share-it is on a local network. If you are developing and want to share a live demo with someone over the internet, you'll need a public URL. For permanent hosting, a service like `fly.io` is recommended. For temporary sharing during development, `ngrok` is an excellent tool.\n\n1.  Download and set up [ngrok](https://ngrok.com/).\n2.  Run Go-ShareIt locally (`go run main.go`).\n3.  Expose your local server to the internet:\n    ```sh\n    ngrok http 8080\n    ```\n4.  `ngrok` will provide you with a public URL (e.g., `https://random-string.ngrok.io`) that you can share.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=0xReLogic/Go-ShareIt\u0026type=Date)](https://www.star-history.com/#0xReLogic/Go-ShareIt\u0026Date)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ci\u003eMade with ❤️ by ReLogic\u003c/i\u003e\n\u003c/div\u003e\n\n## Roadmap\n\nHere is the future development plan for Go-ShareIt, based on priority:\n\n### v1.5 - Security Enhancements (Next Priority)\n- [x] **End-to-End Encryption**: Implement client-side encryption so the server can never read the file contents.\n- [x] **Password Protection**: Add an option to protect downloads with a password.\n- [x] **Custom Expiration Settings**: Allow users to set their own expiration time limits.\n- [x] **Token Encryption**: Encrypt the token within the URL to prevent manipulation.\n\n### v2.0 - Optimization \u0026 Advanced Features\n- [x] **Multi-File Upload**: Allow users to upload multiple files or an entire folder in a single session.\n- [x] **Automatic Compression**: Automatically compress files before upload to speed up transfers.\n- [x] **CLI Version**: Build a command-line interface (CLI) for power users, aligning with the project's original vision.\n\n### v3.0 - Enterprise \u0026 Integration Features\n- [ ] **User Accounts**: Add optional user accounts for tracking upload history.\n- [ ] **Team Sharing**: Allow teams to share files with access controls.\n- [ ] **API Keys**: Generate API keys for third-party integrations.\n- [ ] **Webhooks**: Send notifications to external services when files are uploaded or downloaded.\n- [ ] **Storage Backends**: Support for S3, Google Cloud Storage, and other storage providers.\n- [ ] **Analytics Dashboard**: Track usage statistics and file sharing patterns.\n\n---\n\n## API Documentation\n\nGo-ShareIt provides a RESTful API for integration with other applications:\n\n### Upload a File\n\n```\nPOST /upload\n```\n\nForm data:\n- `file`: File to upload (required)\n- `expiration`: Expiration time in minutes (optional, default: 5)\n- `password`: Password protection (optional)\n- `compress`: Set to \"false\" to disable automatic compression (optional, default: true)\n- `encrypted`: Set to \"true\" if the file is already encrypted client-side (optional, default: false)\n- `originalName`: Original filename for encrypted files (optional, used with `encrypted=true`)\n\nResponse:\n```json\n{\n  \"success\": true,\n  \"url\": \"http://localhost:8080/files/abcdef1234567890\",\n  \"expiresIn\": 5,\n  \"isProtected\": false,\n  \"originalName\": \"example.pdf\",\n  \"size\": 1234567,\n  \"originalSize\": 2345678,\n  \"isCompressed\": true,\n  \"isEncrypted\": false\n}\n```\n\n### Get Server Statistics\n\n```\nGET /api/stats\n```\n\nResponse:\n```json\n{\n  \"activeFiles\": 5,\n  \"totalSizeBytes\": 12345678,\n  \"serverTime\": \"2023-08-21T12:34:56Z\"\n}\n```\n\n### List All Active Files (Admin Only)\n\n```\nGET /api/files\n```\n\nRequires Basic Authentication.\n\nResponse:\n```json\n[\n  {\n    \"token\": \"abcdef1234567890\",\n    \"originalName\": \"example.pdf\",\n    \"createdAt\": \"2023-08-21T12:34:56Z\",\n    \"expiresAt\": \"2023-08-21T12:39:56Z\",\n    \"isProtected\": true,\n    \"size\": 1234567,\n    \"url\": \"http://localhost:8080/files/abcdef1234567890\"\n  }\n]\n```\n\n### Delete a File (Admin Only)\n\n```\nDELETE /api/files/{token}\n```\n\nRequires Basic Authentication.\n\nResponse:\n```json\n{\n  \"success\": true,\n  \"message\": \"File deleted successfully\"\n}\n```\n\n## How to Contribute\n\nWe welcome contributions from everyone to make Go-ShareIt better! If you're interested in helping, here are the areas where we need the most help:\n\n1.  **Implement Roadmap Features**: You can pick up any item from the **v1.5 Roadmap** or **v2.0** above. Features like **end-to-end encryption** or **token encryption** would be incredibly valuable additions.\n\n2.  **Concurrency Improvements**: We currently use a standard `mutex` for access control. We'd like to implement more sophisticated solutions to handle many concurrent connections:\n    -   **For Uploads**: Use a *Worker Pool Pattern* to limit the number of simultaneous uploads.\n    -   **For Downloads**: Use a *Channel as a Semaphore* to ensure only one download is active per token.\n\n3.  **Refactoring \u0026 Testing**: Help write unit and integration tests to ensure code stability and reliability as new features are added.\n\nPlease open a new issue to discuss your ideas or claim an existing one before you start working. Thank you for helping!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xrelogic%2Fgo-shareit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xrelogic%2Fgo-shareit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xrelogic%2Fgo-shareit/lists"}