diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 794a8de..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,59 +0,0 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: docker - -on: - workflow_dispatch: - release: - types: [published] - branches: [ master ] - -jobs: - build_docker: - - runs-on: ubuntu-latest - steps: - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push nps - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile.nps - platforms: linux/amd64,linux/arm,linux/arm64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/nps:latest - ${{ secrets.DOCKERHUB_USERNAME }}/nps:${{ env.RELEASE_VERSION }} - - name: Build and push npc - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile.npc - platforms: linux/amd64,linux/arm,linux/arm64 - push: true - tags: | - ${{ secrets.DOCKERHUB_USERNAME }}/npc:latest - ${{ secrets.DOCKERHUB_USERNAME }}/npc:${{ env.RELEASE_VERSION }} - - diff --git a/.github/workflows/pkg.yml b/.github/workflows/pkg.yml index 775f0d1..98d6612 100644 --- a/.github/workflows/pkg.yml +++ b/.github/workflows/pkg.yml @@ -74,3 +74,50 @@ jobs: npc_sdk.tar.gz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + build_docker: + + runs-on: ubuntu-latest + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + - name: Set env + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push nps + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.nps + platforms: linux/amd64,linux/arm,linux/arm64 + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/nps:latest + ${{ secrets.DOCKERHUB_USERNAME }}/nps:${{ env.RELEASE_VERSION }} + - name: Build and push npc + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.npc + platforms: linux/amd64,linux/arm,linux/arm64 + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/npc:latest + ${{ secrets.DOCKERHUB_USERNAME }}/npc:${{ env.RELEASE_VERSION }} + diff --git a/server/proxy/http.go b/server/proxy/http.go index 53f8056..86e6b50 100644 --- a/server/proxy/http.go +++ b/server/proxy/http.go @@ -231,7 +231,7 @@ reset: //change the host and header and set proxy setting common.ChangeHostAndHeader(r, host.HostChange, host.HeaderChange, c.Conn.RemoteAddr().String(), s.addOrigin) - logs.Trace("%s request, method %s, host %s, url %s, remote address %s, target %s", r.URL.Scheme, r.Method, r.Host, r.URL.Path, c.RemoteAddr().String(), lk.Host) + logs.Info("%s request, method %s, host %s, url %s, remote address %s, target %s", r.URL.Scheme, r.Method, r.Host, r.URL.Path, c.RemoteAddr().String(), lk.Host) //write lenConn = conn.NewLenConn(connClient) //lenConn = conn.LenConn