mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
Easy to use reverse proxy with docker integration
.github/workflows | ||
.vscode | ||
docs | ||
frontend@8cdf9eaa10 | ||
schema | ||
src | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
compose.example.yml | ||
config.example.yml | ||
Dockerfile | ||
go.work | ||
LICENSE | ||
Makefile | ||
providers.example.yml | ||
README.md | ||
setup-docker.sh | ||
version.txt |
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
Getting Started
-
Setup DNS Records
- A Record:
*.y.z
->10.0.10.1
- AAAA Record:
*.y.z
->::ffff:a00:a01
- A Record:
-
Setup
go-proxy
See here -
Configure
go-proxy
- with text editor (i.e. Visual Studio Code)
- or with web config editor via
http://gp.y.z
Commands
go-proxy
start proxy servergo-proxy validate
validate config and exitgo-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 behaviorsGOPROXY_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
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
Provider File
Fields are same as docker labels starting from scheme
See providers.example.yml for examples
Known issues
- Cert "renewal" is actually obtaining a new cert instead of renewing the existing one
Build it yourself
-
Install / Upgrade go (>=1.22) and
make
if not already -
Clear cache if you have built this before (go < 1.22) with
go clean -cache
-
get dependencies with
make get
-
build binary with
make build
-
start your container with
make up
(docker) orbin/go-proxy
(binary)