Skip to content

angus-websites/cidar

Repository files navigation

Cidar

A lightweight proxy/mirror service

Prerequisites

  • Python 3.13
  • UV (a command line tool for managing Python environments)

Installing Python 3.13

If you don't have Python 3.13 installed, you can install it via brew:

curl -LsSf https://astral.sh/uv/install.sh | sh

Install UV:

  • This project uses UV for dependency management. Ensure it is installed on your system.
  • If UV is not installed, you can install it using:
brew install uv
uv --version

Install dependencies

This command will install all the dependencies required for the project, including development dependencies:

uv sync

If you ever need to update the dependencies, you can run:

uv sync --upgrade

Generate .env

To use environment variables, you need to create a .env file in the root directory of the project. You can copy the .env.example file and rename it to .env:

cp .env.example .env

The Proxy Map

One of the required environment variables is PROXY_MAP. This variable defines where the service should proxy requests. The format is a comma-separated list of key-value pairs, where the key is the path prefix and the value is the target URL.

For example:

PROXY_MAP="example=https://example.com,foo=https://foo.org"

In this example, any requests that start with /example will be proxied to https://example.com, and requests that start with /foo will be proxied to https://foo.org.

Running the service

make dev

Linting

make lint

Formatting

make format

Tests

make test

Dockerize

docker buildx build --platform linux/amd64,linux/arm64 -t cidar .

About

A lightweight proxy/mirror service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors