3.1 KiB
Getting started with go-proxy
docker container
Setup
-
Install
wget
if not already -
Run setup script
bash <(wget -qO- https://6uo.me/go-proxy-setup-docker)
What it does:
- Create required directories
- Setup
config.yml
andcompose.yml
-
Verify folder structure and then
cd go-proxy
go-proxy ├── certs ├── compose.yml └── config ├── config.yml └── providers.yml
-
Enable HTTPs (optional)
-
To use autocert feature
- completing
autocert
section inconfig/config.yml
- mount
certs/
to/app/certs
to store obtained certs
- completing
-
To use existing certificate
mount your wildcard (
*.y.z
) SSL cert- cert / chain / fullchain ->
/app/certs/cert.crt
- private key ->
/app/certs/priv.key
- cert / chain / fullchain ->
-
-
Modify
compose.yml
fit your needsAdd networks to make sure it is in the same network with other containers, or make sure
proxy.<alias>.host
is reachable -
Run
docker compose up -d
to start the container -
Start editing config files in
http://<ip>:8080
Troubleshooting
-
Firewall issues
If you are using
ufw
with vpn that drop all inbound traffic except vpn, run below:sudo ufw allow from 172.16.0.0/16 to 100.64.0.0/10
Explaination:
Docker network is usually
172.16.0.0/16
Tailscale is used as an example,
100.64.0.0/10
will be the CIDRYou can also list CIDRs of all docker bridge networks by:
docker network inspect $(docker network ls | awk '$3 == "bridge" { print $1}') | jq -r '.[] | .Name + " " + .IPAM.Config[0].Subnet' -
Docker compose example
volumes:
adg-work:
adg-conf:
mc-data:
services:
adg:
image: adguard/adguardhome
restart: unless-stopped
labels:
- proxy.aliases=adg,adg-dns,adg-setup
- proxy.adg.port=80
- proxy.adg-setup.port=3000
- proxy.adg-dns.scheme=udp
- proxy.adg-dns.port=20000:dns
volumes:
- adg-work:/opt/adguardhome/work
- adg-conf:/opt/adguardhome/conf
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
container_name: mc
restart: unless-stopped
labels:
- proxy.mc.scheme=tcp
- proxy.mc.port=20001:25565
environment:
EULA: "TRUE"
volumes:
- mc-data:/data
go-proxy:
image: ghcr.io/yusing/go-proxy
container_name: go-proxy
restart: always
ports:
- 80:80 # http
- 443:443 # optional, https
- 8080:8080 # http panel
- 8443:8443 # optional, https panel
- 53:20000/udp # adguardhome
- 25565:20001/tcp # minecraft
volumes:
- ./config:/app/config
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- proxy.aliases=gp
- proxy.panel.port=8080
Services URLs
gp.yourdomain.com
: go-proxy web paneladg-setup.yourdomain.com
: adguard setup (first time running)adg.yourdomain.com
: adguard dashboardyourdomain.com:53
: adguard dnsyourdomain.com:25565
: minecraft server