added support for a few middlewares, added match_domain option, changed index reference prefix from $ to #, etc.

This commit is contained in:
yusing
2024-09-27 09:57:57 +08:00
parent 345a4417a6
commit f474ae4f75
47 changed files with 1523 additions and 446 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: all build up quick-restart restart logs get udp-server
.PHONY: all setup build test up restart logs get debug run archive repush rapid-crash debug-list-containers
all: debug
@@ -9,7 +9,8 @@ setup:
build:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -pgo=auto -o bin/go-proxy github.com/yusing/go-proxy
CGO_ENABLED=0 GOOS=linux \
go build -ldflags '${BUILD_FLAG}' -pgo=auto -o bin/go-proxy github.com/yusing/go-proxy
test:
go test ./src/...
@@ -29,6 +30,9 @@ get:
debug:
make build && sudo GOPROXY_DEBUG=1 bin/go-proxy
run:
BUILD_FLAG="-s -w" make build && sudo bin/go-proxy
archive:
git archive HEAD -o ../go-proxy-$$(date +"%Y%m%d%H%M").zip
@@ -44,4 +48,4 @@ rapid-crash:
sudo docker rm -f test_crash
debug-list-containers:
bash -c 'echo -e "GET /containers/json HTTP/1.0\r\n" | sudo netcat -U /var/run/docker.sock | tail -n +9 | jq'
bash -c 'echo -e "GET /containers/json HTTP/1.0\r\n" | sudo netcat -U /var/run/docker.sock | tail -n +9 | jq'