60 lines
1.7 KiB
Markdown
60 lines
1.7 KiB
Markdown
# Fedora Metalink Proxy
|
|
|
|
A Flask-based web application that acts as a proxy for Fedora Metalink files, allowing filtering based on various criteria such as country, protocol, and preference.
|
|
|
|
## Features
|
|
|
|
- Proxy for Fedora Metalink files with configurable filtering options
|
|
- Web interface for configuring filter settings
|
|
- Basic statistics and logging for monitoring request patterns
|
|
|
|
## Prerequisites
|
|
|
|
- Docker
|
|
- Docker Compose
|
|
|
|
## Setup
|
|
|
|
1. Clone the repository with:
|
|
`git clone <repository-url>`
|
|
Then navigate to the project directory:
|
|
`cd <repository-directory>`
|
|
|
|
2. Configure environment variables by copying the example file:
|
|
`cp .env.example .env`
|
|
Then edit the `.env` file to set your desired configuration options.
|
|
|
|
3. Build and run the Docker container with:
|
|
`docker-compose up --build`
|
|
This command will build the Docker image and start the container.
|
|
|
|
## Usage
|
|
|
|
### Access the Application
|
|
Open a web browser and navigate to `http://localhost:8182` to access the application.
|
|
|
|
### Configure Filter Settings
|
|
Navigate to `/dash/config` to configure the filter settings for the Metalink proxy.
|
|
|
|
### View Statistics
|
|
Navigate to `/dash/stats` to view basic statistics on request patterns.
|
|
|
|
### Access Metalink Files
|
|
Use the `/metalink` endpoint with query parameters to fetch and filter Metalink files.
|
|
|
|
Example URL format:
|
|
`http://localhost:8182/metalink?repo=fedora-42&arch=x86_64`
|
|
|
|
## Configuration
|
|
|
|
The application uses environment variables for configuration. Set these variables in the `.env` file:
|
|
|
|
- `EXCLUDED_COUNTRIES`: List of country codes to exclude
|
|
- `PREFERRED_PROTOCOLS`: List of preferred protocols
|
|
- `PREFERRED_TYPES`: List of preferred types
|
|
- `MIN_PREFERENCE`: Minimum preference value for filtering
|
|
|
|
## License
|
|
|
|
MIT
|