abyss/README.md

61 lines
1.7 KiB
Markdown
Raw Normal View History

2024-08-19 13:01:23 -03:00
# abyss
2024-08-25 23:16:56 -03:00
2024-08-19 20:00:46 -03:00
abyss is a basic single user http server made for uploading files (logs, images) and then sharing them to the internet
2024-08-19 13:01:23 -03:00
note: this is a project made for learning purposes, you should use other more mature projects if running in production
2024-08-19 15:50:17 -03:00
## table of contents
2024-08-25 23:16:56 -03:00
2024-08-19 15:50:17 -03:00
- [running abyss](#running)
2024-08-25 23:16:56 -03:00
- [installing with docker](#docker)
- [installing manually](#manual)
2024-08-20 09:03:25 -03:00
- [uploading files](#uploading)
2024-08-19 15:50:17 -03:00
- [todo list](#todo)
2024-08-19 13:01:23 -03:00
## running:
2024-08-25 23:16:56 -03:00
2024-08-20 09:03:25 -03:00
- 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/`
2024-08-19 15:50:17 -03:00
### docker
2024-08-25 23:16:56 -03:00
2024-08-20 09:03:25 -03:00
- to run with docker, you can use docker compose:
2024-08-25 23:16:56 -03:00
2024-08-19 15:50:17 -03:00
```bash
docker compose up -d # might be docker-compose depending on distro
```
2024-08-25 23:16:56 -03:00
2024-08-19 15:50:17 -03:00
- dont change inside port of 8080 unless you know what you're doing
2024-08-20 09:21:30 -03:00
- when updating, run with `--build` instead:
2024-08-25 23:16:56 -03:00
2024-08-20 09:21:30 -03:00
```bash
docker compose up --build -d
```
2024-08-19 15:50:17 -03:00
### manual
2024-08-19 13:01:23 -03:00
2024-08-19 15:50:17 -03:00
- to run it, either build with `go build -o abyss` or run it directly with:
2024-08-25 23:16:56 -03:00
2024-08-19 13:03:24 -03:00
```bash
2024-08-20 09:03:25 -03:00
URL="your-domain" AUTH_USERNAME=admin AUTH_PASSWORD=admin go run ./main.go
2024-08-19 13:01:23 -03:00
```
2024-08-19 13:03:24 -03:00
2024-08-20 09:03:25 -03:00
## uploading
2024-08-19 13:54:33 -03:00
- then, simply upload your files with curl:
2024-08-25 23:16:56 -03:00
2024-08-19 13:03:24 -03:00
```bash
2024-08-25 23:16:56 -03:00
curl -F "file=@/path/to/file" -H "X-Auth: "$(cat /path/to/.key) http://localhost:8080/
2024-08-19 13:03:24 -03:00
```
2024-08-25 23:16:56 -03:00
2024-08-19 13:01:23 -03:00
## todo:
2024-08-25 23:16:56 -03:00
2024-08-19 13:54:33 -03:00
- [x] add upload of logs funcionality (like 0x0.st)
2024-08-19 15:50:17 -03:00
- [x] add docker easy setup
2024-08-20 09:03:25 -03:00
- ~~add db for tracking of file names~~ (dont need that)
- [x] add file browser (like file://)
- [x] add file extension in its name
- [x] login prompt when accessing /tree
- [ ] add rate limits