Sign inSign up
leoxy logo

mohamed0699/leoxy

By mohamed0699

•Updated 2 days ago

The lightweight Proxy service exposes a small HTTP reverse proxy.

Image
Networking
Web servers
Web analytics
0

933

mohamed0699/leoxy repository overview

⁠Leoxy

Leoxy is a lightweight reverse proxy written in Go. Route HTTP traffic to configurable upstream servers by path, or proxy TCP and UDP traffic through dedicated listeners.

⁠Features

  • Path-based routing and round-robin load balancing with failover
  • HTTP/1.1, HTTP/2 upstreams, WebSockets, and GraphQL over HTTP
  • TCP and UDP proxying
  • Health checks: /health/live and /health/ready
  • Metrics endpoint: /metrics
  • Rate limiting, API key and JWT authentication, mTLS, and CIDR access control

⁠Quick start

Pull the latest image:

docker pull mohamed0699/leoxy:latest

Run Leoxy and mount a local directory for its configuration:

mkdir -p leoxy
docker run --rm -p 80:80 -v "${PWD}/leoxy:/app/leoxy" mohamed0699/leoxy:latest

Leoxy reads configuration from leoxy/leoxy_config.yaml. On first start, it creates a default configuration in the mounted directory.

⁠Docker Compose

services:
  leoxy:
    image: mohamed0699/leoxy:latest
    ports:
      - "80:80"
    volumes:
      - ./leoxy:/app/leoxy
    restart: unless-stopped

Start the service:

docker compose up -d

⁠Configure upstreams

Add upstreams to leoxy/leoxy_config.yaml. For services in the same Compose network, use the service name as the hostname:

upstream:
  - name: "Backend"
    path: /api
    servers:
      - "http://backend:9000"

For an application running directly on the Docker host, use host.docker.internal. On Linux Docker Engine, add this to the Leoxy service:

extra_hosts:
  - "host.docker.internal:host-gateway"

The backend must listen on 0.0.0.0 to accept connections from the container. Inside a container, localhost refers to that container itself.

⁠Configuration and documentation

Set secrets such as API_KEYS, JWT_SECRET, and REDIS_PASSWORD through environment variables. Do not put secrets in the image or commit them to your repository.

Tag summary

Content type

Image

Digest

sha256:7a8476846…

Size

8 MB

Last updated

2 days ago

docker pull mohamed0699/leoxy