- PHP 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .env.example | ||
| README.md | ||
| uploads.php | ||
bunny-ircv3-filehost
Simple PHP implementation of IRCv3 draft/FILEHOST feature using bunny.net. Allows drag and drop, and paste from clipboard, uploads to Bunny Storage. Served over BunnyCDN and authenticated via SASL automatically so uploads are sorted into user folders
This assumes Ergo as the server, and Halloy as the client for testing (what I use). It also assumes the script and IRC sever are on the same box
env
This utilises a .env file for secretys. File lives outside of the webroot in the project root. Secrets should never be in a publicly accessible directory
Ergo
You need to add/uncomment this line in your ircd.yaml file. Use your actual domain + path for the upload script.
server:
additional-isupport:
"soju.im/FILEHOST": "https://irc.domain.net/uploads"
nginx
I use nginx as a reverse proxy on my server, so here's how I route the things. You can tweak it for your setup.
client_max_body_size 25M;
location = /uploads {
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root/uploads.php;
fastcgi_param SCRIPT_NAME /uploads.php;
fastcgi_param HTTP_AUTHORIZATION $http_authorization;
}
location = /uploads.php {
return 404;
}