Media-Proxy is a lightweight media proxy for Misskey servers. It is approximately 3KB in size and provides minimal functionality for proxying media.
- Lightweight and fast
- Easy to set up
- Responses are cached for a fixed period of time
- Docker support
- Clone the repository.
git clone https://github.com/AmaseCocoa/media-proxy.git
cd media-proxy- Install the required dependencies.
pip install -r requirements.txt- Pull the Docker image.
docker pull amasecocoa/media-proxy:latest- Start the container.
docker run -d --name media-proxy -p 3003:3003 -e PORT=3030 amasecocoa/media-proxy:latestStart the server with the following command.
python server.pyUse environment variables to configure settings.
PORT: The port number the server listens on (default: 3003)EXPIRES: The length of time to cache media (default: 86400 (seconds))Discontinued in 0.3.0CHUNK_SIZE: The chunk size of the file to be read at a time. (default: 1048576 (bytes))
Example:
export PORT=8000
export EXPIRES=86400To send an image request to a media proxy, use the following URL format:
http://host/proxy/image.webp?url=https://example.com/image.png
The url parameter is the URL of the image you wish to proxy.
To set up the development environment, do the following:
- Install the dependencies.
pdm install- Start the server.
pdm run python server.pyThis project is released under the MIT License. See the LICENSE file for more information.