2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00
2025-10-31 04:27:42 +03:00

RRPSFD

The easiest way to split network traffic by domain

RRPSFD stands for Rust Reverse Proxy - Special for Docker

.. contains 99% pure rust (1% is a certbot dependency) ..

About

RRPSFD is a lightweight and efficient reverse proxy that allows you to split network traffic based on domain names. It is designed to be easy to use and configure, making it the perfect solution for anyone looking to link their docker containers to specific domains.

Quick Start

Create docker-compose.yml file with the following content:

services:
  rrpsfd:
    image: git.3spikes.space/docker/rrpsfd:latest
    container_name: rrpsfd
    network_mode: "host"
    restart: always
    environment:
      EMAIL: # Type your email here
    volumes:
      # - "/var/run/docker.sock:/var/run/docker.sock" # Uncomment this if you use Docker in root mode.
      # - "~/.docker/run/docker.sock:/var/run/docker.sock" # Uncomment this if you use Docker in user mode (like Docker Desktop).
      - "./rrpsfd/data:/home/data"
      - "./rrpsfd/letsencrypt:/etc/letsencrypt/"

!!! Don't forget to replace # Type your email here with your actual email address and uncomment the volume mount line with the correct path.

Run docker compose up -d or docker-compose up -d

Check logs with docker compose logs rrpsfd and if no errors, proceed to the next step.

Adding Services (docker compose)

In docker-compose.yml file, add labels for your service with format:

  labels:
    rrpsfd:domain: port of your application

Example:

You have service:

services:
  test:
    image: your-image:latest
    ports:
      - "8080:3000"

And you want to link it with example.com and subdomain.other-example.com domains. Just remake the service with the following labels:

services:
  test:
    image: your-image:latest
    labels:
      rrpsfd:example.com: 3000
      rrpsfd:subdomain.other-example.com: 3000

Run docker compose up -d and your service will be available at example.com and subdomain.other-example.com. SSL certificates will be automatically generated and renewed.

I'm using this project to manage my services. For example, I have Minesweeper that have next docker-compose.yml file:

services:
  main:
    build: .
    restart: unless-stopped
    labels:
      rrpsfd:ms.3spikes.space: 80 # link to rrpsfd instead of ports: - "80:80"

CLI

If you want to manage your services from the command line, you can use the docker exec -it rrpsfd rrpsfd. It provides a simple interface to manage your services, including adding, removing, and updating services (Not only those running in Docker).

If you just want to check connected services, run previous command without -it (docker exec rrpsfd rrpsfd).

Features

  • Easy to use and configure
  • Lightweight and efficient
  • Generates SSL certificates automatically
  • Automatic and manual proxy management
  • Supports websockets
  • Forkable, it's possible because it's written using Service pattern, add your own services to the RRPSFD by implementing the Service trait.

Roadmap

  • Http 1 Reverse proxy
  • Docker integration
  • CLI tools
  • Letsencrypt integration
  • WebSockets support
  • Hostname override feature
  • Http 2 Reverse proxy
  • Http 3 Reverse proxy
  • Custom Protocols Reverse Proxy
Description
No description provided
Readme 58 KiB
Languages
Rust 99%
Dockerfile 1%