entrypoint fix for debugging and readme update

This commit is contained in:
yusing 2024-03-22 15:39:23 +00:00
parent 5272829582
commit 22f911c30f
2 changed files with 23 additions and 15 deletions

View file

@ -11,6 +11,9 @@ In the examples domain `x.y.z` is used, replace them with your domain
- [Binary](#binary)
- [Docker](#docker)
- [Configuration](#configuration)
- [Labels](#labels)
- [Environment Variables](#environment-variables)
- [Examples](#examples)
- [Single Port Configuration](#single-port-configuration-example)
- [Multiple Ports Configuration](#multiple-ports-configuration-example)
- [TCP/UDP Configuration](#tcpudp-configuration-example)
@ -51,7 +54,6 @@ In the examples domain `x.y.z` is used, replace them with your domain
1. (Optional) Prepare your certificates in `certs/` to enable https. See [Getting SSL Certs](#getting-ssl-certs)
- cert / chain / fullchain: `./certs/cert.crt`
- private key: `./certs/priv.key`
@ -67,7 +69,6 @@ In the examples domain `x.y.z` is used, replace them with your domain
3. (Optional) Mount your SSL certs to enable https. See [Getting SSL Certs](#getting-ssl-certs)
- cert / chain / fullchain -> `/app/certs/cert.crt`
- private key -> `/app/certs/priv.key`
@ -75,7 +76,6 @@ In the examples domain `x.y.z` is used, replace them with your domain
5. (Optional) If you are using ufw with vpn that drop all inbound traffic except vpn, run below to allow docker containers to connect to `go-proxy`
In case the network of your container is in subnet `172.16.0.0/16` (bridge),
and vpn network is under `100.64.0.0/10` (i.e. tailscale)
@ -95,9 +95,9 @@ None
## Configuration
With container name, no label needs to be added.
With container name, most of the time no label needs to be added.
However, there are some labels you can manipulate with:
### Labels
- `proxy.aliases`: comma separated aliases for subdomain matching
- defaults to `container_name`
@ -131,6 +131,13 @@ However, there are some labels you can manipulate with:
- `proxy.<alias>.load_balance`: enable load balance
- allowed: `1`, `true`
### Environment variables
- `GOPROXY_DEBUG`: set to `1` or `true` to enable debug behaviors (i.e. output, etc.)
- `GOPROXY_REDIRECT_HTTP`: set to `0` or `false` to disable http to https redirect (only when certs are located)
## Examples
### Single port configuration example
```yaml
@ -279,6 +286,7 @@ Local benchmark (client running wrk and `go-proxy` server are under same proxmox
```
- With `go-proxy` reverse proxy
```
root@http-benchmark-client:~# wrk -t 10 -c 200 -d 10s -H "Host: bench.6uo.me" --latency http://10.0.1.7/bench
Running 10s test @ http://10.0.1.7/bench

View file

@ -3,7 +3,7 @@ if [ "$1" == "restart" ]; then
echo "restarting"
killall go-proxy
fi
if [ "$DEBUG" == "1" ]; then
if [ "$GOPROXY_DEBUG" == "1" ]; then
/app/go-proxy 2> log/go-proxy.log &
tail -f /dev/null
else