Skip to content

rubuy-74/tinyrp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyRP - Tiny Reverse Proxy

Build Status License Go Version

TinyRP is a lightweight reverse proxy server written in Go, featuring configurable endpoints, health checks, and easy demo setup.


🚀 Features

  • ⚡ Configurable reverse proxy routes
  • ❤️ Health check endpoint (/ping)
  • 📝 YAML-based configuration
  • 🐳 Docker-based demo services

🛠 Tech Stack


🏗️ Getting Started

Prerequisites

  • Go 1.20 or newer
  • Docker
  • Make

📦 Configuration

The proxy is configured using a YAML file located at data/config.yaml. Example configuration:

server:
  host: "localhost"
  listen_port: "8080"

resources:
  - name: Server1
    endpoint: /server1
    destination_url: "http://localhost:9001"
    health_interval: "2s"

▶️ Running the Demo

  1. Start the demo backend services:

    make run-containers
  2. Start the proxy server:

    make run-proxy-server
  3. Test the proxy:

  4. To stop the demo services:

    make stop

🧰 Available Make Commands

  • make run-containers — Starts demo HTTP services using Docker
  • make stop — Stops all demo services
  • make run-proxy-server — Starts the proxy server
  • make help — Displays help information about available commands

📁 Project Structure

├── cmd/
│   └── main.go              # Application entry point
├── data/
│   └── config.yaml          # Configuration file
├── internal/
│   ├── configs/
│   │   └── config.go        # Configuration loading
│   └── server/
│       ├── healthcheck.go   # Health check endpoint
│       ├── proxy_handlers.go# Proxy request handling
│       └── server.go        # Main server setup
└── Makefile                # Build and run commands

📜 License

This project is licensed under the MIT License.


Made with ❤️ by rubuy-74

About

A small sized reverse proxy server in Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published