goshs
goshs is a SimpleHTTPServer written in Go, enhanced with features and security. It provides a simple HTTP server like Python's SimpleHTTPServer but with added helpful features and security measures.
Description
goshs serves as an enhanced web server for sharing files securely over HTTP, WebDAV, or SFTP protocols. It supports various authentication methods, TLS encryption, and webhook notifications, making it suitable for controlled file sharing in testing or operational environments.
Use cases include quickly setting up a read-only file server, enabling uploads with restrictions, or integrating with services like Let's Encrypt for HTTPS. Security features like IP whitelisting, basic auth, and certificate-based access ensure controlled access.
The tool is designed with cybersecurity in mind, offering options for read-only mode, upload-only mode, and integration with external notification systems for monitoring server events.
How It Works
goshs operates as a Go-based HTTP server listening on specified IP and port, serving files from a web root directory. It supports WebDAV for file management, SFTP for secure file transfer using SSH keys, and TLS via self-signed certs, custom certificates, PKCS12, or Let's Encrypt. Authentication includes basic auth and cert-based methods; restrictions via IP whitelists and proxies. Webhooks send event notifications (upload, delete, etc.) to providers like Discord. Configurable via CLI flags or YAML file.
Installation
sudo apt install goshsFlags
Examples
./goshs./goshs -C /path/to/config.yaml./goshs -w./goshs -p 8080./goshs -s -ss./goshs -s -sl -sle user@example.com -sld your.domain.com,your.seconddomain.com./goshs -s -sk <path to key> -sc <path to cert>./goshs -b 'secret-user:$up3r$3cur3'