.github/workflows | ||
.vscode | ||
cmd | ||
docs | ||
examples | ||
internal | ||
schema | ||
showcase | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
compose.example.yml | ||
config.example.yml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
providers.example.yml | ||
README.md | ||
README_CHT.md |
go-proxy
A lightweight, easy-to-use, and performant reverse proxy with a web UI.
Join our Discord for help and discussions
Table of content
Key Points
- Easy to use
- Effortless configuration
- Simple multi-node setup
- Error messages is clear and detailed, easy troubleshooting
- Auto SSL cert management (See Supported DNS Challenge Providers)
- Auto configuration for docker containers
- Auto hot-reload on container state / config file changes
- idlesleeper: stop containers on idle, wake it up on traffic (optional, see showcase)
- HTTP(s) reserve proxy
- HTTP middleware support (experimental)
- Custom error pages support
- TCP and UDP port forwarding
- Web UI for configuration and monitoring (See screenshots)
- Supports linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6 multi-platform
- Written in Go
Getting Started
Setup
-
Pull docker image
docker pull ghcr.io/yusing/go-proxy:latest
-
Create new directory,
cd
into it, then run setupdocker run --rm -v .:/setup ghcr.io/yusing/go-proxy /app/go-proxy setup
-
Setup DNS Records point to machine which runs
go-proxy
, e.g.- A Record:
*.y.z
->10.0.10.1
- AAAA Record:
*.y.z
->::ffff:a00:a01
- A Record:
-
Setup
docker-socket-proxy
other docker nodes (if any) (see example) and then them insideconfig.yml
-
Done. You may now do some extra configuration
- With text editor (e.g. Visual Studio Code)
- With Web UI via
gp.y.z
- For more info, See docker.md
Commands line arguments
Argument | Description | Example |
---|---|---|
empty | start proxy server | |
validate |
validate config and exit | |
reload |
trigger a force reload of config | |
ls-config |
list config and exit | go-proxy ls-config | jq |
ls-route |
list proxy entries and exit | go-proxy ls-route | jq |
debug-ls-mtrace |
list middleware trace (works only in debug mode) | go-proxy debug-ls-mtrace | jq |
run with docker exec go-proxy /app/go-proxy <command>
Environment variables
Environment Variable | Description | Default | Values |
---|---|---|---|
GOPROXY_NO_SCHEMA_VALIDATION |
disable schema validation | false |
boolean |
GOPROXY_DEBUG |
enable debug behaviors | false |
boolean |
GOPROXY_HTTP_ADDR |
http server listening address | :80 |
[host]:port |
GOPROXY_HTTPS_ADDR |
https server listening address (if enabled) | :443 |
[host]:port |
GOPROXY_API_ADDR |
api server listening address | 127.0.0.1:8888 |
[host]:port |
Use JSON Schema in VSCode
Copy .vscode/settings.example.json
to .vscode/settings.json
and modify it to fit your needs
Config File
Include Files
These are files that include standalone proxy entries
See Fields
See providers.example.yml for examples
Showcase
idlesleeper
Build it yourself
-
Clone the repository
git clone https://github.com/yusing/go-proxy --depth=1
-
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