http paste webserver in go
Go to file
2024-08-20 09:13:00 -03:00
.github/workflows fix: change go version 2024-08-19 15:53:27 -03:00
.gitignore feat(): add basic authentication 2024-08-19 19:47:32 -03:00
docker-compose.yml feat(): add basic authentication 2024-08-19 19:47:32 -03:00
Dockerfile feat: add docker installation/setup 2024-08-19 15:50:17 -03:00
go.mod feat: add basic working server 2024-08-19 12:48:30 -03:00
LICENSE Initial commit 2024-08-19 11:55:06 -03:00
main.go feat(): add extensions to file names 2024-08-20 09:00:44 -03:00
README.md docs(): update readme 2024-08-20 09:13:00 -03:00

abyss

abyss is a basic single user http server made for uploading files (logs, images) and then sharing them to the internet

note: this is a project made for learning purposes, you should use other more mature projects if running in production

table of contents

running:

  • change URL environment variable to your end url. example: URL=paste.abyss.dev if you your files will be accessed through paste.abyss.dev/name-of-file
  • add your password (key) to .key in the root directory of the project - it will be used for authentication for uploads.
  • add AUTH_USERNAME and AUTH_PASSWORD environment variables for access to /tree/

docker

  • to run with docker, you can use docker compose:
docker compose up -d # might be docker-compose depending on distro
  • dont change inside port of 8080 unless you know what you're doing

manual

  • to run it, either build with go build -o abyss or run it directly with:
URL="your-domain" AUTH_USERNAME=admin AUTH_PASSWORD=admin go run ./main.go

uploading

  • then, simply upload your files with curl:
curl -F "file=@/path/to/file" -H "X-Auth: "$(cat /path/to/.key) http://localhost:8080/upload

todo:

  • add upload of logs funcionality (like 0x0.st)
  • add docker easy setup
  • add db for tracking of file names (dont need that)
  • add file browser (like file://)
  • add file extension in its name
  • login prompt when accessing /tree
  • add rate limits