![Gazan](https://netangels.net/utils/gazan-white.jpg) # Gazan - The beast-mode reverse proxy. Gazan is a Reverse proxy, service mesh based on Cloudflare's Pingora **What Gazan means?** Gazan = Գազան = beast / wild animal in Armenian / Often used as a synonym to something great.. Built on Rust, on top of **Cloudflare’s Pingora engine**, **Gazan** delivers world-class performance, security, and scalability — right out of the box. --- ## 🌍 Highlights - ⚙️ **Upstream Providers:** Supports `file`-based static upstreams, dynamic service discovery via `Consul`, and upcoming `Kubernetes` integration - 🔁 **Hot Reloading:** Modify upstreams on the fly via `upstreams.yaml` — no restart needed - 🔮 **Automatic WebSocket Support:** No special config required — connection upgrades are handled seamlessly - 🔮 **Automatic GRPC Support:** Zero config for GRPC upstreams and downstreams - 🔐 **TLS Termination:** Fully supports TLS for incoming and upstream traffic - 🛡️ **Built-in Auth Support:** - 🧠 **CORS & Header Injection:** Global and per-route header configuration - 🧪 **Health Checks:** Pluggable health check methods for upstreams - 🛰️ **Remote Config Push:** Lightweight HTTP API to update configs from CI/CD or other systems --- ## 📁 File Structure ``` . ├── main.yaml # Main configuration loaded at startup ├── upstreams.yaml # Watched config with upstream mappings ├── etc/ │ ├── server.crt # TLS certificate (required if using TLS) │ └── key.pem # TLS private key ``` --- ## 🛠 Configuration Overview ### 🔧 `main.yaml` - `proxy_address_http`: `0.0.0.0:6193` (HTTP listener) - `proxy_address_tls`: `0.0.0.0:6194` (TLS listener, optional) - `config_address`: `0.0.0.0:3000` (HTTP API for remote config push) - `upstreams_conf`: `etc/upstreams.yaml` (location of upstreams config) - `log_level`: `info` (verbosity of logs) - `hc_method`: `HEAD`, `hc_interval`: `2s` (upstream health checks) - `user` Optional. Drop privileges to regular user. To bind to privileged ports. Requires to start as root. - `group` Optional. Drop privileges to regular group - Other defaults: thread count, keep-alive pool size, etc. ### 🌐 `upstreams.yaml` - `provider`: `file` or `consul` - File-based upstreams define: - Hostnames and routing paths - Backend servers (load-balanced) - Optional request headers - Optional TLS for upstreams - Global headers (e.g., CORS) apply to all proxied responses - Optional authentication (Basic, API Key, JWT) — currently commented for example --- ## 🛠 Installation Download the prebuilt binary for your architecture from releases section of [GitHub](https://github.com/sadoyan/gazan/releases) repo Make the binary executable `chmod 755 ./gazan` and run . ## 🔌 Running the Proxy ```bash ./gazan -c path/to/main.yaml ``` ## 🔌 Systemd integration ```bash cat > /etc/systemd/system/gazan.service <