this has taken quite a while (8 ish hours) but reports and proof of work challenges are completely implemented the proof of work challenges are bit iffy and could be gpu accelerated which is bad, so i plan to eventually switch to something memory hard like argon2id references used for pow: https://dev.to/ratmd/simple-proof-of-work-in-javascript-3kgm https://anubis.techaro.lol/docs/design/how-anubis-works https://anubis.techaro.lol/docs/design/why-proof-of-work as well as some other posts or repos found when searching
60 lines
2.3 KiB
Markdown
60 lines
2.3 KiB
Markdown
# minibin
|
|
|
|
> im using this project to learn go, it may not be the best
|
|
|
|
minibin is a simple file and paste hosting service written in Go
|
|
|
|
> it's not really that simple but whatever
|
|
|
|
i will try my best to make it easy to customize and deploy, but this is a personal project and made using my own preferences, so you may need to change the tos/privacy policy/faq etc to fit your needs
|
|
|
|
goals:
|
|
|
|
- fast
|
|
- simple api/usage
|
|
- secure (as much as possible)
|
|
- moderable (reports, mime type filtering, hash ban, etc)
|
|
- complete no javascript support
|
|
|
|
# roadmap/todo
|
|
|
|
- [x] upload endpoint
|
|
- [x] upload content endpoint
|
|
- [x] update last accessed at
|
|
- use a memory cache and batch commit to database to keep performance
|
|
- [x] add cache control header
|
|
- [ ] size based expiry
|
|
- exclusions if below a certain size (like 5mb)
|
|
- [x] delete content endpoints
|
|
- [ ] return a page for nojs clients, such as on delete or upload
|
|
- need to return one on failures as well 💔💔💔
|
|
- [ ] max total storage usage
|
|
- [x] normalize mime types (like html)
|
|
- converts specific mime types to text/plain to prevent rendering
|
|
- [x] filter mime types config
|
|
- prevents uploads with specific mime types
|
|
- [ ] admin panel
|
|
- [ ] prometheus metrics
|
|
- [x] [switch mime type detection library](https://git.whoswhip.dev/whoswhip/minibin/src/commit/47518993577f94d7cf9c0743042d2ac133055924/handlers.go#L273-L276)
|
|
- [ ] ratelimits
|
|
- [ ] simplify rendering & serving pages (too much duplicate code rn)
|
|
- [x] reports
|
|
- POW captchas?
|
|
- [ ] switch to argon2id instead of sha256
|
|
- javascript required
|
|
|
|
## misc goals
|
|
|
|
- [x] link to this git repo on home page
|
|
- [x] maybe keep nojs and js on the same page?
|
|
- just use javascript to enhance the experience, like progress, drag and drop
|
|
- [ ] shareX config download handlers (automatically create based off of config)
|
|
- [ ] add a config option to put the endpoint on another path, such as `/f/{id}`
|
|
- allowing more specific caching options through reverse proxies like cloudflare
|
|
|
|
# contributing
|
|
|
|
if you, for some reason, want to contribute generate a patch with `git format-patch HEAD~1` and email it to me ([contact@whoswhip.dev](mailto://contact@whoswhip.dev)), start the subject line with `[PATCH] minibin`
|
|
|
|
if you need to send a revised version then include the version at the end of the subject line, such as `[PATCH] minibin v2`
|