Easy to use reverse proxy with docker integration
Find a file
2024-09-16 03:48:39 +08:00
.github/workflows v0.5: remove binary build 2024-08-09 07:09:42 +08:00
.vscode Dev 2024-04-08 05:07:27 +00:00
docs v0.5: fixed nil dereference for empty autocert config, fixed and simplified 'error' module, small readme and docs update 2024-08-13 04:59:34 +08:00
frontend@8cdf9eaa10 v0.5: readme and dockerfile update, removed old panel sources, added new frontend as submodule 2024-08-09 07:03:24 +08:00
schema v0.5: (BREAKING) simplified config format, improved output formatting, fixed docker watcher 2024-09-16 03:48:39 +08:00
src v0.5: (BREAKING) simplified config format, improved output formatting, fixed docker watcher 2024-09-16 03:48:39 +08:00
.gitignore v0.5: (BREAKING) simplified config format, improved output formatting, fixed docker watcher 2024-09-16 03:48:39 +08:00
.gitlab-ci.yml Dev 2024-04-08 05:07:27 +00:00
.gitmodules v0.5: readme and dockerfile update, removed old panel sources, added new frontend as submodule 2024-08-09 07:03:24 +08:00
compose.example.yml v0.5: readme and dockerfile update, removed old panel sources, added new frontend as submodule 2024-08-09 07:03:24 +08:00
config.example.yml v0.5: (BREAKING) simplified config format, improved error output, updated proxy entry default value for 'port' 2024-08-14 02:41:11 +08:00
Dockerfile v0.5: (BREAKING) simplified config format, improved error output, updated proxy entry default value for 'port' 2024-08-14 02:41:11 +08:00
go.work v0.5: (BREAKING) simplified config format, improved output formatting, fixed docker watcher 2024-09-16 03:48:39 +08:00
LICENSE added license 2024-04-01 04:08:48 +00:00
Makefile v0.5: fixed nil dereference for empty autocert config, fixed and simplified 'error' module, small readme and docs update 2024-08-13 04:59:34 +08:00
providers.example.yml preparing for v0.5 2024-08-01 10:06:42 +08:00
README.md v0.5: (BREAKING) simplified config format, improved error output, updated proxy entry default value for 'port' 2024-08-14 02:41:11 +08:00
setup-docker.sh docs update, added setup scripts 2024-03-29 21:02:21 +00:00
version.txt v0.5: (BREAKING) simplified config format, improved output formatting, fixed docker watcher 2024-09-16 03:48:39 +08:00

go-proxy

A lightweight, easy-to-use, and efficient reverse proxy and load balancer with a web UI.

Table of content

Key Points

  • Easy to use
  • Auto certificate obtaining and renewal (See Supported DNS Challenge Providers)
  • Auto configuration for docker contaienrs
  • Auto hot-reload on container state / config file changes
  • Support HTTP(s), TCP and UDP
  • Support HTTP(s) round robin load balancing
  • Web UI for configuration and monitoring (See screenshots)
  • Written in Go

🔼Back to top

Getting Started

  1. Setup DNS Records

    • A Record: *.y.z -> 10.0.10.1
    • AAAA Record: *.y.z -> ::ffff:a00:a01
  2. Setup go-proxy See here

  3. Configure go-proxy

    • with text editor (i.e. Visual Studio Code)
    • or with web config editor via http://gp.y.z

🔼Back to top

Commands

  • go-proxy start proxy server
  • go-proxy validate validate config and exit
  • go-proxy reload trigger a force reload of config

For docker containers, run docker exec -it go-proxy /app/go-proxy <command>

Environment variables

Booleans:

  • GOPROXY_DEBUG enable debug behaviors
  • GOPROXY_NO_SCHEMA_VALIDATION: disable schema validation (useful for testing new DNS Challenge providers)

Use JSON Schema in VSCode

Copy .vscode/settings.example.json to .vscode/settings.json and modify it to fit your needs

🔼Back to top

Config File

See config.example.yml for more

# autocert configuration
autocert:
  email: # ACME Email
  domains: # a list of domains for cert registration
  provider: # DNS Challenge provider
  options: # provider specific options
    - ...
# reverse proxy providers configuration
providers:
  include:
    - providers.yml
    - other_file_1.yml
    - ...
  docker:
    local: $DOCKER_HOST
    remote-1: tcp://10.0.2.1:2375
    remote-2: ssh://root:1234@10.0.2.2

🔼Back to top

Provider File

Fields are same as docker labels starting from scheme

See providers.example.yml for examples

🔼Back to top

Known issues

  • Cert "renewal" is actually obtaining a new cert instead of renewing the existing one

🔼Back to top

Build it yourself

  1. Install / Upgrade go (>=1.22) and make if not already

  2. Clear cache if you have built this before (go < 1.22) with go clean -cache

  3. get dependencies with make get

  4. build binary with make build

  5. start your container with make up (docker) or bin/go-proxy (binary)

🔼Back to top