A lightweight and serverless CDN utilizing MEGA for file storage and delivery.
git clone https://github.com/IRON-M4N/MegaCDN.git
cd MegaCDN
npm installModify config.js or use environment variables. Example .env file:
EMAIL=ironman@onlyfans.wtf
PASS=Katarenai nemurenai toroimerai
DOMAIN=https://cdn.ironman.my.id
TEMP=memory
Using PM2 for process management:
npm startTo stop or restart:
npm stop
npm restart Send a POST request to /upload with a multipart form containing a file.
Example using curl:
curl -X POST -F "file=@image.jpg" http://yourdomain.com/upload{
"success": true,
"files": [
{
"url": "https://yourdomain.com/media/blahblahblah",
"size": 6969
}
]
}- Add multiple accounts support
- Add an web interface (optional)
- Proper logging (error and alerts)
- Fetch origin (domain) automatically
- Fork the repository
- Create a new branch (
feature-web) - Commit your changes
- Open a pull request
© IRON-M4N