Sign inSign up

hmdmph/dyn-proxy-go

By hmdmph

•Updated 6 months ago

dynamic HTTP/HTTPS reverse proxy written in Golang

Image
Networking
API management
Web servers
0

461

hmdmph/dyn-proxy-go repository overview

A dynamic HTTP/HTTPS reverse proxy written in Go that intelligently routes requests based on the incoming Host header or HTTP/2 :authority pseudo-header. Features dynamic SNI support, transparent proxying, a built-in dashboard UI, and Kubernetes-ready deployment.

⁠Features

  • Dynamic Routing — Automatically routes requests based on Host header (HTTP/1.1) or :authority pseudo-header (HTTP/2)
  • Dynamic SNI — Automatic Server Name Indication based on request domain for proper TLS handshakes

All options can be set via CLI flags or environment variables. CLI flags take precedence.

  • Transparent Proxying — Preserves original Host headers for backend servers
  • Dashboard UI — Configurable HTML dashboard listing proxy endpoints
  • Structured Logging — JSON-formatted logs with configurable levels and detailed request tracking
  • Health Checks — Built-in /health endpoint for Kubernetes liveness/readiness probes
  • Graceful Shutdown — Proper signal handling (SIGINT, SIGTERM) for clean shutdowns
  • Flexible Configuration — CLI flags and environment variables
  • Distroless Docker Image — Minimal, secure container image
  • Kubernetes Ready — Complete K8s manifests included

All options can be set via CLI flags or environment variables. CLI flags take precedence.

FlagEnv VariableDefaultDescription
-portLISTEN_PORT8080Proxy listen port
-target-hostTARGET_HOSTexample.comFallback target host
-target-portTARGET_PORT443Target port to proxy to
-target-schemeTARGET_SCHEMEhttpsTarget scheme (http / https)
-sniSNI(dynamic)SNI hostname (auto-set from request)
-log-levelLOG_LEVELinfoLog level (debug, info, warn, error)
-skip-tls-verifySKIP_TLS_VERIFYfalseSkip TLS certificate verification
-enable-tlsENABLE_TLSfalseEnable TLS for the proxy itself
-tls-certTLS_CERT_FILE/etc/certs/tls.crtTLS certificate file path
-tls-keyTLS_KEY_FILE/etc/certs/tls.keyTLS private key file path
-read-timeoutREAD_TIMEOUT30Read timeout (seconds)
-write-timeoutWRITE_TIMEOUT30Write timeout (seconds)
-idle-timeoutIDLE_TIMEOUT120Idle timeout (seconds)
-page-titlePAGE_TITLEDashboard page title
-sub-titleSUB_TITLEDashboard subtitle
-page-gradientPAGE_GRADIENTDashboard CSS gradient
-page-title-iconPAGE_TITLE_ICONDashboard title icon
-proxy-listPROXY_LISTYAML proxy list for dashboard

https://github.com/hmdmph/Dyn-Proxy-Go⁠

Tag summary

Content type

Image

Digest

sha256:02123d277…

Size

7.9 MB

Last updated

6 months ago

docker pull hmdmph/dyn-proxy-go:0.1.0