AmaseCocoa / media-proxy

Pythonで作成されたMedia Proxyの代替実装
https://hub.docker.com/r/amasecocoa/media-proxy
MIT License
0 stars 0 forks source link
media-proxy misskey

Media-Proxy

Media-Proxy is a lightweight media proxy for Misskey servers. It is approximately 3KB in size and provides minimal functionality for proxying media.

Features

Install

Install from Source

  1. Clone the repository.

    git clone https://github.com/AmaseCocoa/media-proxy.git
    cd media-proxy
  2. Install the required dependencies.

    pip install -r requirements.txt

Install With Docker

  1. Pull the Docker image.

    docker pull amasecocoa/media-proxy:latest
  2. Start the container.

    docker run -d --name media-proxy -p 3003:3003 -e PORT=3030 amasecocoa/media-proxy:latest

How To Use

Start Server

Start the server with the following command.

python server.py

Configuration

Use environment variables to configure settings.

Example:

export PORT=8000
export EXPIRES=86400

Example

To 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.

Develop

To set up the development environment, do the following:

  1. Install the dependencies.

    pdm install
  2. Start the server.

    pdm run python server.py

License

This project is released under the MIT License. See the LICENSE file for more information.