File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2020 env :
2121 DOCKER_USER : ${{ secrets.DOCKER_USER }}
2222 DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
23- GOOS : ${{ matrix.goos }}
24- GOARCH : ${{ matrix.goarch }}
25- CGO_ENABLED : 0
26- GO111MODULE : on
2723 run : |
2824 docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
2925 - name : Build and Push the Docker image
3228 --tag ${{ secrets.DOCKER_USER }}/http-proxy:$GITHUB_REF_NAME
3329 --file Dockerfile
3430 --push .
31+ - name : Docker Logout
32+ run : docker logout
Original file line number Diff line number Diff line change 11FROM golang:1.20-alpine AS builder
22RUN apk --no-cache add tzdata
3+ ENV GO111MODULE=on \
4+ CGO_ENABLED=0
35WORKDIR /build
46COPY . .
57RUN go mod tidy && go build -ldflags "-s -w" -o main
Original file line number Diff line number Diff line change 55### Run with docker
66
77``` bash
8- docker run -d --net=host -e HTTP_PROXY_LISTEN_ADDR=" :8888" --restart always --name http-proxy gobai/http-proxy:v0.1.1
8+ docker run -d --net=host -e HTTP_PROXY_LISTEN_ADDR=" :8888" --restart always --name http-proxy gobai/http-proxy:v0.1.6
99```
1010
1111### Test
@@ -30,6 +30,12 @@ example:
30301.1.1.1/32
3131```
3232
33+ ``` bash
34+ mkdir -p http-proxy-conf
35+ echo ' 127.0.0.1/32' > http-proxy-conf/whitelist
36+ docker run -d --net=host -e HTTP_PROXY_LISTEN_ADDR=" :8888" -v ${PWD} /http-proxy-conf:/conf --restart always --name http-proxy gobai/http-proxy:v0.1.6
37+ ```
38+
3339## Environment Variable
3440
3541| key | default |
You can’t perform that action at this time.
0 commit comments