From 235772d5e2ace523cbb21e1d4088af89abe7075d Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 17 Jul 2023 10:30:54 -0700 Subject: [PATCH 001/128] make the makefile a bit more dynamic --- Makefile | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 3a411719..5fa8a255 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ SIGN_KEY ?= ${HOME}/.minisign/go-camo.key # app specific info APP_NAME := go-camo APP_VER := $(shell git describe --always --tags|sed 's/^v//') +GOPATH := $(shell go env GOPATH) VERSION_VAR := main.ServerVersion # flags and build configuration @@ -25,6 +26,8 @@ CC_OUTPUT_TPL := ${BUILDDIR}/bin/{{.Dir}}.{{.OS}}-{{.Arch}} # some exported vars (pre-configure go build behavior) export GO111MODULE=on export CGO_ENABLED=0 +## enable go 1.21 loopvar "experiment" +#export GOEXPERIMENT=loopvar define HELP_OUTPUT Available targets: @@ -40,7 +43,7 @@ Available targets: endef export HELP_OUTPUT -.PHONY: help clean build test cover man man-copy all tar cross-tar +.PHONY: help clean build test cover man man-copy all tar cross-tar setup-check setup-gox help: @echo "$$HELP_OUTPUT" @@ -50,13 +53,21 @@ clean: setup: -setup-gox: - @if [ -z "$(shell which gox)" ]; then \ - echo "* 'gox' command not found."; \ - echo " install (or otherwise ensure presence in PATH)"; \ - echo " go install github.com/mitchellh/gox"; \ - exit 1;\ - fi +setup-check: ${GOPATH}/bin/staticcheck ${GOPATH}/bin/gosec ${GOPATH}/bin/govulncheck + +${GOPATH}/bin/staticcheck: + go install honnef.co/go/tools/cmd/staticcheck@latest + +${GOPATH}/bin/gosec: + go install github.com/securego/gosec/v2/cmd/gosec@latest + +${GOPATH}/bin/govulncheck: + go install golang.org/x/vuln/cmd/govulncheck@latest + +setup-gox: $GOPATH/bin/gox + +$GOPATH/bin/gox: + go install github.com/mitchellh/gox@latest build: setup @[ -d "${BUILDDIR}/bin" ] || mkdir -p "${BUILDDIR}/bin" @@ -75,14 +86,16 @@ cover: setup @echo "Running tests with coverage..." @go test -vet=off -cover ${GOTEST_FLAGS} ./... -check: setup +check: setup setup-check @echo "Running checks and validators..." @echo "... staticcheck ..." - @$$(go env GOPATH)/bin/staticcheck ./... + @${GOPATH}/bin/staticcheck ./... @echo "... go-vet ..." @go vet ./... @echo "... gosec ..." - @$$(go env GOPATH)/bin/gosec -quiet ./... + @${GOPATH}/bin/gosec -quiet ./... + @echo "... govulncheck ..." + @${GOPATH}/bin/govulncheck ./... .PHONY: update-go-deps update-go-deps: From d86f6580938b965443999cb41e29d7ccb1b0de1e Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 17 Jul 2023 10:36:01 -0700 Subject: [PATCH 002/128] update CI go version --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f2325eb1..1359704a 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -10,7 +10,7 @@ jobs: name: Build strategy: matrix: - go: ['1.19.x'] + go: ['1.20.x'] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: From 2fbe6eeabffbcd11586311a6178b42c3dc4c81ce Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 19 Jul 2023 13:04:40 -0700 Subject: [PATCH 003/128] remove mention of the now seeminly unmaintained fork --- README.adoc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.adoc b/README.adoc index b560b9e0..545f90af 100644 --- a/README.adoc +++ b/README.adoc @@ -525,11 +525,6 @@ with specific containerization requirements. When in doubt, prefer the statically compiled {link-releases}, unless you specifically need a container. -== Alternative Implementations - -* {link-mrsaints}' go-camo {link-arachnys-fork} -- - supports proxying additional content types (fonts/css). - == Changelog See xref:CHANGELOG.adoc[CHANGELOG]. From 58ad54e55d585d3d5d059f5f35dabc102efe740d Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 19 Jul 2023 13:21:49 -0700 Subject: [PATCH 004/128] migrate to new SECURITY.md file seems github dropped support for SECURITY.adoc ? --- .github/SECURITY.md | 15 +++++++++++++++ SECURITY.adoc | 40 ---------------------------------------- 2 files changed, 15 insertions(+), 40 deletions(-) create mode 100644 .github/SECURITY.md delete mode 100644 SECURITY.adoc diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 00000000..26ca03f8 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +## Supported Versions + +The most recent version "release" version to appear on the +[releases][1] page is currently supported. + +## Reporting a Vulnerability + +To report a vulnerability, please use the +[Privately reporting a security vulnerability][2] +facility. + +[1]: https://github.com/cactus/go-camo/releases +[2]: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability diff --git a/SECURITY.adoc b/SECURITY.adoc deleted file mode 100644 index 90ff8ed5..00000000 --- a/SECURITY.adoc +++ /dev/null @@ -1,40 +0,0 @@ -= Security Policy -:toc: macro -ifdef::env-github[] -:toc-title: -:tip-caption: :bulb: -:note-caption: :bulb: -:important-caption: :heavy_exclamation_mark: -:caution-caption: :fire: -:warning-caption: :warning: -endif::[] - -ifdef::env-github[] -[discrete] -== Contents -endif::[] -toc::[] - -== Supported Versions - -The most recent version "release" version to appear on the -https://github.com/cactus/go-camo/releases[releases] page is currently -supported. - -== Reporting a Vulnerability - -To report a vulnerability, please open a github Issue stating only that you -have found a security vulnerability or other problem that you would like to -report, and requesting a -https://help.github.com/en/articles/about-maintainer-security-advisories[Draft -Security Advisory] be created. - -A Draft Security Advisory will then be created, and the user that opened the -Issue will be invited to collaborate on the Draft Advisory. - -If the issue is accepted, a comment to that effect will be made in the original -issue. If the Security Advistory leaves draft state, it will eventually be -linked from the original issue. - -If the issue is declined, a comment to that effect will be made in the original -issue. From de4a29bdde951573f5904395004afb4e1f994d89 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 19 Jul 2023 14:18:17 -0700 Subject: [PATCH 005/128] update docker contaier build action --- .github/workflows/publish-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index f33d742c..b9869eea 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Go ${{ matrix.goVer }} uses: actions/setup-go@v1 with: - go-version: '1.19.x' + go-version: '1.20.x' id: go - name: Src Checkout From ed415563fa4d69ddbba288f1260fe13a2ddfe55f Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 20 Jul 2023 13:29:46 -0700 Subject: [PATCH 006/128] update dependencies --- CHANGELOG.adoc | 1 + go.mod | 24 +++++++++--------- go.sum | 68 +++++++++++++++++++------------------------------- 3 files changed, 38 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 6b140add..972878a4 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,7 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD +* update dependencies == v2.4.3 - 2023-02-18 * update library dependency golang.org/x/net. + diff --git a/go.mod b/go.mod index 626c25fb..e44ac67d 100644 --- a/go.mod +++ b/go.mod @@ -5,23 +5,23 @@ go 1.19 require ( github.com/cactus/mlog v1.0.4 github.com/jessevdk/go-flags v1.5.0 - github.com/prometheus/client_golang v1.14.0 - github.com/prometheus/common v0.39.0 - github.com/xlab/treeprint v1.1.0 - golang.org/x/net v0.7.0 - gotest.tools/v3 v3.4.0 + github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/common v0.42.0 + github.com/xlab/treeprint v1.2.0 + golang.org/x/net v0.12.0 + gotest.tools/v3 v3.5.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + github.com/prometheus/procfs v0.10.1 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect ) diff --git a/go.sum b/go.sum index c47ba834..d19da4c4 100644 --- a/go.sum +++ b/go.sum @@ -4,19 +4,19 @@ github.com/cactus/mlog v1.0.4 h1:EUSh0kpw+8p8yrzEF+oBzIXbcZ0cH7PqsbFv6lxbTZQ= github.com/cactus/mlog v1.0.4/go.mod h1:QmoSa40W9mptIRIouyVJ/n/nsxux/Va7t2tegPO+BIA= github.com/cactus/tai64 v1.0.1 h1:rXBf2Ab+1F8Fr9wAtB3xilSnDsHwfpeJUKgham4Bot0= github.com/cactus/tai64 v1.0.1/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -24,60 +24,42 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From e93fbcddd54f825cafbe6ec6c72190b76199535a Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 20 Jul 2023 13:45:07 -0700 Subject: [PATCH 007/128] update github CI actions workflow uses versions --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/publish-docker.yml | 5 +++-- .github/workflows/unit-tests.yml | 5 +++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a37089ea..92d97671 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. @@ -24,7 +24,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: go @@ -32,4 +32,4 @@ jobs: run: make build - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index b9869eea..90c828b4 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -10,13 +10,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Go ${{ matrix.goVer }} - uses: actions/setup-go@v1 + uses: actions/setup-go@v4 with: go-version: '1.20.x' + check-latest: true id: go - name: Src Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: fetch-depth: 1 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 1359704a..83be2786 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,13 +15,14 @@ jobs: runs-on: ${{ matrix.platform }} steps: - name: Setup Go ${{ matrix.go }} - uses: actions/setup-go@v1 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} + check-latest: true id: go - name: Src Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: fetch-depth: 1 From e466255885901759303a0d22a1bf12a5b9c82f95 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 20 Jul 2023 13:52:49 -0700 Subject: [PATCH 008/128] update workflow --- .github/workflows/unit-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 83be2786..a0a22d19 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -35,9 +35,6 @@ jobs: env: GOPROXY: "https://proxy.golang.org" run: | - go install honnef.co/go/tools/cmd/staticcheck@2023.1.1 - go install github.com/securego/gosec/v2/cmd/gosec@latest - hash -r make check - name: Tests From fdeed79131f3dfd67658f22d1717e8e66b503927 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 20 Jul 2023 13:57:41 -0700 Subject: [PATCH 009/128] update workflow --- .github/workflows/unit-tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index a0a22d19..81f70196 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,6 +14,11 @@ jobs: platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: + - name: Src Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Setup Go ${{ matrix.go }} uses: actions/setup-go@v4 with: @@ -21,11 +26,6 @@ jobs: check-latest: true id: go - - name: Src Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - name: Build env: GOPROXY: "https://proxy.golang.org" From 1a1ca047b84e606e96b3af2d3c39f125947f162b Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 20 Jul 2023 13:58:12 -0700 Subject: [PATCH 010/128] update workflow --- .github/workflows/publish-docker.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 90c828b4..6235d744 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -9,6 +9,11 @@ jobs: name: docker-publish runs-on: ubuntu-latest steps: + - name: Src Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Setup Go ${{ matrix.goVer }} uses: actions/setup-go@v4 with: @@ -16,11 +21,6 @@ jobs: check-latest: true id: go - - name: Src Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - name: Tests if: success() env: From 2df76794047c073a3b99885dd9716605a6a17d6d Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 20 Jul 2023 14:04:23 -0700 Subject: [PATCH 011/128] more minor workflow updates --- .github/workflows/codeql-analysis.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 92d97671..20afccc7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,14 +22,23 @@ jobs: # a pull request then we can checkout the head. fetch-depth: 2 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.20.x' + check-latest: true + id: go + + - name: Build + env: + GOPROXY: "https://proxy.golang.org" + run: make build + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: go - - name: build - run: make build - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From ff943fbbf390560409b3c0d38e2fdf2c17c76d5a Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 25 Jul 2023 13:31:48 -0700 Subject: [PATCH 012/128] bump version in go.mod to v2 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e44ac67d..dd69f7b9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cactus/go-camo +module github.com/cactus/go-camo/v2 go 1.19 From 7328312917f5bf0d5154ade4400e403e156ba80e Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 25 Jul 2023 13:34:37 -0700 Subject: [PATCH 013/128] fix other module related urls go packaging is not so great sometimes... --- cmd/go-camo/main.go | 6 +++--- cmd/url-tool/main.go | 2 +- pkg/camo/proxy.go | 4 ++-- pkg/camo/vars.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 60766062..77d0953c 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -19,9 +19,9 @@ import ( "syscall" "time" - "github.com/cactus/go-camo/pkg/camo" - "github.com/cactus/go-camo/pkg/htrie" - "github.com/cactus/go-camo/pkg/router" + "github.com/cactus/go-camo/v2/pkg/camo" + "github.com/cactus/go-camo/v2/pkg/htrie" + "github.com/cactus/go-camo/v2/pkg/router" "github.com/cactus/mlog" flags "github.com/jessevdk/go-flags" diff --git a/cmd/url-tool/main.go b/cmd/url-tool/main.go index 991469be..851a4b4f 100644 --- a/cmd/url-tool/main.go +++ b/cmd/url-tool/main.go @@ -12,7 +12,7 @@ import ( "os" "strings" - "github.com/cactus/go-camo/pkg/camo/encoding" + "github.com/cactus/go-camo/v2/pkg/camo/encoding" flags "github.com/jessevdk/go-flags" ) diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index 552c67b0..dd1bbe4c 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -19,8 +19,8 @@ import ( "syscall" "time" - "github.com/cactus/go-camo/pkg/camo/encoding" - "github.com/cactus/go-camo/pkg/htrie" + "github.com/cactus/go-camo/v2/pkg/camo/encoding" + "github.com/cactus/go-camo/v2/pkg/htrie" "github.com/cactus/mlog" ) diff --git a/pkg/camo/vars.go b/pkg/camo/vars.go index 6cea3d53..2687196a 100644 --- a/pkg/camo/vars.go +++ b/pkg/camo/vars.go @@ -7,7 +7,7 @@ package camo import ( "errors" - "github.com/cactus/go-camo/pkg/htrie" + "github.com/cactus/go-camo/v2/pkg/htrie" ) var ( From 9eda7a0773f85a94eb9600a998ed766256632221 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 25 Jul 2023 13:37:42 -0700 Subject: [PATCH 014/128] missed a couple --- pkg/camo/helpers_test.go | 4 ++-- pkg/camo/proxy_timeout_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/camo/helpers_test.go b/pkg/camo/helpers_test.go index 2ab074bd..0fd5c00d 100644 --- a/pkg/camo/helpers_test.go +++ b/pkg/camo/helpers_test.go @@ -11,8 +11,8 @@ import ( "net/http/httptest" "testing" - "github.com/cactus/go-camo/pkg/camo/encoding" - "github.com/cactus/go-camo/pkg/router" + "github.com/cactus/go-camo/v2/pkg/camo/encoding" + "github.com/cactus/go-camo/v2/pkg/router" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" ) diff --git a/pkg/camo/proxy_timeout_test.go b/pkg/camo/proxy_timeout_test.go index c9514ad4..57c63d87 100644 --- a/pkg/camo/proxy_timeout_test.go +++ b/pkg/camo/proxy_timeout_test.go @@ -15,8 +15,8 @@ import ( "testing" "time" - "github.com/cactus/go-camo/pkg/camo/encoding" - "github.com/cactus/go-camo/pkg/router" + "github.com/cactus/go-camo/v2/pkg/camo/encoding" + "github.com/cactus/go-camo/v2/pkg/router" "github.com/cactus/mlog" "gotest.tools/v3/assert" is "gotest.tools/v3/assert/cmp" From d0fd83541facb2f68cdfafbf97d0f56dcea7dd4a Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 25 Jul 2023 13:40:50 -0700 Subject: [PATCH 015/128] update changelog --- CHANGELOG.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 972878a4..69244c16 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,8 @@ toc::[] == HEAD * update dependencies +* bump version in go.mod (and fix all internal module references)+ + ref: discussion #62 == v2.4.3 - 2023-02-18 * update library dependency golang.org/x/net. + From 713546cd1451ce9567f4a17514f2b16e3ba03576 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 25 Jul 2023 13:42:43 -0700 Subject: [PATCH 016/128] fix changelog syntax issue --- CHANGELOG.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 69244c16..dbfd5c31 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,8 +19,8 @@ toc::[] == HEAD * update dependencies -* bump version in go.mod (and fix all internal module references)+ - ref: discussion #62 +* bump version in go.mod (and fix all internal module references) + + ref: discussion link:https://github.com/cactus/go-camo/discussions/62[#62] == v2.4.3 - 2023-02-18 * update library dependency golang.org/x/net. + From 4c82dc08e73d6182be4ef3e7e2ec4e9015081440 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 25 Jul 2023 13:55:54 -0700 Subject: [PATCH 017/128] update changelog --- CHANGELOG.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index dbfd5c31..adc1e652 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,8 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD + +== v2.4.4 - 2023-07-25 * update dependencies * bump version in go.mod (and fix all internal module references) + ref: discussion link:https://github.com/cactus/go-camo/discussions/62[#62] From 1c26d1136b7892cb520c3311e07a937775b4a73f Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 13 Aug 2023 13:21:25 -0700 Subject: [PATCH 018/128] update to go 1.21.x also enable loopvar experiment env var --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/publish-docker.yml | 5 +++-- .github/workflows/unit-tests.yml | 11 ++++------- Makefile | 3 ++- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 20afccc7..d9d79e8d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: '1.20.x' + go-version: '1.21.x' check-latest: true id: go diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 6235d744..6eff247f 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -8,16 +8,17 @@ jobs: build: name: docker-publish runs-on: ubuntu-latest + steps: - name: Src Checkout uses: actions/checkout@v3 with: fetch-depth: 1 - - name: Setup Go ${{ matrix.goVer }} + - name: Setup Go uses: actions/setup-go@v4 with: - go-version: '1.20.x' + go-version: '1.21.x' check-latest: true id: go diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 81f70196..62d00105 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,21 +8,18 @@ on: jobs: build: name: Build - strategy: - matrix: - go: ['1.20.x'] - platform: [ubuntu-latest] - runs-on: ${{ matrix.platform }} + runs-on: ubuntu-latest + steps: - name: Src Checkout uses: actions/checkout@v3 with: fetch-depth: 1 - - name: Setup Go ${{ matrix.go }} + - name: Setup Go uses: actions/setup-go@v4 with: - go-version: ${{ matrix.go }} + go-version: '1.21.x' check-latest: true id: go diff --git a/Makefile b/Makefile index 5fa8a255..60132d3e 100644 --- a/Makefile +++ b/Makefile @@ -27,13 +27,14 @@ CC_OUTPUT_TPL := ${BUILDDIR}/bin/{{.Dir}}.{{.OS}}-{{.Arch}} export GO111MODULE=on export CGO_ENABLED=0 ## enable go 1.21 loopvar "experiment" -#export GOEXPERIMENT=loopvar +export GOEXPERIMENT=loopvar define HELP_OUTPUT Available targets: help this help clean clean up all build binaries and man pages + check run checks and validators test run tests cover run tests with cover output build build all binaries From 18ae6089f21cd0228d485749d0ca7b88ab359de8 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 13 Aug 2023 13:25:02 -0700 Subject: [PATCH 019/128] update readme make targets exampe in docs --- README.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 545f90af..ea98e565 100644 --- a/README.adoc +++ b/README.adoc @@ -167,9 +167,10 @@ Available targets: help this help clean clean up all build binaries and man pages + check run checks and validators test run tests cover run tests with cover output - build build all + build build all binaries man build all man pages tar build release tarball cross-tar cross compile and build release tarballs From e0823e8b3c37cf27bebf85d901dfd381903c694f Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 16 Aug 2023 15:50:33 -0700 Subject: [PATCH 020/128] update dependencies --- go.mod | 8 ++++---- go.sum | 51 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index dd69f7b9..c2d6301d 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/cactus/go-camo/v2 go 1.19 require ( - github.com/cactus/mlog v1.0.4 + github.com/cactus/mlog v1.0.5 github.com/jessevdk/go-flags v1.5.0 github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/common v0.42.0 + github.com/prometheus/common v0.44.0 github.com/xlab/treeprint v1.2.0 golang.org/x/net v0.12.0 gotest.tools/v3 v3.5.0 @@ -14,12 +14,12 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cactus/tai64 v1.0.1 // indirect + github.com/cactus/tai64 v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect diff --git a/go.sum b/go.sum index d19da4c4..1d914d99 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,17 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cactus/mlog v1.0.4 h1:EUSh0kpw+8p8yrzEF+oBzIXbcZ0cH7PqsbFv6lxbTZQ= -github.com/cactus/mlog v1.0.4/go.mod h1:QmoSa40W9mptIRIouyVJ/n/nsxux/Va7t2tegPO+BIA= -github.com/cactus/tai64 v1.0.1 h1:rXBf2Ab+1F8Fr9wAtB3xilSnDsHwfpeJUKgham4Bot0= -github.com/cactus/tai64 v1.0.1/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= +github.com/cactus/mlog v1.0.5 h1:TjaBRUD0ToZMTzv30SRfwDJfvz3IxDUxcw1dNk6dKAQ= +github.com/cactus/mlog v1.0.5/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= +github.com/cactus/tai64 v1.0.2 h1:c5rm3aQ9z3b6Vva2LXRSICx/Rpu9rj4MHEzRG1g7dK0= +github.com/cactus/tai64 v1.0.2/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -21,37 +19,59 @@ github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LF github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= @@ -60,6 +80,5 @@ google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From 66450d5d51d4d71470580e5d11e4f3844af0c784 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 19 Aug 2023 16:46:11 -0700 Subject: [PATCH 021/128] fix htrie matching of non punycode (eg. unicode) idna hostnames * minor optimization and adjusted some tests and test benchmarks --- CHANGELOG.adoc | 1 + Makefile | 5 ++ cmd/go-camo/main.go | 21 +++++-- pkg/camo/proxy.go | 25 ++++++-- pkg/camo/proxy_filter_test.go | 66 +++++++++++++++++---- pkg/camo/proxy_test.go | 2 +- pkg/camo/proxy_timeout_test.go | 4 +- pkg/htrie/glob_path_chk.go | 3 +- pkg/htrie/htrie.go | 47 ++++++++++----- pkg/htrie/htrie_test.go | 102 ++++++++++++++++++++------------- pkg/router/httpdate_test.go | 8 +++ 11 files changed, 206 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index adc1e652..a1daac5f 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,7 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD +* fix htrie matching of non punycode (eg. unicode) idna hostnames == v2.4.4 - 2023-07-25 * update dependencies diff --git a/Makefile b/Makefile index 60132d3e..157f4660 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ VERSION_VAR := main.ServerVersion # flags and build configuration GOBUILD_OPTIONS := -trimpath GOTEST_FLAGS := -cpu=1,2 +GOTEST_BENCHFLAGS := GOBUILD_DEPFLAGS := -tags netgo GOBUILD_LDFLAGS ?= -s -w GOBUILD_FLAGS := ${GOBUILD_DEPFLAGS} ${GOBUILD_OPTIONS} -ldflags "${GOBUILD_LDFLAGS} -X ${VERSION_VAR}=${APP_VER}" @@ -83,6 +84,10 @@ test: setup @echo "Running tests..." @go test -count=1 -vet=off ${GOTEST_FLAGS} ./... +bench: setup + @echo "Running benchmarks..." + @go test -bench="." -run="^$$" -test.benchmem=true ${GOTEST_BENCHFLAGS} ./... + cover: setup @echo "Running tests with coverage..." @go test -vet=off -cover ${GOTEST_FLAGS} ./... diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 77d0953c..2feafcdb 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -81,7 +81,7 @@ func loadFilterList(fname string) ([]camo.FilterFunc, error) { scanner := bufio.NewScanner(file) for scanner.Scan() { - line := scanner.Text() + line := strings.TrimSpace(scanner.Text()) if strings.HasPrefix(line, "allow|") { line = strings.TrimPrefix(line, "allow") @@ -118,17 +118,28 @@ func loadFilterList(fname string) ([]camo.FilterFunc, error) { filterFuncs = append(filterFuncs, allowFilter.CheckURL) } - // denyFilter returns true on a match. we want a "false" value to abort processing. + // denyFilter returns true on a match. we want to invert this for a deny rule, so + // any deny rule match should return true, and anything _not_ matching should return false // so just wrap and invert the bool. if hasDeny { - denyF := func(u *url.URL) bool { - return !denyFilter.CheckURL(u) + denyF := func(u *url.URL) (bool, error) { + chk, err := denyFilter.CheckURL(u) + return !chk, err } filterFuncs = append(filterFuncs, denyF) } if hasAllow && hasDeny { - mlog.Printf("Warning! Allow and Deny rules both supplied. Having Allow rules means anything not matching an allow rule is denied. THEN deny rules are evaluated. Be sure this is what you want!") + mlog.Print( + strings.Join( + []string{ + "Warning! Allow and Deny rules both supplied.", + "Having Allow rules means anything not matching an allow rule is denied.", + "THEN deny rules are evaluated. Be sure this is what you want!", + }, + " ", + ), + ) } return filterFuncs, nil diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index dd1bbe4c..51a66446 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -58,7 +58,7 @@ type Config struct { // The FilterFunc type is a function that validates a *url.URL // A true value approves the url. A false value rejects the url. -type FilterFunc func(*url.URL) bool +type FilterFunc func(*url.URL) (bool, error) // A Proxy is a Camo like HTTP proxy, that provides content type // restrictions as well as regex host allow list support. @@ -395,11 +395,24 @@ func (p *Proxy) checkURL(reqURL *url.URL) error { return errors.New("Bad url scheme") } + uHostname := reqURL.Hostname() + // reject empy hostnames + if uHostname == "" { + return errors.New("Bad url host") + } + + // ensure valid idna lookup mapping for hostname + // this is also used by htrie filtering (localsFilter and p.filters) + cleanHostname, err := htrie.CleanHostname(uHostname) + if err != nil { + mlog.Infof("Filter lookup rejected: malformed hostname: %s", uHostname) + return errors.New("Bad url host") + } + // reject localhost urls - // lower case for matching is done by CheckHostname, so no need to + // lower case for matching is done by IdnaLookupMap above, so no need to // ToLower here also - uHostname := reqURL.Hostname() - if uHostname == "" || localsFilter.CheckHostname(uHostname) { + if localsFilter.CheckCleanHostname(cleanHostname) { return errors.New("Bad url host") } @@ -408,9 +421,9 @@ func (p *Proxy) checkURL(reqURL *url.URL) error { return errors.New("Userinfo URL rejected") } - // evaluate filters. first false value "fails" + // evaluate filters. first false (or filter error) value "fails" for i := 0; i < p.filtersLen; i++ { - if !p.filters[i](reqURL) { + if chk, err := p.filters[i](reqURL); err != nil || !chk { return errors.New("Rejected due to filter-ruleset") } } diff --git a/pkg/camo/proxy_filter_test.go b/pkg/camo/proxy_filter_test.go index cdcf48fd..bfe493e2 100644 --- a/pkg/camo/proxy_filter_test.go +++ b/pkg/camo/proxy_filter_test.go @@ -18,9 +18,9 @@ func TestFilterListAcceptSimple(t *testing.T) { called := false filters := []FilterFunc{ - func(*url.URL) bool { + func(*url.URL) (bool, error) { called = true - return true + return true, nil }, } testURL := "http://www.google.com/images/srpr/logo11w.png" @@ -31,43 +31,89 @@ func TestFilterListAcceptSimple(t *testing.T) { assert.Check(t, called, "filter func wasn't called") } +func TestFilterListAcceptSimpleWithFilterError(t *testing.T) { + t.Parallel() + + called := false + filters := []FilterFunc{ + func(*url.URL) (bool, error) { + called = true + return true, fmt.Errorf("bad hostname") + }, + } + testURL := "http://www.google.com/images/srpr/logo11w.png" + req, err := makeReq(camoConfig, testURL) + assert.Check(t, err) + _, err = processRequest(req, 404, camoConfig, filters) + assert.Check(t, err) + assert.Check(t, called, "filter func wasn't called") +} + func TestFilterListMatrixMultiples(t *testing.T) { t.Parallel() testURL := "http://www.google.com/images/srpr/logo11w.png" req, err := makeReq(camoConfig, testURL) assert.Check(t, err) + type chkResponse struct { + chk bool + err error + } var mixtests = []struct { - filterRuleAnswers []bool + filterRuleAnswers []chkResponse expectedCallMatrix []bool respcode int }{ // all rules return true, so all rules should have been called // so pass: http200 { - []bool{true, true, true}, + []chkResponse{{true, nil}, {true, nil}, {true, nil}}, []bool{true, true, true}, 200, }, + // 3rd rule should not be called, because 2nd returned false // so no pass: http404 { - []bool{true, false, true}, + []chkResponse{{true, nil}, {false, nil}, {true, nil}}, []bool{true, true, false}, 404, }, + // 3rd rule should not be called, because 2nd returned an error + // so no pass: http404 + { + []chkResponse{{true, nil}, {true, fmt.Errorf("some error")}, {true, nil}}, + []bool{true, true, false}, + 404, + }, + // 2nd, 3rd rules should not be called, because 1st returned false // so no pass: http404 { - []bool{false, false, true}, + []chkResponse{{false, nil}, {false, nil}, {true, nil}}, []bool{true, false, false}, 404, }, + // 2nd, 3rd rules should not be called, because 1st returned an error + // so no pass: http404 + { + []chkResponse{{true, fmt.Errorf("some error")}, {false, nil}, {true, nil}}, + []bool{true, false, false}, + 404, + }, + // last rule returns false, but all rules should be called. // so no pass: http404 { - []bool{true, true, false}, + []chkResponse{{true, nil}, {true, nil}, {false, nil}}, + []bool{true, true, true}, + 404, + }, + // last rule returns an error, but all rules should be called. + // so no pass: http404 + { + []chkResponse{{true, nil}, {true, nil}, {true, fmt.Errorf("some error")}}, []bool{true, true, true}, 404, }, @@ -78,10 +124,10 @@ func TestFilterListMatrixMultiples(t *testing.T) { filters := make([]FilterFunc, 0) for i := 0; i < 3; i++ { filters = append( - filters, func(x int) func(*url.URL) bool { - return func(*url.URL) bool { + filters, func(x int) FilterFunc { + return func(*url.URL) (bool, error) { callMatrix[x] = true - return tt.filterRuleAnswers[x] + return tt.filterRuleAnswers[x].chk, tt.filterRuleAnswers[x].err } }(i), ) diff --git a/pkg/camo/proxy_test.go b/pkg/camo/proxy_test.go index 5cd9a73e..ea57bcb7 100644 --- a/pkg/camo/proxy_test.go +++ b/pkg/camo/proxy_test.go @@ -221,7 +221,7 @@ func TestVideoContentTypeAllowed(t *testing.T) { // bump limit, try again (should succeed) camoConfigWithVideo.MaxSize = 5000 * 1024 _, err = makeTestReq(testURL, 200, camoConfigWithVideo) - fmt.Println(err) + //fmt.Println(err) assert.Check(t, err) } diff --git a/pkg/camo/proxy_timeout_test.go b/pkg/camo/proxy_timeout_test.go index 57c63d87..abe26c6f 100644 --- a/pkg/camo/proxy_timeout_test.go +++ b/pkg/camo/proxy_timeout_test.go @@ -132,7 +132,7 @@ func TestClientCancelEarly(t *testing.T) { assert.Check(t, err) conn.Close() time.Sleep(100 * time.Millisecond) - fmt.Printf("done\n") + //fmt.Printf("done\n") } func TestClientCancelLate(t *testing.T) { @@ -210,7 +210,7 @@ func TestClientCancelLate(t *testing.T) { } } conn.Close() - fmt.Printf("done\n") + //fmt.Printf("done\n") } func TestServerEarlyEOF(t *testing.T) { diff --git a/pkg/htrie/glob_path_chk.go b/pkg/htrie/glob_path_chk.go index 6293b49c..6178e68b 100644 --- a/pkg/htrie/glob_path_chk.go +++ b/pkg/htrie/glob_path_chk.go @@ -133,8 +133,9 @@ func (gpc *GlobPathChecker) AddRule(rule string) error { // CheckPath checks the supplied path (as a string). // Note: CheckPathString requires that the url path component is already escaped, -// in a similar way to `(*url.URL).EscapePath()`, as well as TrimSpace'd. +// in a similar way to `(*url.URL).EscapePath()`. func (gpc *GlobPathChecker) CheckPath(url string) bool { + url = strings.TrimSpace(url) ulen := len(url) // if we have a case sensitive checker, check that one first diff --git a/pkg/htrie/htrie.go b/pkg/htrie/htrie.go index 5a629368..ccca0485 100644 --- a/pkg/htrie/htrie.go +++ b/pkg/htrie/htrie.go @@ -68,6 +68,10 @@ func uniformLower(s, cutset string) string { return s } +func CleanHostname(s string) (string, error) { + return idna.Lookup.ToASCII(strings.ToLower(strings.TrimSpace(s))) +} + func (dt *URLMatcher) getOrNewSubTree(s string) *URLMatcher { subdt, ok := dt.subtrees[s] if !ok { @@ -266,41 +270,58 @@ func (dt *URLMatcher) walkFind(s string) []*URLMatcher { // CheckURL checks a *url.URL against the URLMatcher. // If the url matches (a "hit"), it returns true. // If the url does not match (a "miss"), it return false. -func (dt *URLMatcher) CheckURL(u *url.URL) bool { +func (dt *URLMatcher) CheckURL(u *url.URL) (bool, error) { // alas, (*url.URL).Hostname() does not ToLower - hostname := strings.ToLower(u.Hostname()) + // so lower and idna map + hostname, err := CleanHostname(u.Hostname()) + if err != nil { + // invalid idna is a fail/false + return false, fmt.Errorf("bad hostname: %w", err) + } + matches := dt.walkFind(hostname) defer putURLMatcherSlice(&matches) // check for base domain matches first, to avoid path checking if possible for _, match := range matches { + // we can shortcut lookups only if the match has no associated url rules if !match.hasRules { - return true + return true, nil } } // no luck, so try path rules this time for _, match := range matches { // anything match.hasRules _shouldn't_ be nil, so this check is - // likely superfluous... + // likely superfluous... but retained for extra safety in case + // the api changes at some point if match.pathChecker == nil { continue } if match.pathChecker.CheckPath(u.EscapedPath()) { - return true + return true, nil } } - return false + return false, nil } // CheckHostname checks the supplied hostname (as a string). -// Note: CheckHostname requires that the hostname is already escaped, -// sanitized, space trimmed, and lowercased... -// Basically sanitized in a way similar to: -// -// strings.ToLower((*url.URL).Hostname()) -func (dt *URLMatcher) CheckHostname(hostname string) bool { - hostname = strings.ToLower(hostname) +// Returns an error if the hostname is not idna lookup compliant. +func (dt *URLMatcher) CheckHostname(hostname string) (bool, error) { + // do idna lookup mapping. if mapping fails, return false + hostname, err := CleanHostname(hostname) + if err != nil { + // invalid idna is a fail/false + return false, fmt.Errorf("bad hostname: %w", err) + } + + return dt.CheckCleanHostname(hostname), nil +} + +// CheckHostnameClean checks the supplied hostname (as a string). +// The supplied hostname must already be safe/cleaned, in a way +// similar to IdnaLookupMap. +func (dt *URLMatcher) CheckCleanHostname(hostname string) bool { matches := dt.walkFind(hostname) defer putURLMatcherSlice(&matches) return len(matches) > 0 diff --git a/pkg/htrie/htrie_test.go b/pkg/htrie/htrie_test.go index 01ae6a2c..c3357f25 100644 --- a/pkg/htrie/htrie_test.go +++ b/pkg/htrie/htrie_test.go @@ -8,6 +8,7 @@ import ( "fmt" "net/url" "regexp" + "strings" "testing" "gotest.tools/v3/assert" @@ -23,6 +24,7 @@ func TestHTrieCheckURL(t *testing.T) { "||foo.example.net||/", "||bar.example.net|i|*/test.png", "||bar.example.net|i|*/test.png.extra", + "||bücher.example.net||", } testMatch := []string{ @@ -33,6 +35,8 @@ func TestHTrieCheckURL(t *testing.T) { "http://foo.example.net/", "http://bar.example.net/foo/test.png", "http://bar.example.net/foo/test.png.extra", + "http://bücher.example.net/", + "http://xn--bcher-kva.example.net/", } testNoMatch := []string{ @@ -41,6 +45,7 @@ func TestHTrieCheckURL(t *testing.T) { "http://foo.example.net/nope", "http://bar.example.org/foo/testx.png", "http://bar.example.net/foo/test.png.ex", + "http://bücher.example.com/", } dt := NewURLMatcher() @@ -53,20 +58,31 @@ func TestHTrieCheckURL(t *testing.T) { for _, u := range testMatch { u, _ := url.Parse(u) - assert.Check(t, dt.CheckURL(u), fmt.Sprintf("should have matched: %s", u)) + chk, err := dt.CheckURL(u) + assert.NilError(t, err) + assert.Check(t, chk, fmt.Sprintf("should have matched: %s", urlPathUnescape(u))) } for _, u := range testNoMatch { u, _ := url.Parse(u) - assert.Check(t, !dt.CheckURL(u), fmt.Sprintf("should not have matched: %s", u)) + chk, err := dt.CheckURL(u) + assert.NilError(t, err) + assert.Check(t, !chk, fmt.Sprintf("should not have matched: %s", urlPathUnescape(u))) } } +func urlPathUnescape(u *url.URL) string { + s := u.String() + p, _ := url.PathUnescape(s) + return p +} + func TestHTrieCheckHostname(t *testing.T) { t.Parallel() rules := []string{ "|s|localhost||", "|s|localdomain||", + "||bücher.example.net||", } testMatch := []string{ @@ -76,6 +92,8 @@ func TestHTrieCheckHostname(t *testing.T) { "http://localdomain/foo/TEST.png", "http://foo.localdomain/foo/test.png", "http://bar.foo.localdomain/foo/test.png", + "http://bücher.example.net/", + "http://xn--bcher-kva.example.net/", } testNoMatch := []string{ @@ -84,6 +102,7 @@ func TestHTrieCheckHostname(t *testing.T) { "http://foo.example.net/nope", "http://bar.example.org/foo/testx.png", "http://bar.example.net/foo/test.png.ex", + "http://bücher.example.com/", } dt := NewURLMatcher() @@ -98,11 +117,15 @@ func TestHTrieCheckHostname(t *testing.T) { for _, u := range testMatch { u, _ := url.Parse(u) - assert.Check(t, dt.CheckHostname(u.Hostname()), fmt.Sprintf("should have matched: %s", u)) + result, err := dt.CheckHostname(u.Hostname()) + assert.NilError(t, err) + assert.Check(t, result, fmt.Sprintf("should have matched: %s", urlPathUnescape(u))) } for _, u := range testNoMatch { u, _ := url.Parse(u) - assert.Check(t, !dt.CheckHostname(u.Hostname()), fmt.Sprintf("should not have matched: %s", u)) + result, err := dt.CheckHostname(u.Hostname()) + assert.NilError(t, err) + assert.Check(t, !result, fmt.Sprintf("should not have matched: %s", urlPathUnescape(u))) } } @@ -146,6 +169,16 @@ func BenchmarkRegexCreate(b *testing.B) { _ = err } +var urlMatchTestURLs = []string{ + "http://example.com/foo/test.png", + "http://bar.example.com/foo/test.png", + "http://bar.example.com/foo/testx.png", + "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/test.png", + "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", + // this one kills the regex pretty bad. :( + "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", +} + func BenchmarkHTrieMatch(b *testing.B) { rules := []string{ "||foo.example.net||/test.png", @@ -156,16 +189,6 @@ func BenchmarkHTrieMatch(b *testing.B) { "|s|example.org|i|*/test.png", } - testURLs := []string{ - "http://example.com/foo/test.png", - "http://bar.example.com/foo/test.png", - "http://bar.example.com/foo/testx.png", - "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/test.png", - "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", - // this one kills the regex pretty bad. - "bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", - } - testIters := 10000 dt := NewURLMatcher() @@ -175,7 +198,7 @@ func BenchmarkHTrieMatch(b *testing.B) { } parsed := make([]*url.URL, 0) - for _, u := range testURLs { + for _, u := range urlMatchTestURLs { u, _ := url.Parse(u) parsed = append(parsed, u) } @@ -186,7 +209,7 @@ func BenchmarkHTrieMatch(b *testing.B) { for _, u := range parsed { for i := 0; i < testIters; i++ { - x = dt.CheckURL(u) + x, _ = dt.CheckURL(u) } } _ = x @@ -203,16 +226,6 @@ func BenchmarkRegexMatch(b *testing.B) { `^(.*\.)?example.org/(?:i.*/test.png)`, } - testURLs := []string{ - "example.com/foo/test.png", - "bar.example.com/foo/test.png", - "bar.example.com/foo/testx.png", - "bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/test.png", - "bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", - // this one kills the regex pretty bad. :( - //"bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", - } - testIters := 10000 rexes := make([]*regexp.Regexp, 0) @@ -221,11 +234,17 @@ func BenchmarkRegexMatch(b *testing.B) { rexes = append(rexes, rx) } + // strip protocol prefix to make regex matches easier + testUrls := make([]string, len(urlMatchTestURLs)) + for _, u := range urlMatchTestURLs { + testUrls = append(testUrls, strings.TrimPrefix(u, "http://")) + } + // avoid inlining optimization var x bool b.ResetTimer() - for _, u := range testURLs { + for _, u := range testUrls { for i := 0; i < testIters; i++ { // walk regexes in order. first match wins for _, rx := range rexes { @@ -249,14 +268,6 @@ func BenchmarkHTrieMatchHostname(b *testing.B) { "|s|example.org|i|*/test.png", } - testURLs := []string{ - "http://example.com/foo/test.png", - "http://bar.example.com/foo/test.png", - "http://bar.example.com/foo/testx.png", - "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/test.png", - "http://bar.example.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/testx.png", - } - testIters := 10000 dt := NewURLMatcher() @@ -266,7 +277,7 @@ func BenchmarkHTrieMatchHostname(b *testing.B) { } parsed := make([]string, 0) - for _, u := range testURLs { + for _, u := range urlMatchTestURLs { u, _ := url.Parse(u) parsed = append(parsed, u.Hostname()) } @@ -275,10 +286,21 @@ func BenchmarkHTrieMatchHostname(b *testing.B) { var x bool b.ResetTimer() - for _, u := range parsed { - for i := 0; i < testIters; i++ { - x = dt.CheckHostname(u) + b.Run("CheckHostname", func(b *testing.B) { + for _, u := range parsed { + for i := 0; i < testIters; i++ { + x, _ = dt.CheckHostname(u) + } } - } + }) + + b.Run("CheckCleanHostname", func(b *testing.B) { + for _, u := range parsed { + for i := 0; i < testIters; i++ { + x = dt.CheckCleanHostname(u) + } + } + }) + _ = x } diff --git a/pkg/router/httpdate_test.go b/pkg/router/httpdate_test.go index b41df652..ccb863c1 100644 --- a/pkg/router/httpdate_test.go +++ b/pkg/router/httpdate_test.go @@ -5,12 +5,20 @@ package router import ( + "bytes" "testing" "time" + "github.com/cactus/mlog" "gotest.tools/v3/assert" ) +var logBuffer = &bytes.Buffer{} + +func init() { + mlog.DefaultLogger = mlog.New(logBuffer, mlog.Lstd) +} + func TestHTTPDateGoroutineUpdate(t *testing.T) { t.Parallel() d := newiHTTPDate() From f78960e55923338d878f8b26feea10e0a46c3fbb Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 19 Aug 2023 19:35:26 -0700 Subject: [PATCH 022/128] update dep --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c2d6301d..1444aa4a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/cactus/go-camo/v2 go 1.19 require ( - github.com/cactus/mlog v1.0.5 + github.com/cactus/mlog v1.0.6 github.com/jessevdk/go-flags v1.5.0 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 diff --git a/go.sum b/go.sum index 1d914d99..2f6d61f1 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cactus/mlog v1.0.5 h1:TjaBRUD0ToZMTzv30SRfwDJfvz3IxDUxcw1dNk6dKAQ= github.com/cactus/mlog v1.0.5/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= +github.com/cactus/mlog v1.0.6 h1:e119rK5LhOyV/mER2Jx7T0QNT314kyziCSokiiTrq0o= +github.com/cactus/mlog v1.0.6/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= github.com/cactus/tai64 v1.0.2 h1:c5rm3aQ9z3b6Vva2LXRSICx/Rpu9rj4MHEzRG1g7dK0= github.com/cactus/tai64 v1.0.2/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= From d2fc69d977388e22b1ee198dde066d4e3edf0eef Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 20 Aug 2023 13:24:48 -0700 Subject: [PATCH 023/128] update makefile list target --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 157f4660..88dcf9fc 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,7 @@ Available targets: check run checks and validators test run tests cover run tests with cover output + bench run benchmarks build build all binaries man build all man pages tar build release tarball @@ -45,7 +46,7 @@ Available targets: endef export HELP_OUTPUT -.PHONY: help clean build test cover man man-copy all tar cross-tar setup-check setup-gox +.PHONY: help clean build test cover bench man man-copy all tar cross-tar setup-check setup-gox help: @echo "$$HELP_OUTPUT" From cd940a9301fc9f875e52128af429a7bf47f11bc8 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 24 Aug 2023 12:55:33 -0700 Subject: [PATCH 024/128] logging refactor drop some of the examples, as the hex examples are not much different than the base64 examples, and are easy to extrapolate. --- CHANGELOG.adoc | 3 ++ README.adoc | 2 +- examples/go-base64.go | 1 + examples/go-hex.go | 34 ---------------------- examples/python-base64.py | 25 ---------------- examples/python-hex.py | 22 -------------- examples/python3-base64-filtering.py | 11 +++++-- examples/python3-base64.py | 43 ++++++++++++++++++++++++++++ examples/ruby-hex.rb | 19 ------------ go.mod | 2 +- go.sum | 6 ++-- man/go-camo.1.adoc | 5 ++-- pkg/camo/helpers_test.go | 1 - pkg/camo/log.go | 2 +- pkg/camo/proxy.go | 39 +++++++++++++------------ pkg/camo/proxy_timeout_test.go | 4 +-- pkg/router/httpdate_test.go | 23 ++++++++++++--- 17 files changed, 104 insertions(+), 138 deletions(-) delete mode 100644 examples/go-hex.go delete mode 100644 examples/python-base64.py delete mode 100644 examples/python-hex.py create mode 100644 examples/python3-base64.py delete mode 100644 examples/ruby-hex.rb diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index a1daac5f..f2807efb 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,9 @@ toc::[] == HEAD * fix htrie matching of non punycode (eg. unicode) idna hostnames +* slightly faster logging (update to mlog dependency) +* address a logging issue with missing url path output in + `"built outgoing request"` debug log == v2.4.4 - 2023-07-25 * update dependencies diff --git a/README.adoc b/README.adoc index ea98e565..82926533 100644 --- a/README.adoc +++ b/README.adoc @@ -293,8 +293,8 @@ Application Options: -H, --header= Add additional header to each response. This option can be used multiple times to add multiple headers --listen= Address:Port to bind to for HTTP (default: 0.0.0.0:8080) - --socket-listen= Path for unix domain socket to bind to for HTTP --ssl-listen= Address:Port to bind to for HTTPS/SSL/TLS + --socket-listen= Path for unix domain socket to bind to for HTTP --ssl-key= ssl private key (key.pem) path --ssl-cert= ssl cert (cert.pem) path --max-size= Max allowed response size (KB) diff --git a/examples/go-base64.go b/examples/go-base64.go index 71ae8276..2f996b0d 100644 --- a/examples/go-base64.go +++ b/examples/go-base64.go @@ -2,6 +2,7 @@ // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +//go:build ignore // +build ignore package main diff --git a/examples/go-hex.go b/examples/go-hex.go deleted file mode 100644 index 3812b242..00000000 --- a/examples/go-hex.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012-2019 Eli Janssen -// Use of this source code is governed by an MIT-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -import ( - "crypto/hmac" - "crypto/sha1" - "encoding/hex" - "fmt" - "strings" -) - -var CAMO_HOST = "https://img.example.com" - -func GenCamoUrl(hmacKey []byte, srcUrl string) string { - if strings.HasPrefix(srcUrl, "https:") { - return srcUrl - } - oBytes := []byte(srcUrl) - mac := hmac.New(sha1.New, hmacKey) - mac.Write(oBytes) - macSum := hex.EncodeToString(mac.Sum(nil)) - encodedUrl := hex.EncodeToString(oBytes) - hexurl := CAMO_HOST + "/" + macSum + "/" + encodedUrl - return hexurl -} - -func main() { - fmt.Println(GenCamoUrl([]byte("test"), "http://golang.org/doc/gopher/frontpage.png")) -} diff --git a/examples/python-base64.py b/examples/python-base64.py deleted file mode 100644 index 8739b045..00000000 --- a/examples/python-base64.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2012-2019 Eli Janssen -# Use of this source code is governed by an MIT-style -# license that can be found in the LICENSE file. - -import hashlib -import hmac -import base64 - - -CAMO_HOST = 'https://img.example.com' - - -def camo_url(hmac_key, image_url): - if image_url.startswith("https:"): - return image_url - b64digest = base64.urlsafe_b64encode( - hmac.new(hmac_key, image_url, hashlib.sha1).digest()).strip('=') - b64url = base64.urlsafe_b64encode(image_url).strip('=') - requrl = '%s/%s/%s' % (CAMO_HOST, b64digest, b64url) - return requrl - - -print camo_url("test", "http://golang.org/doc/gopher/frontpage.png") -# 'https://img.example.org/D23vHLFHsOhPOcvdxeoQyAJTpvM/aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n' - diff --git a/examples/python-hex.py b/examples/python-hex.py deleted file mode 100644 index f5d84b5d..00000000 --- a/examples/python-hex.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2012-2019 Eli Janssen -# Use of this source code is governed by an MIT-style -# license that can be found in the LICENSE file. - -import hashlib -import hmac - - -CAMO_HOST = 'https://img.example.com' - - -def camo_url(hmac_key, image_url): - if image_url.startswith("https:"): - return image_url - hexdigest = hmac.new(hmac_key, image_url, hashlib.sha1).hexdigest() - hexurl = image_url.encode('hex') - requrl = '%s/%s/%s' % (CAMO_HOST, hexdigest, hexurl) - return requrl - - -print camo_url("test", "http://golang.org/doc/gopher/frontpage.png") -# 'https://img.example.org/0f6def1cb147b0e84f39cbddc5ea10c80253a6f3/687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67' diff --git a/examples/python3-base64-filtering.py b/examples/python3-base64-filtering.py index 28ded526..ee7fbaab 100644 --- a/examples/python3-base64-filtering.py +++ b/examples/python3-base64-filtering.py @@ -15,6 +15,11 @@ CAMO_HOST = 'https://img.example.com' +def wrap_encode(data): + """A little helper method to wrap b64encoding""" + return base64.urlsafe_b64encode(data).strip(b'=').decode('utf-8') + + def camo_url(hmac_key, image_url): url = urlsplit(image_url) @@ -32,10 +37,10 @@ def camo_url(hmac_key, image_url): hmac_key = hmac_key.encode() if isinstance(hmac_key, str) else hmac_key image_url = image_url.encode() if isinstance(image_url, str) else image_url - b64digest = base64.urlsafe_b64encode( + b64digest = wrap_encode( hmac.new(hmac_key, image_url, hashlib.sha1).digest() - ).strip(b'=').decode('utf-8') - b64url = base64.urlsafe_b64encode(image_url).strip(b'=').decode('utf-8') + ) + b64url = wrap_encode(image_url) requrl = '%s/%s/%s' % (CAMO_HOST, b64digest, b64url) return requrl diff --git a/examples/python3-base64.py b/examples/python3-base64.py new file mode 100644 index 00000000..f3eb063d --- /dev/null +++ b/examples/python3-base64.py @@ -0,0 +1,43 @@ +# Copyright (c) 2012-2019 Eli Janssen +# Use of this source code is governed by an MIT-style +# license that can be found in the LICENSE file. + +import hashlib +import hmac +import base64 + + +CAMO_HOST = 'https://img.example.com' + + +def wrap_encode(data): + """A little helper method to wrap b64encoding""" + return base64.urlsafe_b64encode(data).strip(b'=').decode('utf-8') + + +def camo_url(hmac_key, image_url): + if image_url.startswith("https:"): + return image_url + + hmac_key = hmac_key.encode() if isinstance(hmac_key, str) else hmac_key + image_url = image_url.encode() if isinstance(image_url, str) else image_url + + # setup the hmac construction + mac = hmac.new(hmac_key, digestmod=hashlib.sha1) + # add image_url + mac.update(image_url) + + # generate digest + digest = mac.digest() + + ## now build url + b64digest = wrap_encode(digest) + b64url = wrap_encode(image_url) + requrl = '%s/%s/%s' % (CAMO_HOST, b64digest, b64url) + return requrl + + +print( + camo_url("test", "http://golang.org/doc/gopher/frontpage.png") +) +# https://img.example.org/D23vHLFHsOhPOcvdxeoQyAJTpvM/aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n \ No newline at end of file diff --git a/examples/ruby-hex.rb b/examples/ruby-hex.rb deleted file mode 100644 index abc775d2..00000000 --- a/examples/ruby-hex.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2012-2019 Eli Janssen -# Use of this source code is governed by an MIT-style -# license that can be found in the LICENSE file. - -require "openssl" - -CAMO_HOST = "https://img.example.com" - -def camo_url(hmac_key, image_url) - if image_url.start_with?("https:") - return image_url - end - hexdigest = OpenSSL::HMAC.hexdigest("sha1", hmac_key, image_url) - hexurl = image_url.unpack("U*").collect{|x| x.to_s(16)}.join - return "#{CAMO_HOST}/#{hexdigest}/#{hexurl}" -end - -puts camo_url("test", "http://golang.org/doc/gopher/frontpage.png") -# 'https://img.example.org/0f6def1cb147b0e84f39cbddc5ea10c80253a6f3/687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67' diff --git a/go.mod b/go.mod index 1444aa4a..bbc24527 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/cactus/go-camo/v2 go 1.19 require ( - github.com/cactus/mlog v1.0.6 + github.com/cactus/mlog v1.0.9 github.com/jessevdk/go-flags v1.5.0 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 diff --git a/go.sum b/go.sum index 2f6d61f1..5b176e70 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cactus/mlog v1.0.5 h1:TjaBRUD0ToZMTzv30SRfwDJfvz3IxDUxcw1dNk6dKAQ= -github.com/cactus/mlog v1.0.5/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= -github.com/cactus/mlog v1.0.6 h1:e119rK5LhOyV/mER2Jx7T0QNT314kyziCSokiiTrq0o= -github.com/cactus/mlog v1.0.6/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= +github.com/cactus/mlog v1.0.9 h1:34fiSfH7Ds9N50fXP2/c5xNvp1mZBZZCda9GJ1+fwxE= +github.com/cactus/mlog v1.0.9/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= github.com/cactus/tai64 v1.0.2 h1:c5rm3aQ9z3b6Vva2LXRSICx/Rpu9rj4MHEzRG1g7dK0= github.com/cactus/tai64 v1.0.2/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= diff --git a/man/go-camo.1.adoc b/man/go-camo.1.adoc index d447ba65..2057bd5d 100644 --- a/man/go-camo.1.adoc +++ b/man/go-camo.1.adoc @@ -64,8 +64,9 @@ For exmaple, if the HMAC key is provided on the command line, it will override *-H*, *--header*=<__HEADER__>:: + -- -Extra header to return for each response. This option can be used -multiple times to add multiple headers. +Add additional header to each response. +This option can be used multiple times to add multiple headers. +When specified, these headers are set unconditionally on all responses. See __<>__ for more info. -- diff --git a/pkg/camo/helpers_test.go b/pkg/camo/helpers_test.go index 0fd5c00d..7caec2a0 100644 --- a/pkg/camo/helpers_test.go +++ b/pkg/camo/helpers_test.go @@ -84,7 +84,6 @@ func bodyAssert(t *testing.T, expected string, resp *http.Response) { func headerAssert(t *testing.T, expected, name string, resp *http.Response) { assert.Check(t, is.Equal(expected, resp.Header.Get(name)), "Expected response header mismatch") - } func statusCodeAssert(t *testing.T, expected int, resp *http.Response) { diff --git a/pkg/camo/log.go b/pkg/camo/log.go index be632262..31ac7f5a 100644 --- a/pkg/camo/log.go +++ b/pkg/camo/log.go @@ -15,7 +15,7 @@ import ( func httpReqToMlogMap(req *http.Request) mlog.Map { return mlog.Map{ "method": req.Method, - "path": req.RequestURI, + "path": req.URL.Path, "proto": req.Proto, "header": req.Header, "content_length": req.ContentLength, diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index 51a66446..e4646000 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -92,6 +92,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { http.Error(w, "Malformed request path", http.StatusNotFound) return } + sigHash, encodedURL := components[1], components[2] if mlog.HasDebug() { @@ -105,13 +106,13 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { } if mlog.HasDebug() { - mlog.Debugm("signed client url", mlog.Map{"url": sURL}) + mlog.Debugx("signed client url", mlog.A("url", sURL)) } u, err := url.Parse(sURL) if err != nil { if mlog.HasDebug() { - mlog.Debugm("url parse error", mlog.Map{"err": err}) + mlog.Debugx("url parse error", mlog.A("err", err)) } http.Error(w, "Bad url", http.StatusBadRequest) return @@ -126,7 +127,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { nreq, err := http.NewRequestWithContext(req.Context(), req.Method, sURL, nil) if err != nil { if mlog.HasDebug() { - mlog.Debugm("could not create NewRequest", mlog.Map{"err": err}) + mlog.Debugx("could not create NewRequest", mlog.A("err", err)) } http.Error(w, "Error Fetching Resource", http.StatusBadGateway) return @@ -161,7 +162,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { nreq.Header.Add("Via", p.config.ServerName) if mlog.HasDebug() { - mlog.Debugm("built outgoing request", mlog.Map{"req": httpReqToMlogMap(nreq)}) + mlog.Debugm("built outgoing request", httpReqToMlogMap(nreq)) } resp, err := p.client.Do(nreq) @@ -187,28 +188,28 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { case errors.Is(err, ErrRedirect): // Got a bad redirect if mlog.HasDebug() { - mlog.Debugm("bad redirect from server", mlog.Map{"err": err}) + mlog.Debugx("bad redirect from server", mlog.A("err", err)) } http.Error(w, "Error Fetching Resource", http.StatusNotFound) return case errors.Is(err, ErrRejectIP): // Got a deny list failure from Dial.Control if mlog.HasDebug() { - mlog.Debugm("ip filter rejection from dial.control", mlog.Map{"err": err}) + mlog.Debugx("ip filter rejection from dial.control", mlog.A("err", err)) } http.Error(w, "Error Fetching Resource", http.StatusNotFound) return case errors.Is(err, ErrInvalidHostPort): // Got a deny list failure from Dial.Control if mlog.HasDebug() { - mlog.Debugm("invalid host/port rejection from dial.control", mlog.Map{"err": err}) + mlog.Debugx("invalid host/port rejection from dial.control", mlog.A("err", err)) } http.Error(w, "Error Fetching Resource", http.StatusNotFound) return case errors.Is(err, ErrInvalidNetType): // Got a deny list failure from Dial.Control if mlog.HasDebug() { - mlog.Debugm("net type rejection from dial.control", mlog.Map{"err": err}) + mlog.Debugx("net type rejection from dial.control", mlog.A("err", err)) } http.Error(w, "Error Fetching Resource", http.StatusNotFound) return @@ -216,7 +217,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { // handle other errors if mlog.HasDebug() { - mlog.Debugm("could not connect to endpoint", mlog.Map{"err": err}) + mlog.Debugx("could not connect to endpoint", mlog.A("err", err)) } // this is a bit janky, but some of these errors don't support @@ -243,7 +244,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { contentLengthExceeded.Inc() } if mlog.HasDebug() { - mlog.Debugm("content length exceeded", mlog.Map{"url": sURL}) + mlog.Debugx("content length exceeded", mlog.A("url", sURL)) } http.Error(w, "Content length exceeded", http.StatusNotFound) return @@ -272,7 +273,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { mediatype, param, err := mime.ParseMediaType(contentType) if err != nil || !p.acceptTypesFilter.CheckPath(mediatype) { if mlog.HasDebug() { - mlog.Debugm("Unsupported content-type returned", mlog.Map{"type": u}) + mlog.Debugx("Unsupported content-type returned", mlog.A("type", u)) } http.Error(w, "Unsupported content-type returned", http.StatusBadRequest) return @@ -346,7 +347,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { if err == context.Canceled || errors.Is(err, context.Canceled) { // client aborted/closed request, which is why copy failed to finish if mlog.HasDebug() { - mlog.Debugm("client aborted request (late)", mlog.Map{"req": req}) + mlog.Debugx("client aborted request (late)", mlog.A("req", req)) } return } @@ -354,7 +355,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { // got an early EOF from the server side if errors.Is(err, io.ErrUnexpectedEOF) { if mlog.HasDebug() { - mlog.Debugm("server sent unexpected EOF", mlog.Map{"req": req}) + mlog.Debugx("server sent unexpected EOF", mlog.A("req", req)) } return } @@ -362,13 +363,13 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { // only log broken pipe errors at debug level if isBrokenPipe(err) { if mlog.HasDebug() { - mlog.Debugm("error writing response", mlog.Map{"err": err, "req": req}) + mlog.Debugx("error writing response", mlog.A("err", err), mlog.A("req", req)) } return } // unknown error (not: a broken pipe; server early EOF; client close) - mlog.Printm("error writing response", mlog.Map{"err": err, "req": req}) + mlog.Printx("error writing response", mlog.A("err", err), mlog.A("req", req)) return } @@ -377,13 +378,13 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { responseTruncated.Inc() } if mlog.HasDebug() { - mlog.Debugm("response to client truncated: size > MaxSize", mlog.Map{"req": req}) + mlog.Debugx("response to client truncated: size > MaxSize", mlog.A("req", req)) } return } if mlog.HasDebug() { - mlog.Debugm("response to client", mlog.Map{"resp": w}) + mlog.Debugx("response to client", mlog.A("headers", h), mlog.A("status", resp.StatusCode)) } } @@ -591,14 +592,14 @@ func New(pc Config) (*Proxy, error) { client.CheckRedirect = func(req *http.Request, via []*http.Request) error { if len(via) >= pc.MaxRedirects { if mlog.HasDebug() { - mlog.Debug("Got bad redirect: Too many redirects", mlog.Map{"url": req}) + mlog.Debugx("Got bad redirect: Too many redirects", mlog.A("url", req)) } return fmt.Errorf("Too many redirects: %w", ErrRedirect) } err := p.checkURL(req.URL) if err != nil { if mlog.HasDebug() { - mlog.Debugm("Got bad redirect", mlog.Map{"url": req}) + mlog.Debugx("Got bad redirect", mlog.A("url", req)) } return fmt.Errorf("Bad redirect: %w", ErrRedirect) } diff --git a/pkg/camo/proxy_timeout_test.go b/pkg/camo/proxy_timeout_test.go index abe26c6f..a24c3562 100644 --- a/pkg/camo/proxy_timeout_test.go +++ b/pkg/camo/proxy_timeout_test.go @@ -101,7 +101,7 @@ func TestClientCancelEarly(t *testing.T) { _, err := fmt.Fprintf(w, "Chunk #%d\n", i) // conn closed/broken pipe if err != nil { - mlog.Debugm("write error", mlog.Map{"err": err, "i": i}) + mlog.Debugx("write error", mlog.A("err", err), mlog.A("i", i)) break } flusher.Flush() // Trigger "chunked" encoding and send a chunk... @@ -156,7 +156,7 @@ func TestClientCancelLate(t *testing.T) { _, err := fmt.Fprintf(w, "Chunk #%d\n", i) // conn closed/broken pipe if err != nil { - mlog.Debugm("write error", mlog.Map{"err": err, "i": i}) + mlog.Debugx("write error", mlog.A("err", err), mlog.A("i", i)) break } flusher.Flush() // Trigger "chunked" encoding and send a chunk... diff --git a/pkg/router/httpdate_test.go b/pkg/router/httpdate_test.go index ccb863c1..e445cd8b 100644 --- a/pkg/router/httpdate_test.go +++ b/pkg/router/httpdate_test.go @@ -6,6 +6,8 @@ package router import ( "bytes" + "flag" + "os" "testing" "time" @@ -15,10 +17,6 @@ import ( var logBuffer = &bytes.Buffer{} -func init() { - mlog.DefaultLogger = mlog.New(logBuffer, mlog.Lstd) -} - func TestHTTPDateGoroutineUpdate(t *testing.T) { t.Parallel() d := newiHTTPDate() @@ -59,3 +57,20 @@ func BenchmarkDataString(b *testing.B) { } }) } + +func TestMain(m *testing.M) { + flag.Parse() + + debug := os.Getenv("DEBUG") + // now configure a standard logger + mlog.SetFlags(mlog.Lstd) + + if debug != "" { + mlog.SetFlags(mlog.Flags() | mlog.Ldebug) + mlog.Debug("debug logging enabled") + } + + mlog.DefaultLogger = mlog.New(logBuffer, mlog.Lstd) + + os.Exit(m.Run()) +} From 44507d1d33cac7aba2588fb8421b8ed90c44fe4e Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 27 Aug 2023 12:29:13 -0700 Subject: [PATCH 025/128] improve performance of hostname check processing reverse(strings.Split(..)) is slower (and allocates) than walking the the tree backwards, slicing as we go. --- .gitignore | 1 + CHANGELOG.adoc | 6 +++++- pkg/htrie/glob_path_node.go | 26 ++++++++++++++++++++++---- pkg/htrie/htrie.go | 30 ++++++++++++++++++++++++------ pkg/htrie/htrie_test.go | 4 ++++ 5 files changed, 56 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index c181b139..bfcb1f2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.vscode /build /config.json /diagrams diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index f2807efb..173264ac 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -20,8 +20,12 @@ toc::[] == HEAD * fix htrie matching of non punycode (eg. unicode) idna hostnames * slightly faster logging (update to mlog dependency) -* address a logging issue with missing url path output in +* address a logging issue with missing url path output in `"built outgoing request"` debug log +* moderate improve performance of hostname rule processing + (approx 12-30% in microbenchmarks) +* slight improvement in request path url processing + (approx 2-4% in microbenchmarks) == v2.4.4 - 2023-07-25 * update dependencies diff --git a/pkg/htrie/glob_path_node.go b/pkg/htrie/glob_path_node.go index 1a4b6e6b..e84a504a 100644 --- a/pkg/htrie/glob_path_node.go +++ b/pkg/htrie/glob_path_node.go @@ -27,18 +27,37 @@ type globPathNode struct { // // Since we would /want/ to use uint8 here, use uint32 instead // Ugly and wasteful, but quite a bit faster for now... + // + // Further, using a map of uint32 is also slightly faster than using + // a [][]uint list to hold indexes into another []uint8 list + // eg. SOA (Struct of Array) vs this AOS (Array of Struct) method. + // Go maps are pretty efficient, and these structs are pointers, + // which reduces some overhead. + // Note that as far as memory usage goes, SOA does come out ahead, + // but tree setup is a one-time startup cost, and we are willing to + // trade off some additional memory and/or slowness there + // for faster rules processing speed. + + // subtree of nodes subtrees map[uint32]*globPathNode // used to avoid map lookup when there is only one subtree candidate oneShot *globPathNode // char for this node nodeChar uint32 - // is this path component a glob + + // note: Using a bitmask instead of separate boolean slots, uses + // less memory, but we again make the tradeoff of slight increase + // in memory for slightly faster rules processing speed. + // A boolean check is faster than a bitcheck+equality check + + // whether this node is a glob node isGlob bool // determines whether a node can be a match even if it isn't a leaf node; // this becomes necessary due to the possibility of longer and shorter // paths overlapping canMatch bool - // optimization to avoid an extra map lookup on every char + // whether the node has a wildcard/glob descendent + // this is an optimization to avoid an extra map lookup on every char hasGlobChild bool // is this a case insensitive comparison tree? icase bool @@ -52,7 +71,6 @@ func (gpn *globPathNode) addPath(s string) error { curnode := gpn prevnode := curnode mlen := len(s) - //for _, part := range s { for i := 0; i < mlen; i++ { part := uint32(s[i]) @@ -248,7 +266,7 @@ func newGlobPathNode(icase bool) *globPathNode { // so a total possible of 85 chars, but spread out over 94 slots // since there are quite a few possible slots, let's use a map for now... // web searches say a map is faster in go above a certain size. benchmark later... - + // // for now, since realloc cost is paid at creation, and we want to RSS size // and since we only /really/ care about lookup costs, just start with 0 initial // map size and let it grow as needed diff --git a/pkg/htrie/htrie.go b/pkg/htrie/htrie.go index ccca0485..6b3eb80b 100644 --- a/pkg/htrie/htrie.go +++ b/pkg/htrie/htrie.go @@ -228,12 +228,30 @@ func (dt *URLMatcher) AddRule(rule string) error { func (dt *URLMatcher) walkFind(s string) []*URLMatcher { // hostname should already be lowercase. avoid work by not doing it. matches := *getURLMatcherSlice() - labels := reverse(strings.Split(s, ".")) - plen := len(labels) curnode := dt + slen := len(s) // kind of weird ordering, because the root node isn't part of the search - // space. - for i, label := range labels { + // space, but walk backwards slicing as we go because we want hostname + // components in reverse order. eg. foo.example.com -> [com example foo] + // note: doing this manually because it saves allocations vs strings.Split + // (and is a bit faster as well) + for i := slen - 1; i >= 0; i-- { + label := "" + atLabel := false + if s[i] == '.' { + label = s[i+1 : slen] + slen = i + atLabel = true + } + if i == 0 { + label = s[i:slen] + slen = i + atLabel = true + } + if !atLabel { + continue + } + if curnode.subtrees == nil || len(curnode.subtrees) == 0 { break } @@ -254,13 +272,13 @@ func (dt *URLMatcher) walkFind(s string) []*URLMatcher { // not at a domain terminus, and there is a wildcard label, // so add child to match (if exists) - if i < plen-1 && curnode.hasWildChild { + if i > 0 && curnode.hasWildChild { if x, ok := curnode.subtrees["*"]; ok { matches = append(matches, x) } } // hit the end, and we can match at this level - if i == plen-1 && curnode.canMatch { + if i == 0 && curnode.canMatch { matches = append(matches, curnode) } } diff --git a/pkg/htrie/htrie_test.go b/pkg/htrie/htrie_test.go index c3357f25..31e05e0e 100644 --- a/pkg/htrie/htrie_test.go +++ b/pkg/htrie/htrie_test.go @@ -134,6 +134,10 @@ func BenchmarkHTrieCreate(b *testing.B) { urls := []string{ "||*.example.com||*/test.png", "|s|example.org|i|*/test.png", + "||foo.example.net||/test.png", + "||bar.example.net||/test.png", + "||*.bar.example.net||/test.png", + "||*.hodor.example.net||/*/test.png", } var err error b.ResetTimer() From d5243bb5f9a96c2d7e0fcdcc6b8be7cc2ca8b561 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 30 Aug 2023 12:21:31 -0700 Subject: [PATCH 026/128] remove requirement for gox for makefile automated cross-compilation * replace with some makefile and shell scripting instead --- Makefile | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 88dcf9fc..b3f5a4b6 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ GOBUILD_LDFLAGS ?= -s -w GOBUILD_FLAGS := ${GOBUILD_DEPFLAGS} ${GOBUILD_OPTIONS} -ldflags "${GOBUILD_LDFLAGS} -X ${VERSION_VAR}=${APP_VER}" # cross compile defs +CC_BUILD_TARGETS = go-camo url-tool CC_BUILD_ARCHES = darwin/amd64 darwin/arm64 freebsd/amd64 linux/amd64 linux/arm64 windows/amd64 CC_OUTPUT_TPL := ${BUILDDIR}/bin/{{.Dir}}.{{.OS}}-{{.Arch}} @@ -46,7 +47,7 @@ Available targets: endef export HELP_OUTPUT -.PHONY: help clean build test cover bench man man-copy all tar cross-tar setup-check setup-gox +.PHONY: help clean build test cover bench man man-copy all tar cross-tar setup-check help: @echo "$$HELP_OUTPUT" @@ -67,11 +68,6 @@ ${GOPATH}/bin/gosec: ${GOPATH}/bin/govulncheck: go install golang.org/x/vuln/cmd/govulncheck@latest -setup-gox: $GOPATH/bin/gox - -$GOPATH/bin/gox: - go install github.com/mitchellh/gox@latest - build: setup @[ -d "${BUILDDIR}/bin" ] || mkdir -p "${BUILDDIR}/bin" @echo "Building..." @@ -128,30 +124,31 @@ tar: all @tar -C ${TARBUILDDIR} -czf ${TARBUILDDIR}/${APP_NAME}-${APP_VER}.${GOVER}.${OS}-${ARCH}.tar.gz ${APP_NAME}-${APP_VER} @rm -rf "${TARBUILDDIR}/${APP_NAME}-${APP_VER}" -cross-tar: man setup setup-gox +cross-tar: man setup @echo "Building (cross-compile: ${CC_BUILD_ARCHES})..." - @(for x in go-camo url-tool; do \ - echo "...$${x}..."; \ - env GOFLAGS="${GOBUILD_OPTIONS}" gox \ - -gocmd="go" \ - -output="${CC_OUTPUT_TPL}" \ - -osarch="${CC_BUILD_ARCHES}" \ - -ldflags "${GOBUILD_LDFLAGS} -X ${VERSION_VAR}=${APP_VER}" \ - ${GOBUILD_DEPFLAGS} ./cmd/$${x}; \ - echo; \ + @(for x in ${CC_BUILD_TARGETS}; do \ + for y in $(subst /,-,${CC_BUILD_ARCHES}); do \ + printf -- "--> %15s: %s\n" "$${y}" "$${x}"; \ + GOOS="$${y%%-*}"; \ + GOARCH="$${y##*-}"; \ + EXT=""; \ + if echo "$${y}" | grep -q 'windows-'; then EXT=".exe"; fi; \ + env GOOS=$${GOOS} GOARCH=$${GOARCH} go build ${GOBUILD_FLAGS} -o "${BUILDDIR}/bin/$${x}.$${GOOS}-$${GOARCH}$${EXT}" ./cmd/$${x}; \ + done; \ done) - @echo "...creating tar files..." + @echo "Creating tar archives..." @(for x in $(subst /,-,${CC_BUILD_ARCHES}); do \ - echo "making tar for ${APP_NAME}.$${x}"; \ + printf -- "--> %15s\n" "$${x}"; \ EXT=""; \ if echo "$${x}" | grep -q 'windows-'; then EXT=".exe"; fi; \ XDIR="${GOVER}.$${x}"; \ ODIR="${TARBUILDDIR}/$${XDIR}/${APP_NAME}-${APP_VER}"; \ mkdir -p "$${ODIR}/bin"; \ mkdir -p "$${ODIR}/man"; \ - cp ${BUILDDIR}/bin/${APP_NAME}.$${x}$${EXT} $${ODIR}/bin/${APP_NAME}$${EXT}; \ - cp ${BUILDDIR}/bin/url-tool.$${x}$${EXT} $${ODIR}/bin/url-tool$${EXT}; \ + for t in ${CC_BUILD_TARGETS}; do \ + cp ${BUILDDIR}/bin/$${t}.$${x}$${EXT} $${ODIR}/bin/$${t}$${EXT}; \ + done; \ cp ${BUILDDIR}/man/*.[1-9] $${ODIR}/man/; \ tar -C ${TARBUILDDIR}/$${XDIR} -czf ${TARBUILDDIR}/${APP_NAME}-${APP_VER}.$${XDIR}.tar.gz ${APP_NAME}-${APP_VER}; \ rm -rf "${TARBUILDDIR}/$${XDIR}/"; \ From 51fc263dd51c2baeb528f85dc5dda250223102c4 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 30 Aug 2023 13:00:14 -0700 Subject: [PATCH 027/128] update readme --- README.adoc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.adoc b/README.adoc index 82926533..5fc5c27e 100644 --- a/README.adoc +++ b/README.adoc @@ -15,7 +15,6 @@ endif::[] :link-hmac: https://en.wikipedia.org/wiki/HMAC[HMAC] :link-hsts: https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security[HSTS] :link-asciidoctor: https://asciidoctor.org[asciidoctor] -:link-gox: https://github.com/mitchellh/gox[gox] :link-damontools: https://cr.yp.to/daemontools.html[daemontools] :link-runit: https://en.wikipedia.org/wiki/Runit[runit] :link-upstart: https://en.wikipedia.org/wiki/Upstart_(software)[upstart] @@ -147,12 +146,9 @@ Building requires: * make * git * go (latest version recommended. At least version >= 1.13) +* posix compatible shell (sh) * {link-asciidoctor} (for building man pages only) -Additionally required, if cross compiling: - -* {link-gox} - Building: [source,text] From 4d65728288768aeaf34577a9bbe18072aa910af0 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 30 Aug 2023 13:18:10 -0700 Subject: [PATCH 028/128] readme formatting --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 5fc5c27e..aa74e6b7 100644 --- a/README.adoc +++ b/README.adoc @@ -144,9 +144,9 @@ Extract, and copy files to desired locations. Building requires: * make +* posix compatible shell (sh) * git * go (latest version recommended. At least version >= 1.13) -* posix compatible shell (sh) * {link-asciidoctor} (for building man pages only) Building: From 83ce19d761cb094fbc02fc75e610f7dabbedb401 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 22:54:23 +0000 Subject: [PATCH 029/128] Bump golang.org/x/net from 0.12.0 to 0.17.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.12.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index bbc24527..a44ae579 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 github.com/xlab/treeprint v1.2.0 - golang.org/x/net v0.12.0 + golang.org/x/net v0.17.0 gotest.tools/v3 v3.5.0 ) @@ -21,7 +21,7 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/protobuf v1.30.0 // indirect ) diff --git a/go.sum b/go.sum index 5b176e70..42d71351 100644 --- a/go.sum +++ b/go.sum @@ -44,8 +44,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -56,8 +56,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -65,8 +65,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= From cc9cc6f566a7ef7ecd5eb545209f79b4d8897798 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 12 Oct 2023 13:42:38 -0700 Subject: [PATCH 030/128] update go deps --- go.mod | 14 +++++++------- go.sum | 28 +++++++++++++++------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index a44ae579..bdbf9d28 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,13 @@ module github.com/cactus/go-camo/v2 go 1.19 require ( - github.com/cactus/mlog v1.0.9 + github.com/cactus/mlog v1.0.10 github.com/jessevdk/go-flags v1.5.0 - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.44.0 github.com/xlab/treeprint v1.2.0 golang.org/x/net v0.17.0 - gotest.tools/v3 v3.5.0 + gotest.tools/v3 v3.5.1 ) require ( @@ -17,11 +17,11 @@ require ( github.com/cactus/tai64 v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 42d71351..d529ecea 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cactus/mlog v1.0.9 h1:34fiSfH7Ds9N50fXP2/c5xNvp1mZBZZCda9GJ1+fwxE= -github.com/cactus/mlog v1.0.9/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= +github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= +github.com/cactus/mlog v1.0.10/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= github.com/cactus/tai64 v1.0.2 h1:c5rm3aQ9z3b6Vva2LXRSICx/Rpu9rj4MHEzRG1g7dK0= github.com/cactus/tai64 v1.0.2/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -13,22 +13,23 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -75,10 +76,11 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From 9d4831ede504f2e63bd71ef54ccbfa9f56a00c90 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 23 Oct 2023 15:09:17 -0700 Subject: [PATCH 031/128] fix #65 --- .gitignore | 1 + CHANGELOG.adoc | 4 ++++ cmd/go-camo/main.go | 22 +++++++++++++++++----- pkg/camo/upstream_proxy_test.go | 2 +- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index bfcb1f2a..56c973f1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ /server.crt /server.csr *.py[co] +/test.py /test-ruleset.conf /man/*.html /man/*.[1-9] diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 173264ac..eb4d17e0 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,8 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD + +== v2.4.5 - 2023-10-23 * fix htrie matching of non punycode (eg. unicode) idna hostnames * slightly faster logging (update to mlog dependency) * address a logging issue with missing url path output in @@ -26,6 +28,8 @@ toc::[] (approx 12-30% in microbenchmarks) * slight improvement in request path url processing (approx 2-4% in microbenchmarks) +* fix /debug/vars being enabled by default (#65) due to expvars import + side effect == v2.4.4 - 2023-07-25 * update dependencies diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 2feafcdb..86b0a509 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -8,6 +8,7 @@ package main import ( "bufio" "context" + "expvar" "fmt" "net" "net/http" @@ -33,10 +34,11 @@ import ( const metricNamespace = "camo" -var ( - // ServerVersion holds the server version string - ServerVersion = "no-version" +// ServerVersion holds the server version string +var ServerVersion = "no-version" +var ( + // configure histograms and counters responseSize = promauto.NewHistogramVec( prometheus.HistogramOpts{ Namespace: metricNamespace, @@ -315,10 +317,11 @@ func main() { CamoHandler: proxy, } + mux := http.NewServeMux() + // configure router endpoint for rendering metrics if opts.Metrics { mlog.Printf("Enabling metrics at /metrics") - http.Handle("/metrics", promhttp.Handler()) // Register a version info metric. verOverride := os.Getenv("APP_INFO_VERSION") if verOverride != "" { @@ -330,16 +333,25 @@ func main() { version.Branch = os.Getenv("APP_INFO_BRANCH") version.BuildDate = os.Getenv("APP_INFO_BUILD_DATE") prometheus.MustRegister(version.NewCollector(metricNamespace)) + // Wrap the dumb router in instrumentation. router = promhttp.InstrumentHandlerDuration(responseDuration, router) router = promhttp.InstrumentHandlerCounter(responseCount, router) router = promhttp.InstrumentHandlerResponseSize(responseSize, router) + + // also configure expvars. this is usually a side effect of importing + // exvar, as it auto-adds it to the default servemux. Since we want + // to avoid it being available that when metrics is not enabled, we add + // it in manually only if metrics IS enabled. + mux.Handle("/debug/vars", expvar.Handler()) + mux.Handle("/metrics", promhttp.Handler()) } - http.Handle("/", router) + mux.Handle("/", router) srv := &http.Server{ ReadTimeout: 30 * time.Second, + Handler: mux, } idleConnsClosed := make(chan struct{}) diff --git a/pkg/camo/upstream_proxy_test.go b/pkg/camo/upstream_proxy_test.go index f92accd3..411b58f7 100644 --- a/pkg/camo/upstream_proxy_test.go +++ b/pkg/camo/upstream_proxy_test.go @@ -42,8 +42,8 @@ func TestUpstreamProxyParsing(t *testing.T) { t, uspc.httpsProxy.addresses, []net.IP{ - net.ParseIP("::1"), net.ParseIP("127.0.0.1"), + net.ParseIP("::1"), }, ) } From a48538aaa0078ca02cc988c42d911358957a3d5e Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 23 Oct 2023 15:20:24 -0700 Subject: [PATCH 032/128] fix unstable test (would fail due to dns result sorting --- pkg/camo/upstream_proxy_test.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkg/camo/upstream_proxy_test.go b/pkg/camo/upstream_proxy_test.go index 411b58f7..85a8a55f 100644 --- a/pkg/camo/upstream_proxy_test.go +++ b/pkg/camo/upstream_proxy_test.go @@ -7,12 +7,21 @@ package camo import ( "fmt" "net" + "sort" "testing" "golang.org/x/net/http/httpproxy" "gotest.tools/v3/assert" ) +func IPListToStringList(sliceList []net.IP) []string { + list := make([]string, 0, len(sliceList)) + for _, item := range sliceList { + list = append(list, item.String()) + } + return list +} + func TestUpstreamProxyParsing(t *testing.T) { t.Parallel() @@ -38,12 +47,15 @@ func TestUpstreamProxyParsing(t *testing.T) { assert.Equal(t, uspc.httpsProxy.scheme, "socks5") assert.Equal(t, uspc.httpsProxy.host, "localhost") assert.Equal(t, uspc.httpsProxy.port, "9999") + + addresses := IPListToStringList(uspc.httpsProxy.addresses) + sort.Strings(addresses) assert.DeepEqual( t, - uspc.httpsProxy.addresses, - []net.IP{ - net.ParseIP("127.0.0.1"), - net.ParseIP("::1"), + addresses, + []string{ + "127.0.0.1", + "::1", }, ) } @@ -128,5 +140,4 @@ func TestUpstreamProxyMatching(t *testing.T) { errMsg(elem.matchtype, elem.address, elem.port, elem.result), ) } - } From 2cd1ffddd0da25b4fe9030035073fd9e9ecf8085 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 23 Oct 2023 15:27:02 -0700 Subject: [PATCH 033/128] update github workflows --- .github/workflows/publish-docker.yml | 1 + .github/workflows/unit-tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 6eff247f..e0137fc8 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,5 +1,6 @@ name: publish-docker on: + workflow_dispatch: push: tags: - 'v*' diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 62d00105..1bcfb43b 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -1,5 +1,6 @@ name: unit-tests on: + workflow_dispatch: push: branches: ['**'] pull_request: From eba44397d3a046652dfee24ac475f60ca6b38b29 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 25 Oct 2023 17:33:25 +0100 Subject: [PATCH 034/128] Add --no-debug-vars switch --- cmd/go-camo/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 86b0a509..8d03e38c 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -161,6 +161,7 @@ func main() { ReqTimeout time.Duration `long:"timeout" default:"4s" description:"Upstream request timeout"` MaxRedirects int `long:"max-redirects" default:"3" description:"Maximum number of redirects to follow"` Metrics bool `long:"metrics" description:"Enable Prometheus compatible metrics endpoint"` + NoDebugVars bool `long:"no-debug-vars" description:"Disable the /debug/vars/ metrics endpoint. This option has no effects when the metrics are not enabled"` NoLogTS bool `long:"no-log-ts" description:"Do not add a timestamp to logging"` LogJson bool `long:"log-json" description:"Log in JSON format"` DisableKeepAlivesFE bool `long:"no-fk" description:"Disable frontend http keep-alive support"` @@ -343,7 +344,9 @@ func main() { // exvar, as it auto-adds it to the default servemux. Since we want // to avoid it being available that when metrics is not enabled, we add // it in manually only if metrics IS enabled. - mux.Handle("/debug/vars", expvar.Handler()) + if !opts.NoDebugVars { + mux.Handle("/debug/vars", expvar.Handler()) + } mux.Handle("/metrics", promhttp.Handler()) } From 2c7840dcf9ea5eaf39e5afadc2cf5c00573ce1d2 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 25 Oct 2023 17:38:25 +0100 Subject: [PATCH 035/128] Update README.adoc --- README.adoc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.adoc b/README.adoc index aa74e6b7..6e830a3c 100644 --- a/README.adoc +++ b/README.adoc @@ -286,8 +286,7 @@ Usage: Application Options: -k, --key= HMAC key - -H, --header= Add additional header to each response. This option can - be used multiple times to add multiple headers + -H, --header= Add additional header to each response. This option can be used multiple times to add multiple headers --listen= Address:Port to bind to for HTTP (default: 0.0.0.0:8080) --ssl-listen= Address:Port to bind to for HTTPS/SSL/TLS --socket-listen= Path for unix domain socket to bind to for HTTP @@ -297,6 +296,7 @@ Application Options: --timeout= Upstream request timeout (default: 4s) --max-redirects= Maximum number of redirects to follow (default: 3) --metrics Enable Prometheus compatible metrics endpoint + --no-debug-vars Disable the /debug/vars/ metrics endpoint. This option has no effects when the metrics are not enabled --no-log-ts Do not add a timestamp to logging --log-json Log in JSON format --no-fk Disable frontend http keep-alive support @@ -359,8 +359,14 @@ The default is `0`. * `--metrics` + -- -If the metrics flag is provided, -then the service will expose a Prometheus `/metrics` endpoint. +If the `metrics` flag is provided, +then the service will expose a Prometheus `/metrics` endpoint and a `/debug/vars` endpoint from the go `expvar` package. +-- + +* `--no-debug-vars` ++ +-- +If the `no-debug-vars` flag is provided along with the `metrics` flag, the `/debug/vars` endpoint is removed. -- * `-k`, `--key` From 5f6e3fb7d82c56b18d3068bb2b9ef727b85350a7 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 25 Oct 2023 13:00:12 -0700 Subject: [PATCH 036/128] minor readme formatting and update man page --- README.adoc | 34 ++++++++++++++++++++++------------ man/go-camo.1.adoc | 17 +++++++++++++++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/README.adoc b/README.adoc index 6e830a3c..56f8fd6b 100644 --- a/README.adoc +++ b/README.adoc @@ -214,11 +214,12 @@ go-camo will generally do what you tell it to with regard to fetching signed url There is some limited support for trying to prevent {link-dns-rebinding} attacks. go-camo will attempt to reject any address matching an rfc1918 network block, -or a private scope ipv6 address, -be it in the url or via resulting hostname resolution. -Please note, however, -that this does not provide protecton for a network that uses public address space (ipv4 or ipv6), -or some of the {link-ip6-special-addresses}[more exotic] ipv6 addresses. +or a private scope ipv6 address, be it in the url or via resulting hostname +resolution. + +Please note, however, that this does not provide protecton for a network that +uses public address space (ipv4 or ipv6), or some of the +{link-ip6-special-addresses}[more exotic] ipv6 addresses. The list of networks rejected include... @@ -286,7 +287,8 @@ Usage: Application Options: -k, --key= HMAC key - -H, --header= Add additional header to each response. This option can be used multiple times to add multiple headers + -H, --header= Add additional header to each response. This option can + be used multiple times to add multiple headers --listen= Address:Port to bind to for HTTP (default: 0.0.0.0:8080) --ssl-listen= Address:Port to bind to for HTTPS/SSL/TLS --socket-listen= Path for unix domain socket to bind to for HTTP @@ -296,7 +298,8 @@ Application Options: --timeout= Upstream request timeout (default: 4s) --max-redirects= Maximum number of redirects to follow (default: 3) --metrics Enable Prometheus compatible metrics endpoint - --no-debug-vars Disable the /debug/vars/ metrics endpoint. This option has no effects when the metrics are not enabled + --no-debug-vars Disable the /debug/vars/ metrics endpoint. This + option has no effects when the metrics are not enabled --no-log-ts Do not add a timestamp to logging --log-json Log in JSON format --no-fk Disable frontend http keep-alive support @@ -306,10 +309,12 @@ Application Options: --allow-credential-urls Allow urls to contain user/pass credentials --filter-ruleset= Text file containing filtering rules (one per line) --server-name= Value to use for the HTTP server field (default: go-camo) - --expose-server-version Include the server version in the HTTP server response header + --expose-server-version Include the server version in the HTTP server response + header --enable-xfwd4 Enable x-forwarded-for passthrough/generation -v, --verbose Show verbose (debug) log level output - -V, --version Print version and exit; specify twice to show license information + -V, --version Print version and exit; specify twice to show license + information Help Options: -h, --help Show this help message @@ -359,14 +364,15 @@ The default is `0`. * `--metrics` + -- -If the `metrics` flag is provided, -then the service will expose a Prometheus `/metrics` endpoint and a `/debug/vars` endpoint from the go `expvar` package. +If the `metrics` flag is provided, then the service will expose a Prometheus +`/metrics` endpoint and a `/debug/vars` endpoint from the go `expvar` package. -- * `--no-debug-vars` + -- -If the `no-debug-vars` flag is provided along with the `metrics` flag, the `/debug/vars` endpoint is removed. +If the `no-debug-vars` flag is provided along with the `metrics` flag, the +`/debug/vars` endpoint is removed. -- * `-k`, `--key` @@ -473,6 +479,10 @@ In addition, you can expose some extra data to metrics via env vars, if desired: * BuildDate via `APP_INFO_BUILD_DATE` * You can also override the version by setting `APP_INFO_VERSION` +A `/debug/vars` endpoint is also included with `--metrics` by default. +This endpoint returns memstats and some additional data. This endpoint can be +disabled by additionally supplying the `--no-debug-vars` flag. + == Additional tools Go-Camo includes a couple of additional tools. diff --git a/man/go-camo.1.adoc b/man/go-camo.1.adoc index 2057bd5d..25b3f549 100644 --- a/man/go-camo.1.adoc +++ b/man/go-camo.1.adoc @@ -106,8 +106,17 @@ See __<>__ for more info. -- Enable Prometheus compatible metrics endpoint. -If metrics flag is provided, then the service will make a Prometheus -compatible endpoint available at `/metrics` via HTTP GET. +If the `metrics` flag is provided, then the service will expose a Prometheus +`/metrics` endpoint and a `/debug/vars` endpoint from the go `expvar` package. + +See __<>__ for more info. +-- + +*--no-debug-vars*:: ++ +-- +If the `no-debug-vars` flag is provided along with the `metrics` flag, the +`/debug/vars` endpoint is removed. See __<>__ for more info. -- @@ -198,6 +207,10 @@ systems to gather data. The endpoint includes all of the default `go_` and `process_`. In addition, a number of custom metrics. +A `/debug/vars` endpoint is also included with *--metrics* by default. +This endpoint returns memstats and some additional data. This endpoint can be +disabled by additionally supplying the *--no-debug-vars* flag. + .Exposed Camo Metrics [%header,cols=" Date: Wed, 25 Oct 2023 13:06:20 -0700 Subject: [PATCH 037/128] update changelog --- CHANGELOG.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index eb4d17e0..0efac616 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,10 @@ toc::[] == HEAD +== v2.4.6 - 2023-10-25 +* Add `--no-debug-vars` flag to disable /debug/vars when `--metrics` is + enabled. (#66, #67) + == v2.4.5 - 2023-10-23 * fix htrie matching of non punycode (eg. unicode) idna hostnames * slightly faster logging (update to mlog dependency) From 5ce9efb8f970713d8f9b81db7516a21b7c747c19 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 29 Oct 2023 12:45:09 -0700 Subject: [PATCH 038/128] update prometheus dep --- go.mod | 5 ++--- go.sum | 13 ++++--------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index bdbf9d28..0ec28356 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/cactus/mlog v1.0.10 github.com/jessevdk/go-flags v1.5.0 github.com/prometheus/client_golang v1.17.0 - github.com/prometheus/common v0.44.0 + github.com/prometheus/common v0.45.0 github.com/xlab/treeprint v1.2.0 golang.org/x/net v0.17.0 gotest.tools/v3 v3.5.1 @@ -16,9 +16,8 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect golang.org/x/sys v0.13.0 // indirect diff --git a/go.sum b/go.sum index d529ecea..0ca03fce 100644 --- a/go.sum +++ b/go.sum @@ -8,26 +8,23 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -47,7 +44,6 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -75,7 +71,6 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 97a0cade23e23534728a5548a71014124fb26989 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 29 Oct 2023 13:08:04 -0700 Subject: [PATCH 039/128] looks like mockbin is dead. change to httpbin --- pkg/camo/helpers_test.go | 22 ++++++++++++++++------ pkg/camo/proxy_test.go | 16 ++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/pkg/camo/helpers_test.go b/pkg/camo/helpers_test.go index 7caec2a0..25ec2e8a 100644 --- a/pkg/camo/helpers_test.go +++ b/pkg/camo/helpers_test.go @@ -74,20 +74,30 @@ func makeTestReq(testURL string, status int, config Config) (*http.Response, err } func bodyAssert(t *testing.T, expected string, resp *http.Response) { + t.Helper() body, err := io.ReadAll(resp.Body) assert.Check(t, err) bodyString := string(body) - assert.Check(t, is.Equal(expected, bodyString), "Expected 404 response body but got '%s' instead", - bodyString) + assert.Check(t, is.Equal(expected, bodyString), + "Expected 404 response body but got '%s' instead", + bodyString, + ) } func headerAssert(t *testing.T, expected, name string, resp *http.Response) { - assert.Check(t, is.Equal(expected, resp.Header.Get(name)), "Expected response header mismatch") + t.Helper() + assert.Check(t, + is.Equal(expected, resp.Header.Get(name)), + "Expected response header mismatch", + ) } func statusCodeAssert(t *testing.T, expected int, resp *http.Response) { - assert.Check(t, is.Equal(expected, resp.StatusCode), "Expected %d but got '%d' instead", - expected, resp.StatusCode) - + t.Helper() + assert.Check(t, + is.Equal(expected, resp.StatusCode), + "Expected %d but got '%d' instead", + expected, resp.StatusCode, + ) } diff --git a/pkg/camo/proxy_test.go b/pkg/camo/proxy_test.go index ea57bcb7..5006e5cf 100644 --- a/pkg/camo/proxy_test.go +++ b/pkg/camo/proxy_test.go @@ -88,21 +88,21 @@ func TestStrangeFormatRedirects(t *testing.T) { func TestRedirectsWithPathOnly(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/302?to=%2Fredirect%2F302%3Fto%3Dhttp%3A%2F%2Fwww.google.com%2Fimages%2Fsrpr%2Flogo11w.png" + testURL := "http://httpbin.org/redirect-to?status_code=302&url=%2Fredirect-to%3Furl%3Dhttp%3A%2F%2Fwww.google.com%2Fimages%2Fsrpr%2Flogo11w.png%26status_code%3D302" _, err := makeTestReq(testURL, 200, camoConfig) assert.Check(t, err) } func TestFollowPermRedirects(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/301?to=http://www.google.com/images/srpr/logo11w.png" + testURL := "http://httpbin.org/redirect-to?status_code=301&url=http://www.google.com/images/srpr/logo11w.png" _, err := makeTestReq(testURL, 200, camoConfig) assert.Check(t, err) } func TestFollowTempRedirects(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/302?to=http://www.google.com/images/srpr/logo11w.png" + testURL := "http://httpbin.org/redirect-to?status_code=302&url=http://www.google.com/images/srpr/logo11w.png" _, err := makeTestReq(testURL, 200, camoConfig) assert.Check(t, err) } @@ -293,7 +293,7 @@ func Test404OnCredentialURL(t *testing.T) { func Test404InfiniRedirect(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/302/4" + testURL := "http://httpbin.org/redirect/4" _, err := makeTestReq(testURL, 404, camoConfig) assert.Check(t, err) } @@ -383,7 +383,7 @@ func Test404OnLocalhostWithPort(t *testing.T) { func Test404OnRedirectWithLocalhostTarget(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/302?to=http://localhost/some.png" + testURL := "http://httpbin.org/redirect-to?status_code=302&url=http://localhost/some.png" resp, err := makeTestReq(testURL, 404, camoConfig) if assert.Check(t, err) { bodyAssert(t, "Error Fetching Resource\n", resp) @@ -392,7 +392,7 @@ func Test404OnRedirectWithLocalhostTarget(t *testing.T) { func Test404OnRedirectWithLoopbackIP(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/302?to=http://127.0.0.100/some.png" + testURL := "http://httpbin.org/redirect-to?status_code=302&url=http://127.0.0.100/some.png" resp, err := makeTestReq(testURL, 404, camoConfig) if assert.Check(t, err) { bodyAssert(t, "Error Fetching Resource\n", resp) @@ -401,7 +401,7 @@ func Test404OnRedirectWithLoopbackIP(t *testing.T) { func Test404OnRedirectWithLoopbackIPwCreds(t *testing.T) { t.Parallel() - testURL := "http://mockbin.org/redirect/302?to=http://user:pass@127.0.0.100/some.png" + testURL := "http://httpbin.org/redirect-to?status_code=302&url=http://user:pass@127.0.0.100/some.png" resp, err := makeTestReq(testURL, 404, camoConfig) if assert.Check(t, err) { bodyAssert(t, "Error Fetching Resource\n", resp) @@ -422,7 +422,7 @@ func Test404OnLoopback(t *testing.T) { skipIfCI(t) t.Parallel() - testURL := "http://mockbin.org/redirect/302?to=http://test.vcap.me" + testURL := "http://httpbin.org/redirect-to?status_code=302&url=http://test.vcap.me" req, err := makeReq(camoConfig, testURL) assert.Check(t, err) From b2f7c54d9e015adc7c0d33f760e1097ef83d8733 Mon Sep 17 00:00:00 2001 From: Vinay0508 <127884148+Vinay0508@users.noreply.github.com> Date: Mon, 30 Oct 2023 01:40:02 +0530 Subject: [PATCH 040/128] doc(README): remove typo --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 56f8fd6b..9f6620ce 100644 --- a/README.adoc +++ b/README.adoc @@ -217,7 +217,7 @@ go-camo will attempt to reject any address matching an rfc1918 network block, or a private scope ipv6 address, be it in the url or via resulting hostname resolution. -Please note, however, that this does not provide protecton for a network that +Please note, however, that this does not provide protection for a network that uses public address space (ipv4 or ipv6), or some of the {link-ip6-special-addresses}[more exotic] ipv6 addresses. From 45fcda46f9f035f9f2f39a225eb93846f9ac1b71 Mon Sep 17 00:00:00 2001 From: Vaibhav <100083207+vaibhav-009@users.noreply.github.com> Date: Mon, 30 Oct 2023 04:00:44 +0530 Subject: [PATCH 041/128] Update README.adoc --- README.adoc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.adoc b/README.adoc index 9f6620ce..f8c685f4 100644 --- a/README.adoc +++ b/README.adoc @@ -58,13 +58,13 @@ The general steps are as follows: * A client requests a page from the web app. * The original URL in the content is parsed. -* An HMAC signature of the url is generated. -* The url and hmac are encoded. -* The encoded url and hmac are placed into the expected format, - creating the signed url. -* The signed url replaces the original image URL. +* An HMAC signature of the URL is generated. +* The URL and hmac are encoded. +* The encoded URL and hmac are placed into the expected format, + creating the signed URL. +* The signed URL replaces the original image URL. * The web app returns the content to the client. -* The client requests the signed url from Go-Camo. +* The client requests the signed URL from Go-Camo. * Go-Camo validates the HMAC, decodes the URL, then requests the content from the origin server and streams it to the client. @@ -221,7 +221,7 @@ Please note, however, that this does not provide protection for a network that uses public address space (ipv4 or ipv6), or some of the {link-ip6-special-addresses}[more exotic] ipv6 addresses. -The list of networks rejected include... +The list of networks rejected includes... [%header%autowidth.stretch] |=== @@ -306,7 +306,7 @@ Application Options: --no-bk Disable backend http keep-alive support --allow-content-video Additionally allow 'video/*' content --allow-content-audio Additionally allow 'audio/*' content - --allow-credential-urls Allow urls to contain user/pass credentials + --allow-credential-urls Allow URLs to contain user/pass credentials --filter-ruleset= Text file containing filtering rules (one per line) --server-name= Value to use for the HTTP server field (default: go-camo) --expose-server-version Include the server version in the HTTP server response @@ -326,11 +326,11 @@ A few notes about specific flags: + -- If a `filter-ruleset` file is defined, -that file is read and each line converted into a filter rule. +that file is read and each line is converted into a filter rule. See link:man/go-camo-filtering.5.adoc[`go-camo-filtering(5)`] for more information regarding the format for the filter file itself. -Regarding evaluatation: The ruleset is NOT evaluated in-order. +Regarding evaluation: The ruleset is NOT evaluated in-order. The rules process in two phases: "allow rule phase" where the allow rules are evaluated, and the "deny rule phase" where the deny rules are evaluated. First match in each phase "wins" that phase. @@ -345,10 +345,10 @@ If there are no deny rules supplied, this phase is skipped. [NOTE] ==== -It is always preferable to do filtering at the point of url generation and signing. +It is always preferable to do filtering at the point of URL generation and signing. The `filter-ruleset` functionality (both allow and deny) is supplied predominantly as a fallback safety measure, -for cases where you have previously generated a url and you need a quick temporary fix, +for cases where you have previously generated a URL and you need a quick temporary fix, or where rolling keys takes a while and/or is difficult. ==== -- @@ -425,7 +425,7 @@ Some examples (list is not exhaustive): * The upstream http proxy itself may be responsible for following redirects (depending on configuration). As such, go-camo may not have visibility into the redirect chain. This could result in resource exhaustion (redirect - loops), or SSRF (redirects to internal urls). + loops), or SSRF (redirects to internal URLs). * The upstream http proxy itself will be responsible for connecting to external servers, and would need to be configured for any request size limits. While go-camo would still limit request sizes based on its own configuration, @@ -500,14 +500,14 @@ Usage: Application Options: -k, --key= HMAC key - -p, --prefix= Optional url prefix used by encode output + -p, --prefix= Optional URL prefix used by encode output Help Options: -h, --help Show this help message Available commands: - decode Decode a url and print result - encode Encode a url and print result + decode Decode a URL and print result + encode Encode a URL and print result ---- Example usage: From 743ecbc6941820bc69ebbeb6766e632966968e95 Mon Sep 17 00:00:00 2001 From: Vaibhav <100083207+vaibhav-009@users.noreply.github.com> Date: Mon, 30 Oct 2023 04:02:29 +0530 Subject: [PATCH 042/128] Update README.adoc --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 9f6620ce..472d48be 100644 --- a/README.adoc +++ b/README.adoc @@ -465,7 +465,7 @@ In addition, a number of custom metrics. | The number of responses that failed to send to the client. | camo_proxy_reponses_truncated_total | Counter -| The number of responess that were too large to send. +| The number of responses that were too large to send. | camo_responses_total | Counter | Total HTTP requests processed by the go-camo, excluding scrapes. From 0d5a8f6f4723462b2d6988e0658e9351cccadeb7 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 4 Nov 2023 14:46:12 -0700 Subject: [PATCH 043/128] update deps --- Makefile | 6 ++---- go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b3f5a4b6..6409215b 100644 --- a/Makefile +++ b/Makefile @@ -103,10 +103,8 @@ check: setup setup-check .PHONY: update-go-deps update-go-deps: @echo ">> updating Go dependencies" - @for m in $$(go list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ - go get $$m; \ - done - go mod tidy + @go get -u all + @go mod tidy ${BUILDDIR}/man/%: man/%.adoc @[ -d "${BUILDDIR}/man" ] || mkdir -p "${BUILDDIR}/man" diff --git a/go.mod b/go.mod index 0ec28356..8575dcab 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 0ca03fce..ad504106 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -62,8 +62,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= From d3b0ad9d076138310ed23285089b373c6a5a23ef Mon Sep 17 00:00:00 2001 From: eli <59039+dropwhile@users.noreply.github.com> Date: Sat, 4 Nov 2023 15:04:24 -0700 Subject: [PATCH 044/128] Create dependabot.yml add dependabot config --- .github/dependabot.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..f4ea2ada --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gomod" # See documentation for possible values + directory: "/" # Location of package manifests + labels: + - dependencies + schedule: + interval: "weekly" + day: "monday" From 59a4227d1ffeff22b9f0e2fb4ec2683427ad144b Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 8 Nov 2023 15:02:17 -0800 Subject: [PATCH 045/128] add support for http/3+quic New flag `--quic` to enable. Requires `--ssl-listen` as well. --- CHANGELOG.adoc | 1 + cmd/go-camo/main.go | 87 ++++++++++++++++++++++++++++++++++----------- go.mod | 13 ++++++- go.sum | 33 +++++++++++++++-- 4 files changed, 109 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 0efac616..77b22a80 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,7 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD +* Add http/3+quic server support. New flag `--quic`. Requires `--ssl-listen`. == v2.4.6 - 2023-10-25 * Add `--no-debug-vars` flag to disable /debug/vars when `--metrics` is diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 8d03e38c..0d6ba654 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -23,6 +23,7 @@ import ( "github.com/cactus/go-camo/v2/pkg/camo" "github.com/cactus/go-camo/v2/pkg/htrie" "github.com/cactus/go-camo/v2/pkg/router" + "github.com/quic-go/quic-go/http3" "github.com/cactus/mlog" flags "github.com/jessevdk/go-flags" @@ -155,6 +156,7 @@ func main() { BindAddress string `long:"listen" default:"0.0.0.0:8080" description:"Address:Port to bind to for HTTP"` BindAddressSSL string `long:"ssl-listen" description:"Address:Port to bind to for HTTPS/SSL/TLS"` BindSocket string `long:"socket-listen" description:"Path for unix domain socket to bind to for HTTP"` + EnableQuic bool `long:"quic" description:"Enable http3/quic. Binds to the same port number as ssl-listen but udp+quic."` SSLKey string `long:"ssl-key" description:"ssl private key (key.pem) path"` SSLCert string `long:"ssl-cert" description:"ssl cert (cert.pem) path"` MaxSize int64 `long:"max-size" description:"Max allowed response size (KB)"` @@ -236,6 +238,9 @@ func main() { if opts.BindAddressSSL != "" && opts.SSLCert == "" { mlog.Fatal("ssl-cert is required when specifying ssl-listen") } + if opts.EnableQuic && opts.BindAddressSSL == "" { + mlog.Fatal("ssl-listen is required when specifying quic") + } // set keepalive options config.DisableKeepAlivesBE = opts.DisableKeepAlivesBE @@ -352,9 +357,36 @@ func main() { mux.Handle("/", router) - srv := &http.Server{ - ReadTimeout: 30 * time.Second, - Handler: mux, + var httpSrv *http.Server + var tlsSrv *http.Server + var quicSrv *http3.Server + + if opts.BindAddress != "" { + httpSrv = &http.Server{ + Addr: opts.BindAddress, + ReadTimeout: 30 * time.Second, + Handler: mux, + } + } + + if opts.BindAddressSSL != "" { + tlsSrv = &http.Server{ + Addr: opts.BindAddressSSL, + ReadTimeout: 30 * time.Second, + Handler: mux, + } + + if opts.EnableQuic { + quicSrv = &http3.Server{ + Addr: opts.BindAddressSSL, + Handler: mux, + } + // wrap default mux to set some default quic reference headers on tls responses + tlsSrv.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + quicSrv.SetQuicHeaders(w.Header()) + mux.ServeHTTP(w, r) + }) + } } idleConnsClosed := make(chan struct{}) @@ -364,14 +396,28 @@ func main() { signal.Notify(sigint, os.Interrupt, syscall.SIGTERM) s := <-sigint mlog.Info("Handling signal:", s) - mlog.Info("Starting graceful shutdown") - d := time.Now().Add(200 * time.Millisecond) + closeWait := 200 * time.Millisecond + d := time.Now().Add(closeWait) ctx, cancel := context.WithDeadline(context.Background(), d) - if err := srv.Shutdown(ctx); err != nil { - mlog.Info("Error gracefully shutting down server:", err) + if httpSrv != nil { + if err := httpSrv.Shutdown(ctx); err != nil { + mlog.Info("Error gracefully shutting down HTTP server:", err) + } + } + + if tlsSrv != nil { + if err := tlsSrv.Shutdown(ctx); err != nil { + mlog.Info("Error gracefully shutting down HTTP/TLS server:", err) + } + } + + if quicSrv != nil { + if err := quicSrv.CloseGracefully(closeWait); err != nil { + mlog.Info("Error gracefully shutting down HTTP3/QUIC server:", err) + } } // Even though ctx may be expired, it is good practice to call its // cancellation function in any case. Failure to do so may keep the @@ -393,35 +439,34 @@ func main() { mlog.Fatal("Error listening on unix socket", err) } - if err := srv.Serve(ln); err != http.ErrServerClosed { + if err := httpSrv.Serve(ln); err != http.ErrServerClosed { mlog.Fatal(err) } }() } - if opts.BindAddress != "" { + if httpSrv != nil { mlog.Printf("Starting HTTP server on: tcp:%s", opts.BindAddress) go func() { - ln, err := net.Listen("tcp", opts.BindAddress) - if err != nil { - mlog.Fatal("Error listening on tcp socket", err) - } - - if err := srv.Serve(ln); err != http.ErrServerClosed { + if err := httpSrv.ListenAndServe(); err != http.ErrServerClosed { mlog.Fatal(err) } }() } - if opts.BindAddressSSL != "" { - mlog.Printf("Starting TLS server on: tcp:%s", opts.BindAddressSSL) + if tlsSrv != nil { + mlog.Printf("Starting HTTP/TLS server on: tcp:%s", opts.BindAddressSSL) go func() { - ln, err := net.Listen("tcp", opts.BindAddressSSL) - if err != nil { - mlog.Fatal("Error listening on tcp socket", err) + if err := tlsSrv.ListenAndServeTLS(opts.SSLCert, opts.SSLKey); err != http.ErrServerClosed { + mlog.Fatal(err) } + }() + } - if err := srv.ServeTLS(ln, opts.SSLCert, opts.SSLKey); err != http.ErrServerClosed { + if quicSrv != nil { + mlog.Printf("Starting HTTP3/QUIC server on: udp:%s", opts.BindAddressSSL) + go func() { + if err := quicSrv.ListenAndServeTLS(opts.SSLCert, opts.SSLKey); err != http.ErrServerClosed { mlog.Fatal(err) } }() diff --git a/go.mod b/go.mod index 8575dcab..d669962c 100644 --- a/go.mod +++ b/go.mod @@ -7,8 +7,9 @@ require ( github.com/jessevdk/go-flags v1.5.0 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 + github.com/quic-go/quic-go v0.40.0 github.com/xlab/treeprint v1.2.0 - golang.org/x/net v0.17.0 + golang.org/x/net v0.18.0 gotest.tools/v3 v3.5.1 ) @@ -16,11 +17,21 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect + github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/onsi/ginkgo/v2 v2.13.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/quic-go/qpack v0.4.0 // indirect + github.com/quic-go/qtls-go1-20 v0.4.1 // indirect + go.uber.org/mock v0.3.0 // indirect + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.15.0 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index ad504106..76228392 100644 --- a/go.sum +++ b/go.sum @@ -8,15 +8,25 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5XqmmYsTLzJp/TO9Lhy39gkverk= +github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= @@ -27,23 +37,38 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= +github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= +github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= +github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.40.0 h1:GYd1iznlKm7dpHD7pOVpUvItgMPo/jrMgDWZhMCecqw= +github.com/quic-go/quic-go v0.40.0/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= +go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -68,14 +93,16 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From cf3e33ba91b62bec8ebd68fc748ee3f3022fdcc1 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 8 Nov 2023 15:14:06 -0800 Subject: [PATCH 046/128] make sure each server gets closeWait time to gracefully close --- cmd/go-camo/main.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 0d6ba654..79affe26 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -399,15 +399,20 @@ func main() { mlog.Info("Starting graceful shutdown") closeWait := 200 * time.Millisecond - d := time.Now().Add(closeWait) - ctx, cancel := context.WithDeadline(context.Background(), d) + ctx, cancel := context.WithTimeout(context.Background(), closeWait) + // Even though ctx may be expired by then, it is good practice to call its + // cancellation function in any case. Failure to do so may keep the + // context and its parent alive longer than necessary. + defer cancel() if httpSrv != nil { if err := httpSrv.Shutdown(ctx); err != nil { mlog.Info("Error gracefully shutting down HTTP server:", err) } } + ctx, cancel = context.WithTimeout(context.Background(), closeWait) + defer cancel() if tlsSrv != nil { if err := tlsSrv.Shutdown(ctx); err != nil { mlog.Info("Error gracefully shutting down HTTP/TLS server:", err) @@ -419,10 +424,6 @@ func main() { mlog.Info("Error gracefully shutting down HTTP3/QUIC server:", err) } } - // Even though ctx may be expired, it is good practice to call its - // cancellation function in any case. Failure to do so may keep the - // context and its parent alive longer than necessary. - cancel() close(idleConnsClosed) }() From 0652b83ef3b46f69b1ae4e2ca234c571fcef0b83 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 8 Nov 2023 15:15:45 -0800 Subject: [PATCH 047/128] ignore error here --- cmd/go-camo/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 79affe26..edff9ef5 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -383,7 +383,7 @@ func main() { } // wrap default mux to set some default quic reference headers on tls responses tlsSrv.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - quicSrv.SetQuicHeaders(w.Header()) + _ = quicSrv.SetQuicHeaders(w.Header()) mux.ServeHTTP(w, r) }) } From 31c8e0cf47e2ef95f8fc51f01689c49e9f858fc7 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 8 Nov 2023 15:21:50 -0800 Subject: [PATCH 048/128] silence nosec instead of `_=` --- cmd/go-camo/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index edff9ef5..c40f8891 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -383,7 +383,7 @@ func main() { } // wrap default mux to set some default quic reference headers on tls responses tlsSrv.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - _ = quicSrv.SetQuicHeaders(w.Header()) + quicSrv.SetQuicHeaders(w.Header()) // #nosec G104 - ignore error. should only happen if server.Port isn't discoverable mux.ServeHTTP(w, r) }) } From d9a15632720adb61b07742add2e7543cc0af91d1 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 11 Nov 2023 21:33:48 -0800 Subject: [PATCH 049/128] add ghcr.io as a docker image repo as well --- .github/workflows/publish-github.yml | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/publish-github.yml diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml new file mode 100644 index 00000000..2342ccd7 --- /dev/null +++ b/.github/workflows/publish-github.yml @@ -0,0 +1,62 @@ +name: publish-docker +on: + workflow_dispatch: + push: + tags: + - 'v*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + name: docker-publish + runs-on: ubuntu-latest + + steps: + - name: Src Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.x' + check-latest: true + id: go + + - name: Tests + if: success() + env: + GOPROXY: "https://proxy.golang.org" + run: make test + + - name: Build + if: success() + env: + GOPROXY: "https://proxy.golang.org" + run: make build + + - name: Build Container + if: success() + run: | + TAG=$(git describe --tags) + docker build -f examples/Dockerfile -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} . + + - name: Publish Container + if: success() + env: + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + run: | + TAG=$(git describe --tags) + LATEST_TAG=$(git tag -l | grep -viE '(alpha|beta)' | sort -V | tail -n 1) + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} + if [[ "$TAG" = "$LATEST_TAG" ]]; then + docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + fi + docker logout From c37ef9211d5f86e1c2f7d40e2f56031deef28696 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 11 Nov 2023 21:35:02 -0800 Subject: [PATCH 050/128] rename --- .github/workflows/publish-github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index 2342ccd7..bdd940f0 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -1,4 +1,4 @@ -name: publish-docker +name: publish-github on: workflow_dispatch: push: From df8e40514057bb408ebce4de54d6dbe18de1c7ed Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 13:53:20 -0800 Subject: [PATCH 051/128] fetch tags in workflow checkout --- .github/workflows/publish-github.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index bdd940f0..1bd3c773 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -19,6 +19,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 1 + fetch-tags: true - name: Setup Go uses: actions/setup-go@v4 From b8ae6c227cf21d2996835f1c36d8071a9f35ac2a Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 14:23:56 -0800 Subject: [PATCH 052/128] switch to kong for url-tool argument parsing --- CHANGELOG.adoc | 4 ++- cmd/go-camo/main.go | 4 +-- cmd/url-tool/main.go | 80 ++++++++++++++++++++------------------------ go.mod | 5 +-- go.sum | 14 ++++---- 5 files changed, 53 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 77b22a80..245eaf0c 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,7 +18,9 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD -* Add http/3+quic server support. New flag `--quic`. Requires `--ssl-listen`. + +== v2.4.7 - 2023-11-12 +* Add http3/quic server support. New flag `--quic`. Requires `--ssl-listen`. == v2.4.6 - 2023-10-25 * Add `--no-debug-vars` flag to disable /debug/vars when `--metrics` is diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index c40f8891..1adaa738 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -23,14 +23,14 @@ import ( "github.com/cactus/go-camo/v2/pkg/camo" "github.com/cactus/go-camo/v2/pkg/htrie" "github.com/cactus/go-camo/v2/pkg/router" - "github.com/quic-go/quic-go/http3" - "github.com/cactus/mlog" + flags "github.com/jessevdk/go-flags" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/version" + "github.com/quic-go/quic-go/http3" ) const metricNamespace = "camo" diff --git a/cmd/url-tool/main.go b/cmd/url-tool/main.go index 851a4b4f..cc3ab7f8 100644 --- a/cmd/url-tool/main.go +++ b/cmd/url-tool/main.go @@ -9,67 +9,62 @@ import ( "errors" "fmt" "net/url" - "os" "strings" "github.com/cactus/go-camo/v2/pkg/camo/encoding" - flags "github.com/jessevdk/go-flags" + "github.com/alecthomas/kong" ) // EncodeCommand holds command options for the encode command -type EncodeCommand struct { - Base string `short:"b" long:"base" default:"hex" description:"Encode/Decode base. Either hex or base64"` - Prefix string `short:"p" long:"prefix" default:"" description:"Optional url prefix used by encode output"` - Positional struct { - Url string `positional-arg-name:"URL"` - } `positional-args:"yes" required:"true"` +type EncodeCmd struct { + Base string `name:"base" short:"b" enum:"hex,base64" default:"hex" help:"Encode/Decode base. One of: ${enum}"` + Prefix string `name:"prefix" short:"p" default:"" help:"Optional url prefix used by encode output"` + Url string `arg:"" name:"URL" help:"URL to encode"` } // Execute runs the encode command -func (c *EncodeCommand) Execute(args []string) error { - if opts.HmacKey == "" { +func (cmd *EncodeCmd) Run(cli *CLI) error { + if cli.HmacKey == "" { return errors.New("empty HMAC") } - if len(c.Positional.Url) == 0 { + if len(cmd.Url) == 0 { return errors.New("no url argument provided") } - hmacKeyBytes := []byte(opts.HmacKey) + hmacKeyBytes := []byte(cli.HmacKey) var outURL string - switch c.Base { + switch cmd.Base { case "base64": - outURL = encoding.B64EncodeURL(hmacKeyBytes, c.Positional.Url) + outURL = encoding.B64EncodeURL(hmacKeyBytes, cmd.Url) case "hex": - outURL = encoding.HexEncodeURL(hmacKeyBytes, c.Positional.Url) + outURL = encoding.HexEncodeURL(hmacKeyBytes, cmd.Url) default: return errors.New("invalid base provided") } - fmt.Println(strings.TrimRight(c.Prefix, "/") + outURL) + fmt.Println(strings.TrimRight(cmd.Prefix, "/") + outURL) return nil } // DecodeCommand holds command options for the decode command -type DecodeCommand struct { - Positional struct { - Url string `positional-arg-name:"URL"` - } `positional-args:"yes" required:"true"` +type DecodeCmd struct { + Url string `arg:"" name:"URL" help:"URL to decode"` } // Execute runs the decode command -func (c *DecodeCommand) Execute(args []string) error { - if opts.HmacKey == "" { +func (cmd *DecodeCmd) Run(cli *CLI) error { + if cli.HmacKey == "" { return errors.New("empty HMAC") } - if len(c.Positional.Url) == 0 { + if len(cmd.Url) == 0 { return errors.New("no url argument provided") } - hmacKeyBytes := []byte(opts.HmacKey) + hmacKeyBytes := []byte(cli.HmacKey) - u, err := url.Parse(c.Positional.Url) + u, err := url.Parse(cmd.Url) if err != nil { return err } @@ -82,26 +77,25 @@ func (c *DecodeCommand) Execute(args []string) error { return nil } -var opts struct { - HmacKey string `short:"k" long:"key" description:"HMAC key"` +type CLI struct { + // global options + Version kong.VersionFlag `name:"version" short:"V" help:"Print version information and quit"` + HmacKey string `name:"key" short:"k" help:"HMAC key"` + + // subcommands + Encode EncodeCmd `cmd:"" aliases:"enc" help:"Encode a url and print result"` + Decode DecodeCmd `cmd:"" aliases:"dec" help:"Decode a url and print result"` } // #nosec G104 func main() { - parser := flags.NewParser(&opts, flags.Default) - parser.AddCommand("encode", "Encode a url and print result", - "Encode a url and print result", &EncodeCommand{}) - parser.AddCommand("decode", "Decode a url and print result", - "Decode a url and print result", &DecodeCommand{}) - - // parse said flags - _, err := parser.Parse() - if err != nil { - if e, ok := err.(*flags.Error); ok { - if e.Type == flags.ErrHelp { - os.Exit(0) - } - } - os.Exit(1) - } + cli := CLI{} + ctx := kong.Parse(&cli, + kong.Name("url-tool"), + kong.Description("A simple way to work with signed go-camo URLs from the command line"), + kong.UsageOnError(), + kong.Vars{"version": "2.4.7"}, + ) + err := ctx.Run(&cli) + ctx.FatalIfErrorf(err) } diff --git a/go.mod b/go.mod index d669962c..c8b9727f 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( ) require ( + github.com/alecthomas/kong v0.8.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -21,14 +22,14 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/onsi/ginkgo/v2 v2.13.0 // indirect + github.com/onsi/ginkgo/v2 v2.13.1 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.3.0 // indirect golang.org/x/crypto v0.15.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 76228392..8beb69d4 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY= +github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= @@ -9,7 +11,7 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -24,9 +26,9 @@ github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LF github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= +github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= @@ -57,8 +59,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= From 0f6050d007ba2b61660b4e3c0597e76043448991 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 15:05:38 -0800 Subject: [PATCH 053/128] switch to kong for go-camo cli argument parsing --- cmd/go-camo/main.go | 173 ++++++++++++++++++----------------- cmd/go-camo/main_vers_gen.go | 2 +- cmd/url-tool/main.go | 5 +- go.mod | 3 +- go.sum | 6 +- 5 files changed, 96 insertions(+), 93 deletions(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 1adaa738..d52223ae 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -20,12 +20,12 @@ import ( "syscall" "time" + "github.com/alecthomas/kong" "github.com/cactus/go-camo/v2/pkg/camo" "github.com/cactus/go-camo/v2/pkg/htrie" "github.com/cactus/go-camo/v2/pkg/router" "github.com/cactus/mlog" - flags "github.com/jessevdk/go-flags" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -148,63 +148,51 @@ func loadFilterList(fname string) ([]camo.FilterFunc, error) { return filterFuncs, nil } -func main() { - // command line flags - var opts struct { - HMACKey string `short:"k" long:"key" description:"HMAC key"` - AddHeaders []string `short:"H" long:"header" description:"Add additional header to each response. This option can be used multiple times to add multiple headers"` - BindAddress string `long:"listen" default:"0.0.0.0:8080" description:"Address:Port to bind to for HTTP"` - BindAddressSSL string `long:"ssl-listen" description:"Address:Port to bind to for HTTPS/SSL/TLS"` - BindSocket string `long:"socket-listen" description:"Path for unix domain socket to bind to for HTTP"` - EnableQuic bool `long:"quic" description:"Enable http3/quic. Binds to the same port number as ssl-listen but udp+quic."` - SSLKey string `long:"ssl-key" description:"ssl private key (key.pem) path"` - SSLCert string `long:"ssl-cert" description:"ssl cert (cert.pem) path"` - MaxSize int64 `long:"max-size" description:"Max allowed response size (KB)"` - ReqTimeout time.Duration `long:"timeout" default:"4s" description:"Upstream request timeout"` - MaxRedirects int `long:"max-redirects" default:"3" description:"Maximum number of redirects to follow"` - Metrics bool `long:"metrics" description:"Enable Prometheus compatible metrics endpoint"` - NoDebugVars bool `long:"no-debug-vars" description:"Disable the /debug/vars/ metrics endpoint. This option has no effects when the metrics are not enabled"` - NoLogTS bool `long:"no-log-ts" description:"Do not add a timestamp to logging"` - LogJson bool `long:"log-json" description:"Log in JSON format"` - DisableKeepAlivesFE bool `long:"no-fk" description:"Disable frontend http keep-alive support"` - DisableKeepAlivesBE bool `long:"no-bk" description:"Disable backend http keep-alive support"` - AllowContentVideo bool `long:"allow-content-video" description:"Additionally allow 'video/*' content"` - AllowContentAudio bool `long:"allow-content-audio" description:"Additionally allow 'audio/*' content"` - AllowCredentialURLs bool `long:"allow-credential-urls" description:"Allow urls to contain user/pass credentials"` - FilterRuleset string `long:"filter-ruleset" description:"Text file containing filtering rules (one per line)"` - ServerName string `long:"server-name" default:"go-camo" description:"Value to use for the HTTP server field"` - ExposeServerVersion bool `long:"expose-server-version" description:"Include the server version in the HTTP server response header"` - EnableXFwdFor bool `long:"enable-xfwd4" description:"Enable x-forwarded-for passthrough/generation"` - Verbose bool `short:"v" long:"verbose" description:"Show verbose (debug) log level output"` - Version []bool `short:"V" long:"version" description:"Print version and exit; specify twice to show license information"` - } - - // parse said flags - _, err := flags.Parse(&opts) - if err != nil { - if e, ok := err.(*flags.Error); ok { - if e.Type == flags.ErrHelp { - os.Exit(0) - } - } - os.Exit(1) - } +type CLI struct { + HMACKey string `name:"key" short:"k" help:"HMAC key"` + AddHeaders []string `name:"header" short:"H" help:"Add additional header to each response. This option can be used multiple times to add multiple headers."` + BindAddress string `name:"listen" default:"0.0.0.0:8080" help:"Address:Port to bind to for HTTP"` + BindAddressSSL string `name:"ssl-listen" help:"Address:Port to bind to for HTTPS/SSL/TLS"` + BindSocket string `name:"socket-listen" help:"Path for unix domain socket to bind to for HTTP"` + EnableQuic bool `name:"quic" help:"Enable http3/quic. Binds to the same port number as ssl-listen but udp+quic."` + SSLKey string `name:"ssl-key" help:"ssl private key (key.pem) path"` + SSLCert string `name:"ssl-cert" help:"ssl cert (cert.pem) path"` + MaxSize int64 `name:"max-size" help:"Max allowed response size (KB)"` + ReqTimeout time.Duration `name:"timeout" default:"4s" help:"Upstream request timeout"` + MaxRedirects int `name:"max-redirects" default:"3" help:"Maximum number of redirects to follow"` + Metrics bool `name:"metrics" help:"Enable Prometheus compatible metrics endpoint"` + NoDebugVars bool `name:"no-debug-vars" help:"Disable the /debug/vars/ metrics endpoint. This option has no effects when the metrics are not enabled."` + NoLogTS bool `name:"no-log-ts" help:"Do not add a timestamp to logging"` + LogJson bool `name:"log-json" help:"Log in JSON format"` + DisableKeepAlivesFE bool `name:"no-fk" help:"Disable frontend http keep-alive support"` + DisableKeepAlivesBE bool `name:"no-bk" help:"Disable backend http keep-alive support"` + AllowContentVideo bool `name:"allow-content-video" help:"Additionally allow 'video/*' content"` + AllowContentAudio bool `name:"allow-content-audio" help:"Additionally allow 'audio/*' content"` + AllowCredentialURLs bool `name:"allow-credential-urls" help:"Allow urls to contain user/pass credentials"` + FilterRuleset string `name:"filter-ruleset" help:"Text file containing filtering rules (one per line)"` + ServerName string `name:"server-name" default:"go-camo" help:"Value to use for the HTTP server field"` + ExposeServerVersion bool `name:"expose-server-version" help:"Include the server version in the HTTP server response header"` + EnableXFwdFor bool `name:"enable-xfwd4" help:"Enable x-forwarded-for passthrough/generation"` + Verbose bool `name:"verbose" short:"v" help:"Show verbose (debug) log level output"` + Version int `name:"version" short:"V" type:"counter" help:"Print version and exit; specify twice to show license information."` +} +func (cli *CLI) Run() { // set the server name - ServerName := opts.ServerName + ServerName := cli.ServerName // setup the server response field - ServerResponse := opts.ServerName + ServerResponse := cli.ServerName // expand/override server response value if showing version is desired - if opts.ExposeServerVersion { + if cli.ExposeServerVersion { ServerResponse = fmt.Sprintf("%s %s", ServerName, ServerVersion) } // setup -V version output - if len(opts.Version) > 0 { + if cli.Version > 0 { fmt.Printf("%s %s (%s,%s-%s)\n", "go-camo", ServerVersion, runtime.Version(), runtime.Compiler, runtime.GOARCH) - if len(opts.Version) > 1 { + if cli.Version > 1 { fmt.Printf("\n%s\n", strings.TrimSpace(licenseText)) } os.Exit(0) @@ -220,43 +208,44 @@ func main() { } // flags override env var - if opts.HMACKey != "" { - config.HMACKey = []byte(opts.HMACKey) + if cli.HMACKey != "" { + config.HMACKey = []byte(cli.HMACKey) } if len(config.HMACKey) == 0 { mlog.Fatal("HMAC key required") } - if opts.BindAddress == "" && opts.BindAddressSSL == "" && opts.BindSocket == "" { + if cli.BindAddress == "" && cli.BindAddressSSL == "" && cli.BindSocket == "" { mlog.Fatal("One of listen or ssl-listen required") } - if opts.BindAddressSSL != "" && opts.SSLKey == "" { + if cli.BindAddressSSL != "" && cli.SSLKey == "" { mlog.Fatal("ssl-key is required when specifying ssl-listen") } - if opts.BindAddressSSL != "" && opts.SSLCert == "" { + if cli.BindAddressSSL != "" && cli.SSLCert == "" { mlog.Fatal("ssl-cert is required when specifying ssl-listen") } - if opts.EnableQuic && opts.BindAddressSSL == "" { + if cli.EnableQuic && cli.BindAddressSSL == "" { mlog.Fatal("ssl-listen is required when specifying quic") } // set keepalive options - config.DisableKeepAlivesBE = opts.DisableKeepAlivesBE - config.DisableKeepAlivesFE = opts.DisableKeepAlivesFE + config.DisableKeepAlivesBE = cli.DisableKeepAlivesBE + config.DisableKeepAlivesFE = cli.DisableKeepAlivesFE // other options - config.EnableXFwdFor = opts.EnableXFwdFor - config.AllowCredentialURLs = opts.AllowCredentialURLs + config.EnableXFwdFor = cli.EnableXFwdFor + config.AllowCredentialURLs = cli.AllowCredentialURLs // additional content types to allow - config.AllowContentVideo = opts.AllowContentVideo - config.AllowContentAudio = opts.AllowContentAudio + config.AllowContentVideo = cli.AllowContentVideo + config.AllowContentAudio = cli.AllowContentAudio var filters []camo.FilterFunc - if opts.FilterRuleset != "" { - filters, err = loadFilterList(opts.FilterRuleset) + if cli.FilterRuleset != "" { + var err error + filters, err = loadFilterList(cli.FilterRuleset) if err != nil { mlog.Fatal("Could not read filter-ruleset", err) } @@ -269,7 +258,8 @@ func main() { "Content-Security-Policy": "default-src 'none'; img-src data:; style-src 'unsafe-inline'", } - for _, v := range opts.AddHeaders { + for _, v := range cli.AddHeaders { + fmt.Println(v) s := strings.SplitN(v, ":", 2) if len(s) != 2 { mlog.Printf("ignoring bad header: '%s'", v) @@ -288,27 +278,27 @@ func main() { // now configure a standard logger mlog.SetFlags(mlog.Lstd) - if opts.NoLogTS { + if cli.NoLogTS { mlog.SetFlags(mlog.Flags() ^ mlog.Ltimestamp) } - if opts.Verbose { + if cli.Verbose { mlog.SetFlags(mlog.Flags() | mlog.Ldebug) mlog.Debug("debug logging enabled") } - if opts.LogJson { + if cli.LogJson { mlog.SetEmitter(&mlog.FormatWriterJSON{}) } // convert from KB to Bytes - config.MaxSize = opts.MaxSize * 1024 - config.RequestTimeout = opts.ReqTimeout - config.MaxRedirects = opts.MaxRedirects + config.MaxSize = cli.MaxSize * 1024 + config.RequestTimeout = cli.ReqTimeout + config.MaxRedirects = cli.MaxRedirects config.ServerName = ServerName // configure metrics collection in camo - if opts.Metrics { + if cli.Metrics { config.CollectMetrics = true } @@ -326,7 +316,7 @@ func main() { mux := http.NewServeMux() // configure router endpoint for rendering metrics - if opts.Metrics { + if cli.Metrics { mlog.Printf("Enabling metrics at /metrics") // Register a version info metric. verOverride := os.Getenv("APP_INFO_VERSION") @@ -349,7 +339,7 @@ func main() { // exvar, as it auto-adds it to the default servemux. Since we want // to avoid it being available that when metrics is not enabled, we add // it in manually only if metrics IS enabled. - if !opts.NoDebugVars { + if !cli.NoDebugVars { mux.Handle("/debug/vars", expvar.Handler()) } mux.Handle("/metrics", promhttp.Handler()) @@ -361,24 +351,24 @@ func main() { var tlsSrv *http.Server var quicSrv *http3.Server - if opts.BindAddress != "" { + if cli.BindAddress != "" { httpSrv = &http.Server{ - Addr: opts.BindAddress, + Addr: cli.BindAddress, ReadTimeout: 30 * time.Second, Handler: mux, } } - if opts.BindAddressSSL != "" { + if cli.BindAddressSSL != "" { tlsSrv = &http.Server{ - Addr: opts.BindAddressSSL, + Addr: cli.BindAddressSSL, ReadTimeout: 30 * time.Second, Handler: mux, } - if opts.EnableQuic { + if cli.EnableQuic { quicSrv = &http3.Server{ - Addr: opts.BindAddressSSL, + Addr: cli.BindAddressSSL, Handler: mux, } // wrap default mux to set some default quic reference headers on tls responses @@ -428,14 +418,14 @@ func main() { close(idleConnsClosed) }() - if opts.BindSocket != "" { - if _, err := os.Stat(opts.BindSocket); err == nil { + if cli.BindSocket != "" { + if _, err := os.Stat(cli.BindSocket); err == nil { mlog.Fatal("Cannot bind to unix socket, file aready exists.") } - mlog.Printf("Starting HTTP server on: unix:%s", opts.BindSocket) + mlog.Printf("Starting HTTP server on: unix:%s", cli.BindSocket) go func() { - ln, err := net.Listen("unix", opts.BindSocket) + ln, err := net.Listen("unix", cli.BindSocket) if err != nil { mlog.Fatal("Error listening on unix socket", err) } @@ -447,7 +437,7 @@ func main() { } if httpSrv != nil { - mlog.Printf("Starting HTTP server on: tcp:%s", opts.BindAddress) + mlog.Printf("Starting HTTP server on: tcp:%s", cli.BindAddress) go func() { if err := httpSrv.ListenAndServe(); err != http.ErrServerClosed { mlog.Fatal(err) @@ -456,18 +446,18 @@ func main() { } if tlsSrv != nil { - mlog.Printf("Starting HTTP/TLS server on: tcp:%s", opts.BindAddressSSL) + mlog.Printf("Starting HTTP/TLS server on: tcp:%s", cli.BindAddressSSL) go func() { - if err := tlsSrv.ListenAndServeTLS(opts.SSLCert, opts.SSLKey); err != http.ErrServerClosed { + if err := tlsSrv.ListenAndServeTLS(cli.SSLCert, cli.SSLKey); err != http.ErrServerClosed { mlog.Fatal(err) } }() } if quicSrv != nil { - mlog.Printf("Starting HTTP3/QUIC server on: udp:%s", opts.BindAddressSSL) + mlog.Printf("Starting HTTP3/QUIC server on: udp:%s", cli.BindAddressSSL) go func() { - if err := quicSrv.ListenAndServeTLS(opts.SSLCert, opts.SSLKey); err != http.ErrServerClosed { + if err := quicSrv.ListenAndServeTLS(cli.SSLCert, cli.SSLKey); err != http.ErrServerClosed { mlog.Fatal(err) } }() @@ -476,3 +466,14 @@ func main() { // just block waiting for closure <-idleConnsClosed } + +func main() { + cli := CLI{} + _ = kong.Parse(&cli, + kong.Name("go-camo"), + kong.Description("An image proxy that proxies non-secure images over SSL/TLS"), + kong.UsageOnError(), + kong.Vars{"version": ServerVersion}, + ) + cli.Run() +} diff --git a/cmd/go-camo/main_vers_gen.go b/cmd/go-camo/main_vers_gen.go index 7f207919..598ddc6a 100644 --- a/cmd/go-camo/main_vers_gen.go +++ b/cmd/go-camo/main_vers_gen.go @@ -11,7 +11,7 @@ https://github.com/cactus/go-camo Portions of this software utilize third party libraries: * Runtime dependencies: ├── github.com/cactus/mlog (MIT license) - ├── github.com/jessevdk/go-flags (BSD license) + ├── github.com/alecthomas/kong (MIT license) ├── github.com/prometheus/client_golang (Apache 2.0) ├── github.com/prometheus/common (Apache 2.0) └── golang.org/x/net (BSD license) diff --git a/cmd/url-tool/main.go b/cmd/url-tool/main.go index cc3ab7f8..323a54c7 100644 --- a/cmd/url-tool/main.go +++ b/cmd/url-tool/main.go @@ -16,6 +16,9 @@ import ( "github.com/alecthomas/kong" ) +// ServerVersion holds the server version string +var ServerVersion = "no-version" + // EncodeCommand holds command options for the encode command type EncodeCmd struct { Base string `name:"base" short:"b" enum:"hex,base64" default:"hex" help:"Encode/Decode base. One of: ${enum}"` @@ -94,7 +97,7 @@ func main() { kong.Name("url-tool"), kong.Description("A simple way to work with signed go-camo URLs from the command line"), kong.UsageOnError(), - kong.Vars{"version": "2.4.7"}, + kong.Vars{"version": ServerVersion}, ) err := ctx.Run(&cli) ctx.FatalIfErrorf(err) diff --git a/go.mod b/go.mod index c8b9727f..2d213156 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/cactus/go-camo/v2 go 1.19 require ( + github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 - github.com/jessevdk/go-flags v1.5.0 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 github.com/quic-go/quic-go v0.40.0 @@ -14,7 +14,6 @@ require ( ) require ( - github.com/alecthomas/kong v0.8.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.2 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 8beb69d4..61ec0a98 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ +github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY= github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= +github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= @@ -22,8 +24,7 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5XqmmYsTLzJp/TO9Lhy39gkverk= github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= @@ -75,7 +76,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 86c77896ce2d60a3c45ceff4915958af6b7c2e08 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 15:08:21 -0800 Subject: [PATCH 054/128] minor refactor --- cmd/go-camo/main.go | 83 ---------------------------- cmd/go-camo/main_loadfilters.go | 97 +++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 83 deletions(-) create mode 100644 cmd/go-camo/main_loadfilters.go diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index d52223ae..6b24da50 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -6,13 +6,11 @@ package main import ( - "bufio" "context" "expvar" "fmt" "net" "net/http" - "net/url" "os" "os/signal" "runtime" @@ -22,7 +20,6 @@ import ( "github.com/alecthomas/kong" "github.com/cactus/go-camo/v2/pkg/camo" - "github.com/cactus/go-camo/v2/pkg/htrie" "github.com/cactus/go-camo/v2/pkg/router" "github.com/cactus/mlog" @@ -68,86 +65,6 @@ var ( ) ) -func loadFilterList(fname string) ([]camo.FilterFunc, error) { - // #nosec - file, err := os.Open(fname) - if err != nil { - return nil, fmt.Errorf("could not open filter-ruleset file: %s", err) - } - // #nosec - defer file.Close() - - allowFilter := htrie.NewURLMatcher() - denyFilter := htrie.NewURLMatcher() - hasAllow := false - hasDeny := false - - scanner := bufio.NewScanner(file) - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) - - if strings.HasPrefix(line, "allow|") { - line = strings.TrimPrefix(line, "allow") - err = allowFilter.AddRule(line) - if err != nil { - break - } - hasAllow = true - } else if strings.HasPrefix(line, "deny|") { - line = strings.TrimPrefix(line, "deny") - err = denyFilter.AddRule(line) - if err != nil { - break - } - hasDeny = true - } else { - fmt.Println("ignoring line: ", line) - } - - err = scanner.Err() - if err != nil { - break - } - } - if err != nil { - return nil, fmt.Errorf("error building filter ruleset: %s", err) - } - - // append in order. allow first, then deny filters. - // first false value aborts the request. - filterFuncs := make([]camo.FilterFunc, 0) - - if hasAllow { - filterFuncs = append(filterFuncs, allowFilter.CheckURL) - } - - // denyFilter returns true on a match. we want to invert this for a deny rule, so - // any deny rule match should return true, and anything _not_ matching should return false - // so just wrap and invert the bool. - if hasDeny { - denyF := func(u *url.URL) (bool, error) { - chk, err := denyFilter.CheckURL(u) - return !chk, err - } - filterFuncs = append(filterFuncs, denyF) - } - - if hasAllow && hasDeny { - mlog.Print( - strings.Join( - []string{ - "Warning! Allow and Deny rules both supplied.", - "Having Allow rules means anything not matching an allow rule is denied.", - "THEN deny rules are evaluated. Be sure this is what you want!", - }, - " ", - ), - ) - } - - return filterFuncs, nil -} - type CLI struct { HMACKey string `name:"key" short:"k" help:"HMAC key"` AddHeaders []string `name:"header" short:"H" help:"Add additional header to each response. This option can be used multiple times to add multiple headers."` diff --git a/cmd/go-camo/main_loadfilters.go b/cmd/go-camo/main_loadfilters.go new file mode 100644 index 00000000..b6427864 --- /dev/null +++ b/cmd/go-camo/main_loadfilters.go @@ -0,0 +1,97 @@ +// Copyright (c) 2012-2019 Eli Janssen +// Use of this source code is governed by an MIT-style +// license that can be found in the LICENSE file. + +package main + +import ( + "bufio" + "fmt" + "net/url" + "os" + "strings" + + "github.com/cactus/go-camo/v2/pkg/camo" + "github.com/cactus/go-camo/v2/pkg/htrie" + "github.com/cactus/mlog" +) + +func loadFilterList(fname string) ([]camo.FilterFunc, error) { + // #nosec + file, err := os.Open(fname) + if err != nil { + return nil, fmt.Errorf("could not open filter-ruleset file: %s", err) + } + // #nosec + defer file.Close() + + allowFilter := htrie.NewURLMatcher() + denyFilter := htrie.NewURLMatcher() + hasAllow := false + hasDeny := false + + scanner := bufio.NewScanner(file) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + + if strings.HasPrefix(line, "allow|") { + line = strings.TrimPrefix(line, "allow") + err = allowFilter.AddRule(line) + if err != nil { + break + } + hasAllow = true + } else if strings.HasPrefix(line, "deny|") { + line = strings.TrimPrefix(line, "deny") + err = denyFilter.AddRule(line) + if err != nil { + break + } + hasDeny = true + } else { + fmt.Println("ignoring line: ", line) + } + + err = scanner.Err() + if err != nil { + break + } + } + if err != nil { + return nil, fmt.Errorf("error building filter ruleset: %s", err) + } + + // append in order. allow first, then deny filters. + // first false value aborts the request. + filterFuncs := make([]camo.FilterFunc, 0) + + if hasAllow { + filterFuncs = append(filterFuncs, allowFilter.CheckURL) + } + + // denyFilter returns true on a match. we want to invert this for a deny rule, so + // any deny rule match should return true, and anything _not_ matching should return false + // so just wrap and invert the bool. + if hasDeny { + denyF := func(u *url.URL) (bool, error) { + chk, err := denyFilter.CheckURL(u) + return !chk, err + } + filterFuncs = append(filterFuncs, denyF) + } + + if hasAllow && hasDeny { + mlog.Print( + strings.Join( + []string{ + "Warning! Allow and Deny rules both supplied.", + "Having Allow rules means anything not matching an allow rule is denied.", + "THEN deny rules are evaluated. Be sure this is what you want!", + }, + " ", + ), + ) + } + + return filterFuncs, nil +} From ef2ab00d4deef26d21146a489a6f3db436ecff4a Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 15:10:22 -0800 Subject: [PATCH 055/128] update copyright dates and minor formatting --- cmd/go-camo/main.go | 2 +- cmd/go-camo/main_loadfilters.go | 2 +- cmd/go-camo/main_vers_gen.go | 2 +- cmd/url-tool/main.go | 2 +- examples/go-base64.go | 2 +- examples/python3-base64-filtering.py | 2 +- examples/python3-base64.py | 2 +- examples/ruby-base64.rb | 2 +- pkg/camo/encoding/url.go | 2 +- pkg/camo/encoding/url_test.go | 62 ++++++++++++++++-------- pkg/camo/helpers_test.go | 3 +- pkg/camo/log.go | 2 +- pkg/camo/metrics.go | 8 +-- pkg/camo/misc.go | 2 +- pkg/camo/proxy.go | 2 +- pkg/camo/proxy_filter_test.go | 5 +- pkg/camo/proxy_test.go | 4 +- pkg/camo/proxy_timeout_test.go | 7 ++- pkg/camo/upstream_proxy.go | 2 +- pkg/camo/upstream_proxy_test.go | 2 +- pkg/camo/vars.go | 2 +- pkg/htrie/glob_path_chk.go | 2 +- pkg/htrie/glob_path_chk_printer_test.go | 2 +- pkg/htrie/glob_path_chk_test.go | 10 ++-- pkg/htrie/glob_path_node.go | 2 +- pkg/htrie/glob_path_node_printer_test.go | 2 +- pkg/htrie/htrie.go | 2 +- pkg/htrie/htrie_printer_test.go | 3 +- pkg/htrie/htrie_test.go | 6 +-- pkg/router/httpdate.go | 2 +- pkg/router/httpdate_test.go | 2 +- pkg/router/router.go | 2 +- 32 files changed, 85 insertions(+), 69 deletions(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 6b24da50..4ddb28ab 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/cmd/go-camo/main_loadfilters.go b/cmd/go-camo/main_loadfilters.go index b6427864..343694d8 100644 --- a/cmd/go-camo/main_loadfilters.go +++ b/cmd/go-camo/main_loadfilters.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/cmd/go-camo/main_vers_gen.go b/cmd/go-camo/main_vers_gen.go index 598ddc6a..b4330aaa 100644 --- a/cmd/go-camo/main_vers_gen.go +++ b/cmd/go-camo/main_vers_gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/cmd/url-tool/main.go b/cmd/url-tool/main.go index 323a54c7..c06a2fde 100644 --- a/cmd/url-tool/main.go +++ b/cmd/url-tool/main.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/examples/go-base64.go b/examples/go-base64.go index 2f996b0d..d9d67a16 100644 --- a/examples/go-base64.go +++ b/examples/go-base64.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/examples/python3-base64-filtering.py b/examples/python3-base64-filtering.py index ee7fbaab..7fa49fc0 100644 --- a/examples/python3-base64-filtering.py +++ b/examples/python3-base64-filtering.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2019 Eli Janssen +# Copyright (c) 2012-2023 Eli Janssen # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file. diff --git a/examples/python3-base64.py b/examples/python3-base64.py index f3eb063d..c420d886 100644 --- a/examples/python3-base64.py +++ b/examples/python3-base64.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2019 Eli Janssen +# Copyright (c) 2012-2023 Eli Janssen # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file. diff --git a/examples/ruby-base64.rb b/examples/ruby-base64.rb index 66bdebf7..0aea5839 100644 --- a/examples/ruby-base64.rb +++ b/examples/ruby-base64.rb @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2019 Eli Janssen +# Copyright (c) 2012-2023 Eli Janssen # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file. diff --git a/pkg/camo/encoding/url.go b/pkg/camo/encoding/url.go index d9c702df..8cee04db 100644 --- a/pkg/camo/encoding/url.go +++ b/pkg/camo/encoding/url.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/camo/encoding/url_test.go b/pkg/camo/encoding/url_test.go index e695dea0..18a6609c 100644 --- a/pkg/camo/encoding/url_test.go +++ b/pkg/camo/encoding/url_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -22,14 +22,18 @@ type enctesto struct { var enctests = []enctesto{ // hex - {HexEncodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", + { + HexEncodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", "687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67", - "http://golang.org/doc/gopher/frontpage.png"}, + "http://golang.org/doc/gopher/frontpage.png", + }, // base64 - {B64EncodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", + { + B64EncodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", "aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n", - "http://golang.org/doc/gopher/frontpage.png"}, + "http://golang.org/doc/gopher/frontpage.png", + }, } func TestEncoder(t *testing.T) { @@ -52,14 +56,18 @@ type dectesto struct { var dectests = []dectesto{ // hex - {HexDecodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", + { + HexDecodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", "687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67", - "http://golang.org/doc/gopher/frontpage.png"}, + "http://golang.org/doc/gopher/frontpage.png", + }, // base64 - {B64DecodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", + { + B64DecodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", "aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n", - "http://golang.org/doc/gopher/frontpage.png"}, + "http://golang.org/doc/gopher/frontpage.png", + }, } func TestDecoder(t *testing.T) { @@ -116,27 +124,39 @@ func BenchmarkGuessingDecoderB64(b *testing.B) { var baddectests = []dectesto{ // hex - {HexDecodeURL, "test", "000", - "687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67", ""}, - {HexDecodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", - "000000000000000000000000000000000000000000000000000000000000000000000000000000000000", ""}, + { + HexDecodeURL, "test", "000", + "687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67", "", + }, + { + HexDecodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "", + }, // base64 - {B64DecodeURL, "test", "000", - "aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n", ""}, - {B64DecodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", - "00000000000000000000000000000000000000000000000000000000", ""}, + { + B64DecodeURL, "test", "000", + "aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n", "", + }, + { + B64DecodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", + "00000000000000000000000000000000000000000000000000000000", "", + }, // mixmatch // hex - {HexDecodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", + { + HexDecodeURL, "test", "0f6def1cb147b0e84f39cbddc5ea10c80253a6f3", "aHR0cDovL2dvbGFuZy5vcmcvZG9jL2dvcGhlci9mcm9udHBhZ2UucG5n", - "http://golang.org/doc/gopher/frontpage.png"}, + "http://golang.org/doc/gopher/frontpage.png", + }, // base64 - {B64DecodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", + { + B64DecodeURL, "test", "D23vHLFHsOhPOcvdxeoQyAJTpvM", "687474703a2f2f676f6c616e672e6f72672f646f632f676f706865722f66726f6e74706167652e706e67", - "http://golang.org/doc/gopher/frontpage.png"}, + "http://golang.org/doc/gopher/frontpage.png", + }, } func TestBadDecodes(t *testing.T) { diff --git a/pkg/camo/helpers_test.go b/pkg/camo/helpers_test.go index 25ec2e8a..de5ddabe 100644 --- a/pkg/camo/helpers_test.go +++ b/pkg/camo/helpers_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -82,7 +82,6 @@ func bodyAssert(t *testing.T, expected string, resp *http.Response) { "Expected 404 response body but got '%s' instead", bodyString, ) - } func headerAssert(t *testing.T, expected, name string, resp *http.Response) { diff --git a/pkg/camo/log.go b/pkg/camo/log.go index 31ac7f5a..4b39f071 100644 --- a/pkg/camo/log.go +++ b/pkg/camo/log.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/camo/metrics.go b/pkg/camo/metrics.go index 3afce698..a457cf6f 100644 --- a/pkg/camo/metrics.go +++ b/pkg/camo/metrics.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -12,8 +12,10 @@ import ( ) // Namespace used for Prometheus metrics. -const MetricNamespace = "camo" -const MetricSubsystem = "proxy" +const ( + MetricNamespace = "camo" + MetricSubsystem = "proxy" +) var ( contentLengthExceeded = promauto.NewCounter( diff --git a/pkg/camo/misc.go b/pkg/camo/misc.go index f678103c..b3ceabb4 100644 --- a/pkg/camo/misc.go +++ b/pkg/camo/misc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index e4646000..8c49631f 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/camo/proxy_filter_test.go b/pkg/camo/proxy_filter_test.go index bfe493e2..e8962a1d 100644 --- a/pkg/camo/proxy_filter_test.go +++ b/pkg/camo/proxy_filter_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -60,7 +60,7 @@ func TestFilterListMatrixMultiples(t *testing.T) { err error } - var mixtests = []struct { + mixtests := []struct { filterRuleAnswers []chkResponse expectedCallMatrix []bool respcode int @@ -141,7 +141,6 @@ func TestFilterListMatrixMultiples(t *testing.T) { "filter func called='%t' wanted '%t'", callMatrix[i], tt.expectedCallMatrix[i], )) - } } } diff --git a/pkg/camo/proxy_test.go b/pkg/camo/proxy_test.go index 5006e5cf..654e3ac4 100644 --- a/pkg/camo/proxy_test.go +++ b/pkg/camo/proxy_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -221,7 +221,7 @@ func TestVideoContentTypeAllowed(t *testing.T) { // bump limit, try again (should succeed) camoConfigWithVideo.MaxSize = 5000 * 1024 _, err = makeTestReq(testURL, 200, camoConfigWithVideo) - //fmt.Println(err) + // fmt.Println(err) assert.Check(t, err) } diff --git a/pkg/camo/proxy_timeout_test.go b/pkg/camo/proxy_timeout_test.go index a24c3562..37d1c679 100644 --- a/pkg/camo/proxy_timeout_test.go +++ b/pkg/camo/proxy_timeout_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -40,7 +40,6 @@ func TestTimeout(t *testing.T) { r.Close = true _, err := w.Write([]byte("ok")) assert.Check(t, err) - })) defer ts.Close() @@ -132,7 +131,7 @@ func TestClientCancelEarly(t *testing.T) { assert.Check(t, err) conn.Close() time.Sleep(100 * time.Millisecond) - //fmt.Printf("done\n") + // fmt.Printf("done\n") } func TestClientCancelLate(t *testing.T) { @@ -210,7 +209,7 @@ func TestClientCancelLate(t *testing.T) { } } conn.Close() - //fmt.Printf("done\n") + // fmt.Printf("done\n") } func TestServerEarlyEOF(t *testing.T) { diff --git a/pkg/camo/upstream_proxy.go b/pkg/camo/upstream_proxy.go index 557d7e37..967a6ad5 100644 --- a/pkg/camo/upstream_proxy.go +++ b/pkg/camo/upstream_proxy.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/camo/upstream_proxy_test.go b/pkg/camo/upstream_proxy_test.go index 85a8a55f..95ecff81 100644 --- a/pkg/camo/upstream_proxy_test.go +++ b/pkg/camo/upstream_proxy_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/camo/vars.go b/pkg/camo/vars.go index 2687196a..3c7d99c1 100644 --- a/pkg/camo/vars.go +++ b/pkg/camo/vars.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/htrie/glob_path_chk.go b/pkg/htrie/glob_path_chk.go index 6178e68b..b3dc20eb 100644 --- a/pkg/htrie/glob_path_chk.go +++ b/pkg/htrie/glob_path_chk.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/htrie/glob_path_chk_printer_test.go b/pkg/htrie/glob_path_chk_printer_test.go index aa251753..628bef92 100644 --- a/pkg/htrie/glob_path_chk_printer_test.go +++ b/pkg/htrie/glob_path_chk_printer_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/htrie/glob_path_chk_test.go b/pkg/htrie/glob_path_chk_test.go index 0ac8f658..a25fa919 100644 --- a/pkg/htrie/glob_path_chk_test.go +++ b/pkg/htrie/glob_path_chk_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -53,7 +53,7 @@ func TestGlobPathChecker(t *testing.T) { assert.Check(t, err) } - //fmt.Println(gpc.RenderTree()) + // fmt.Println(gpc.RenderTree()) for _, u := range testMatch { u, _ := url.Parse(u) @@ -105,7 +105,7 @@ func TestGlobPathCheckerPathsMisc(t *testing.T) { assert.Check(t, err) } - //fmt.Println(gpc.RenderTree()) + // fmt.Println(gpc.RenderTree()) for _, u := range testMatch { assert.Check(t, gpc.CheckPath(u), fmt.Sprintf("should have matched: %s", u)) @@ -148,9 +148,7 @@ func BenchmarkGlobPathChecker(b *testing.B) { assert.Check(b, err) } - var ( - testIters = 10000 - ) + testIters := 10000 // avoid inlining optimization var x bool diff --git a/pkg/htrie/glob_path_node.go b/pkg/htrie/glob_path_node.go index e84a504a..9fcfd207 100644 --- a/pkg/htrie/glob_path_node.go +++ b/pkg/htrie/glob_path_node.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/htrie/glob_path_node_printer_test.go b/pkg/htrie/glob_path_node_printer_test.go index 30a4fb73..ee17a496 100644 --- a/pkg/htrie/glob_path_node_printer_test.go +++ b/pkg/htrie/glob_path_node_printer_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/htrie/htrie.go b/pkg/htrie/htrie.go index 6b3eb80b..52f12803 100644 --- a/pkg/htrie/htrie.go +++ b/pkg/htrie/htrie.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/htrie/htrie_printer_test.go b/pkg/htrie/htrie_printer_test.go index da109dd8..f98e567a 100644 --- a/pkg/htrie/htrie_printer_test.go +++ b/pkg/htrie/htrie_printer_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -29,7 +29,6 @@ func (dt *URLMatcher) printTree(stree treeprint.Tree) { subTree := stree.AddBranch(k) v.printTree(subTree) } - } func (dt *URLMatcher) RenderTree() string { diff --git a/pkg/htrie/htrie_test.go b/pkg/htrie/htrie_test.go index 31e05e0e..db1c2a25 100644 --- a/pkg/htrie/htrie_test.go +++ b/pkg/htrie/htrie_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. @@ -54,7 +54,7 @@ func TestHTrieCheckURL(t *testing.T) { assert.Check(t, err) } - //fmt.Println(dt.RenderTree()) + // fmt.Println(dt.RenderTree()) for _, u := range testMatch { u, _ := url.Parse(u) @@ -113,7 +113,7 @@ func TestHTrieCheckHostname(t *testing.T) { } } - //fmt.Println(dt.RenderTree()) + // fmt.Println(dt.RenderTree()) for _, u := range testMatch { u, _ := url.Parse(u) diff --git a/pkg/router/httpdate.go b/pkg/router/httpdate.go index 74798012..68567074 100644 --- a/pkg/router/httpdate.go +++ b/pkg/router/httpdate.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/router/httpdate_test.go b/pkg/router/httpdate_test.go index e445cd8b..d9111338 100644 --- a/pkg/router/httpdate_test.go +++ b/pkg/router/httpdate_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. diff --git a/pkg/router/router.go b/pkg/router/router.go index 4988f28e..2ad659b5 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2019 Eli Janssen +// Copyright (c) 2012-2023 Eli Janssen // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. From 9ab4f2551c8c583c724920843f576f6f6ee1aff1 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 12 Nov 2023 15:16:39 -0800 Subject: [PATCH 056/128] update documentation --- README.adoc | 75 +++++++++++++++++++++++----------------------- man/go-camo.1.adoc | 3 ++ 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/README.adoc b/README.adoc index df525867..59fa1bd6 100644 --- a/README.adoc +++ b/README.adoc @@ -282,42 +282,43 @@ More generally, it is recommended to either: [source,text] ---- $ go-camo -h -Usage: - go-camo [OPTIONS] - -Application Options: - -k, --key= HMAC key - -H, --header= Add additional header to each response. This option can - be used multiple times to add multiple headers - --listen= Address:Port to bind to for HTTP (default: 0.0.0.0:8080) - --ssl-listen= Address:Port to bind to for HTTPS/SSL/TLS - --socket-listen= Path for unix domain socket to bind to for HTTP - --ssl-key= ssl private key (key.pem) path - --ssl-cert= ssl cert (cert.pem) path - --max-size= Max allowed response size (KB) - --timeout= Upstream request timeout (default: 4s) - --max-redirects= Maximum number of redirects to follow (default: 3) - --metrics Enable Prometheus compatible metrics endpoint - --no-debug-vars Disable the /debug/vars/ metrics endpoint. This - option has no effects when the metrics are not enabled - --no-log-ts Do not add a timestamp to logging - --log-json Log in JSON format - --no-fk Disable frontend http keep-alive support - --no-bk Disable backend http keep-alive support - --allow-content-video Additionally allow 'video/*' content - --allow-content-audio Additionally allow 'audio/*' content - --allow-credential-urls Allow URLs to contain user/pass credentials - --filter-ruleset= Text file containing filtering rules (one per line) - --server-name= Value to use for the HTTP server field (default: go-camo) - --expose-server-version Include the server version in the HTTP server response - header - --enable-xfwd4 Enable x-forwarded-for passthrough/generation - -v, --verbose Show verbose (debug) log level output - -V, --version Print version and exit; specify twice to show license - information - -Help Options: - -h, --help Show this help message +Usage: go-camo + +An image proxy that proxies non-secure images over SSL/TLS + +Flags: + -h, --help Show context-sensitive help. + -k, --key=STRING HMAC key + -H, --header=HEADER,... Add additional header to each response. This option can + be used multiple times to add multiple headers. + --listen="0.0.0.0:8080" Address:Port to bind to for HTTP + --ssl-listen=STRING Address:Port to bind to for HTTPS/SSL/TLS + --socket-listen=STRING Path for unix domain socket to bind to for HTTP + --quic Enable http3/quic. Binds to the same port number as + ssl-listen but udp+quic. + --ssl-key=STRING ssl private key (key.pem) path + --ssl-cert=STRING ssl cert (cert.pem) path + --max-size=INT-64 Max allowed response size (KB) + --timeout=4s Upstream request timeout + --max-redirects=3 Maximum number of redirects to follow + --metrics Enable Prometheus compatible metrics endpoint + --no-debug-vars Disable the /debug/vars/ metrics endpoint. This option has + no effects when the metrics are not enabled. + --no-log-ts Do not add a timestamp to logging + --log-json Log in JSON format + --no-fk Disable frontend http keep-alive support + --no-bk Disable backend http keep-alive support + --allow-content-video Additionally allow 'video/*' content + --allow-content-audio Additionally allow 'audio/*' content + --allow-credential-urls Allow urls to contain user/pass credentials + --filter-ruleset=STRING Text file containing filtering rules (one per line) + --server-name="go-camo" Value to use for the HTTP server field + --expose-server-version Include the server version in the HTTP server response + header + --enable-xfwd4 Enable x-forwarded-for passthrough/generation + -v, --verbose Show verbose (debug) log level output + -V, --version Print version and exit; specify twice to show + license information. ---- A few notes about specific flags: @@ -403,7 +404,7 @@ by default, you could add this to the command line: [source,text] ---- --H "Strict-Transport-Security: max-age=16070400" +-H "Strict-Transport-Security: max-age=16070400" ---- -- diff --git a/man/go-camo.1.adoc b/man/go-camo.1.adoc index 25b3f549..49207a81 100644 --- a/man/go-camo.1.adoc +++ b/man/go-camo.1.adoc @@ -89,6 +89,9 @@ See __<>__ for more info. Path to ssl certificate. + Default: `cert.pem` +*--quic*:: + Enable http3/quic. Binds to the same port number as _--ssl-listen_ but udp+quic. + *--max-size*=<__SIZE__>:: Max response size allowed in KB. Set to `0` to disable size restriction. + Default: `0` From 4838a51be23671c409f995858d14db4723c65e9e Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 13 Nov 2023 13:33:58 -0800 Subject: [PATCH 057/128] update changelog --- CHANGELOG.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 245eaf0c..e9ba6897 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,7 +19,7 @@ toc::[] == HEAD -== v2.4.7 - 2023-11-12 +== v2.4.7 - 2023-11-13 * Add http3/quic server support. New flag `--quic`. Requires `--ssl-listen`. == v2.4.6 - 2023-10-25 From e1c9c684e1428b03d7f96a5e23965e157be49ea0 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 13 Nov 2023 13:37:52 -0800 Subject: [PATCH 058/128] fix github ci workflow --- .github/workflows/publish-github.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index 1bd3c773..bdd940f0 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -19,7 +19,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 1 - fetch-tags: true - name: Setup Go uses: actions/setup-go@v4 From 31437687e82430d20ff4ec6096799cb0faf1660b Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 13 Nov 2023 13:58:17 -0800 Subject: [PATCH 059/128] update readme to point to github container registry as well --- README.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 59fa1bd6..094d1dc3 100644 --- a/README.adoc +++ b/README.adoc @@ -24,7 +24,8 @@ endif::[] :link-heroku-buildpack-go: https://github.com/kr/heroku-buildpack-go :link-dns-rebinding: https://en.wikipedia.org/wiki/DNS_rebinding[dns rebinding] :link-ip6-special-addresses: https://en.wikipedia.org/wiki/IPv6_address#Special_addresses -:link-containers: https://hub.docker.com/r/cactus4docker/go-camo[containers] +:link-docker-containers: https://hub.docker.com/r/cactus4docker/go-camo[docker hub] +:link-github-containers: https://github.com/cactus/go-camo/pkgs/container/go-camo[github packages] :link-releases: https://github.com/cactus/go-camo/releases[binary releases] :link-mit-license: https://www.opensource.org/licenses/mit-license.php[MIT license] :link-mrsaints: https://github.com/MrSaints[MrSaints] @@ -532,7 +533,7 @@ http://golang.org/doc/gopher/frontpage.png == Containers -There are {link-containers} built automatically from version tags. +There are containers built automatically from version tags, pushed to both {link-docker-containers} and {link-github-containers}. These containers are untested and provided only for those with specific containerization requirements. From d59fada4885572dc5d6ef6d196a046b998c585fe Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 15 Nov 2023 10:10:56 -0800 Subject: [PATCH 060/128] fieldalignment optimizations --- pkg/camo/proxy.go | 4 ++-- pkg/camo/upstream_proxy.go | 2 +- pkg/router/router.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index 8c49631f..070929ef 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -30,10 +30,10 @@ import ( // Config holds configuration data used when creating a Proxy with New. type Config struct { - // HMACKey is a byte slice to be used as the hmac key - HMACKey []byte // Server name used in Headers and Via checks ServerName string + // HMACKey is a byte slice to be used as the hmac key + HMACKey []byte // MaxSize is the maximum valid image size response (in bytes). MaxSize int64 // MaxRedirects is the maximum number of redirects to follow. diff --git a/pkg/camo/upstream_proxy.go b/pkg/camo/upstream_proxy.go index 967a6ad5..7c2bdc30 100644 --- a/pkg/camo/upstream_proxy.go +++ b/pkg/camo/upstream_proxy.go @@ -15,10 +15,10 @@ import ( ) type innerUpstreamProxyConfig struct { - addresses []net.IP scheme string host string port string + addresses []net.IP } func (ic *innerUpstreamProxyConfig) matchesIP(ip net.IP, port string) bool { diff --git a/pkg/router/router.go b/pkg/router/router.go index 2ad659b5..2679df9b 100644 --- a/pkg/router/router.go +++ b/pkg/router/router.go @@ -11,9 +11,9 @@ import ( // DumbRouter is a basic, special purpose, http router type DumbRouter struct { - ServerName string CamoHandler http.Handler AddHeaders map[string]string + ServerName string } // SetHeaders sets the headers on the response From 4e9a6a3a9908b72f72fadd80aabe5e3222572158 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 26 Nov 2023 15:21:09 -0800 Subject: [PATCH 061/128] add automaxprocs flag --- CHANGELOG.adoc | 2 ++ README.adoc | 2 ++ cmd/go-camo/main.go | 6 ++++++ go.mod | 1 + go.sum | 3 +++ man/go-camo.1.adoc | 3 +++ 6 files changed, 17 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index e9ba6897..7fbda23a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,8 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD +* Add `--automaxprocs` flag to set GOMAXPROCS automatically to match Linux + container CPU quota/limits. == v2.4.7 - 2023-11-13 * Add http3/quic server support. New flag `--quic`. Requires `--ssl-listen`. diff --git a/README.adoc b/README.adoc index 094d1dc3..5b5e7894 100644 --- a/README.adoc +++ b/README.adoc @@ -297,6 +297,8 @@ Flags: --socket-listen=STRING Path for unix domain socket to bind to for HTTP --quic Enable http3/quic. Binds to the same port number as ssl-listen but udp+quic. + --automaxprocs Set GOMAXPROCS automatically to match Linux container CPU + quota/limits. --ssl-key=STRING ssl private key (key.pem) path --ssl-cert=STRING ssl cert (cert.pem) path --max-size=INT-64 Max allowed response size (KB) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 4ddb28ab..4cc2c5e5 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -28,6 +28,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/version" "github.com/quic-go/quic-go/http3" + "go.uber.org/automaxprocs/maxprocs" ) const metricNamespace = "camo" @@ -72,6 +73,7 @@ type CLI struct { BindAddressSSL string `name:"ssl-listen" help:"Address:Port to bind to for HTTPS/SSL/TLS"` BindSocket string `name:"socket-listen" help:"Path for unix domain socket to bind to for HTTP"` EnableQuic bool `name:"quic" help:"Enable http3/quic. Binds to the same port number as ssl-listen but udp+quic."` + AutoMaxProcs bool `name:"automaxprocs" help:"Set GOMAXPROCS automatically to match Linux container CPU quota/limits."` SSLKey string `name:"ssl-key" help:"ssl private key (key.pem) path"` SSLCert string `name:"ssl-cert" help:"ssl cert (cert.pem) path"` MaxSize int64 `name:"max-size" help:"Max allowed response size (KB)"` @@ -204,6 +206,10 @@ func (cli *CLI) Run() { mlog.Debug("debug logging enabled") } + if cli.AutoMaxProcs { + maxprocs.Set(maxprocs.Logger(mlog.Infof)) + } + if cli.LogJson { mlog.SetEmitter(&mlog.FormatWriterJSON{}) } diff --git a/go.mod b/go.mod index 2d213156..869ae5fa 100644 --- a/go.mod +++ b/go.mod @@ -26,6 +26,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect + go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/mock v0.3.0 // indirect golang.org/x/crypto v0.15.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect diff --git a/go.sum b/go.sum index 61ec0a98..7d6b15ea 100644 --- a/go.sum +++ b/go.sum @@ -50,9 +50,12 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= +go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/man/go-camo.1.adoc b/man/go-camo.1.adoc index 49207a81..6fe9897e 100644 --- a/man/go-camo.1.adoc +++ b/man/go-camo.1.adoc @@ -92,6 +92,9 @@ See __<>__ for more info. *--quic*:: Enable http3/quic. Binds to the same port number as _--ssl-listen_ but udp+quic. +*--automaxprocs*:: + Set GOMAXPROCS automatically to match Linux container CPU quota/limits. + *--max-size*=<__SIZE__>:: Max response size allowed in KB. Set to `0` to disable size restriction. + Default: `0` From c6414927eb48c919f6ad61987db9cf102b0fc69c Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 26 Nov 2023 15:41:49 -0800 Subject: [PATCH 062/128] silence check error --- cmd/go-camo/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 4cc2c5e5..d7b3c978 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -207,7 +207,7 @@ func (cli *CLI) Run() { } if cli.AutoMaxProcs { - maxprocs.Set(maxprocs.Logger(mlog.Infof)) + maxprocs.Set(maxprocs.Logger(mlog.Infof)) // #nosec G104 } if cli.LogJson { From f1cc28a699c39712493779ca2814fdcae57fd625 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 01:42:18 +0000 Subject: [PATCH 063/128] Bump golang.org/x/net from 0.18.0 to 0.19.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.18.0 to 0.19.0. - [Commits](https://github.com/golang/net/compare/v0.18.0...v0.19.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 869ae5fa..4478b550 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,8 @@ require ( github.com/prometheus/common v0.45.0 github.com/quic-go/quic-go v0.40.0 github.com/xlab/treeprint v1.2.0 - golang.org/x/net v0.18.0 + go.uber.org/automaxprocs v1.5.3 + golang.org/x/net v0.19.0 gotest.tools/v3 v3.5.1 ) @@ -26,12 +27,11 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect - go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/mock v0.3.0 // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/go.sum b/go.sum index 7d6b15ea..7d551200 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,7 @@ github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= @@ -48,7 +49,6 @@ github.com/quic-go/quic-go v0.40.0 h1:GYd1iznlKm7dpHD7pOVpUvItgMPo/jrMgDWZhMCecq github.com/quic-go/quic-go v0.40.0/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= @@ -61,8 +61,8 @@ go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -73,8 +73,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -83,8 +83,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= From 31cdfd420a98e3ba02bdaf26077053a02485372c Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 6 Dec 2023 19:27:56 -0800 Subject: [PATCH 064/128] bump deps --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 4478b550..b79c942a 100644 --- a/go.mod +++ b/go.mod @@ -20,19 +20,19 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect + github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/onsi/ginkgo/v2 v2.13.1 // indirect + github.com/onsi/ginkgo/v2 v2.13.2 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.3.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/tools v0.16.0 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index 7d551200..8c158906 100644 --- a/go.sum +++ b/go.sum @@ -22,13 +22,13 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a h1:fEBsGL/sjAuJrgah5XqmmYsTLzJp/TO9Lhy39gkverk= -github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 h1:PxlBVtIFHR/mtWk2i0gTEdCz+jBnqiuHNSki0epDbVs= +github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/onsi/ginkgo/v2 v2.13.1 h1:LNGfMbR2OVGBfXjvRZIZ2YCTQdGKtPLvuI1rMCCj3OU= -github.com/onsi/ginkgo/v2 v2.13.1/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= +github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= +github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -63,8 +63,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= +golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -98,8 +98,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= From a0abbc3071452c829e19fcb2433dcf10f8e1a4c7 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 12 Dec 2023 10:27:31 -0800 Subject: [PATCH 065/128] add VERSION and GITHASH metadata to docker image --- .github/workflows/publish-docker.yml | 12 +++++++++--- .github/workflows/publish-github.yml | 9 ++++++++- examples/Dockerfile | 2 ++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index e0137fc8..040afc27 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -37,11 +37,17 @@ jobs: - name: Build Container if: success() + env: + DOCKER_BUILDKIT: 1 run: | TAG=$(git describe --tags) - docker build -f examples/Dockerfile -t cactus4docker/go-camo:${TAG} . - # also tag as latest? - # docker tag cactus4docker/go-camo:${TAG} cactus4docker/go-camo:latest + GITHASH="$(git rev-parse HEAD)" + docker build \ + --build-arg GITHASH=${GITHASH} \ + --build-arg VERSION=${TAG} \ + -f examples/Dockerfile \ + -t cactus4docker/go-camo:${TAG} \ + . - name: Publish Container if: success() diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index bdd940f0..3480309c 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -8,6 +8,7 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} + DOCKER_BUILDKIT: 1 jobs: build: @@ -43,7 +44,13 @@ jobs: if: success() run: | TAG=$(git describe --tags) - docker build -f examples/Dockerfile -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} . + GITHASH="$(git rev-parse HEAD)" + docker build \ + --build-arg GITHASH=${GITHASH} \ + --build-arg VERSION=${TAG} \ + -f examples/Dockerfile \ + -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} \ + . - name: Publish Container if: success() diff --git a/examples/Dockerfile b/examples/Dockerfile index 168f8b37..e342133e 100644 --- a/examples/Dockerfile +++ b/examples/Dockerfile @@ -1,5 +1,7 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates +ARG GITHASH +ARG VERSION COPY build/bin/* /bin/ EXPOSE 8080/tcp USER nobody From 7132c2dcb90eb31370a75c377ad1c2d271321459 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 14 Dec 2023 09:27:22 -0800 Subject: [PATCH 066/128] add prof flag to enable http/pprof --- cmd/go-camo/main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index d7b3c978..a6c67c24 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -11,6 +11,7 @@ import ( "fmt" "net" "net/http" + "net/http/pprof" "os" "os/signal" "runtime" @@ -82,6 +83,7 @@ type CLI struct { Metrics bool `name:"metrics" help:"Enable Prometheus compatible metrics endpoint"` NoDebugVars bool `name:"no-debug-vars" help:"Disable the /debug/vars/ metrics endpoint. This option has no effects when the metrics are not enabled."` NoLogTS bool `name:"no-log-ts" help:"Do not add a timestamp to logging"` + Profile bool `name:"prof" help:"Enable go http profiler endpoint"` LogJson bool `name:"log-json" help:"Log in JSON format"` DisableKeepAlivesFE bool `name:"no-fk" help:"Disable frontend http keep-alive support"` DisableKeepAlivesBE bool `name:"no-bk" help:"Disable backend http keep-alive support"` @@ -268,6 +270,15 @@ func (cli *CLI) Run() { mux.Handle("/metrics", promhttp.Handler()) } + if cli.Profile { + mlog.Printf("Enabling cpu profile at /debug/pprof") + mux.HandleFunc("/debug/pprof/", pprof.Index) + // mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) + mux.HandleFunc("/debug/pprof/profile", pprof.Profile) + // mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) + // mux.HandleFunc("/debug/pprof/trace", pprof.Trace) + } + mux.Handle("/", router) var httpSrv *http.Server From ac2655f68e272898b29b6b348fc5526782656cb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 01:50:24 +0000 Subject: [PATCH 067/128] Bump github.com/quic-go/quic-go from 0.40.0 to 0.40.1 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.40.0 to 0.40.1. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md) - [Commits](https://github.com/quic-go/quic-go/compare/v0.40.0...v0.40.1) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b79c942a..fcc7ddd0 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 - github.com/quic-go/quic-go v0.40.0 + github.com/quic-go/quic-go v0.40.1 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.19.0 diff --git a/go.sum b/go.sum index 8c158906..f6a53631 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -github.com/quic-go/quic-go v0.40.0 h1:GYd1iznlKm7dpHD7pOVpUvItgMPo/jrMgDWZhMCecqw= -github.com/quic-go/quic-go v0.40.0/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= +github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q= +github.com/quic-go/quic-go v0.40.1/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= From 85bc6f3dc055547cd0d3874ba8857461007768a9 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 17 Dec 2023 20:29:09 -0800 Subject: [PATCH 068/128] fix codeql --- .github/workflows/codeql-analysis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d9d79e8d..c96edb24 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: "CodeQL" on: push: - branches: ['**'] + branches: [master] pull_request: # The branches below must be a subset of the branches above branches: [master] @@ -13,6 +13,9 @@ jobs: analyse: name: Analyse runs-on: ubuntu-latest + permissions: + security-events: write + actions: read steps: - name: Checkout repository From c3dd1d622114c4db7f4d339507d6f50a76988b14 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 17 Dec 2023 20:29:41 -0800 Subject: [PATCH 069/128] bump other deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index fcc7ddd0..a182764e 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 // indirect + github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/onsi/ginkgo/v2 v2.13.2 // indirect github.com/prometheus/client_model v0.5.0 // indirect @@ -29,10 +29,10 @@ require ( github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.3.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect + golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.16.0 // indirect + golang.org/x/tools v0.16.1 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/go.sum b/go.sum index f6a53631..14319c4a 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08 h1:PxlBVtIFHR/mtWk2i0gTEdCz+jBnqiuHNSki0epDbVs= -github.com/google/pprof v0.0.0-20231205033806-a5a03c77bf08/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU= +github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= @@ -63,8 +63,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= +golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -98,8 +98,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= From ba49ab10eca382cc0e900227d7244c608165f9c5 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 19 Dec 2023 13:59:04 -0800 Subject: [PATCH 070/128] update golang.org/x/crypto --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index a182764e..3c707f92 100644 --- a/go.mod +++ b/go.mod @@ -28,8 +28,8 @@ require ( github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.3.0 // indirect - golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect + golang.org/x/crypto v0.17.0 // indirect + golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 14319c4a..bfed5830 100644 --- a/go.sum +++ b/go.sum @@ -61,10 +61,10 @@ go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 h1:qCEDpW1G+vcj3Y7Fy52pEM1AWm3abj8WimGYejI3SC4= -golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 h1:+iq7lrkxmFNBM7xx+Rae2W6uyPfhPeDWD+n+JgppptE= +golang.org/x/exp v0.0.0-20231219180239-dc181d75b848/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= From 5ae193fb6609e225df63266027f02089ccb0a922 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 19 Dec 2023 14:02:48 -0800 Subject: [PATCH 071/128] update changelog --- CHANGELOG.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 7fbda23a..142574cd 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,8 +18,11 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD + +== v2.4.8 2023-12-19 * Add `--automaxprocs` flag to set GOMAXPROCS automatically to match Linux container CPU quota/limits. +* Update library dependencies. == v2.4.7 - 2023-11-13 * Add http3/quic server support. New flag `--quic`. Requires `--ssl-listen`. From af7e920a86e0dc6d320bddcaab9d751de49fb719 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 20 Dec 2023 16:39:43 -0800 Subject: [PATCH 072/128] update 2nd order dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3c707f92..6db88bcd 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect - go.uber.org/mock v0.3.0 // indirect + go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect golang.org/x/mod v0.14.0 // indirect diff --git a/go.sum b/go.sum index bfed5830..ba892500 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= -go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= -go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= From ab60a9acd2c0681de817570f859f4f2e6ad7ebb7 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 24 Dec 2023 14:05:36 -0800 Subject: [PATCH 073/128] update 2nd order dep --- go.mod | 2 +- go.sum | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 6db88bcd..447cd53b 100644 --- a/go.mod +++ b/go.mod @@ -34,5 +34,5 @@ require ( golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect ) diff --git a/go.sum b/go.sum index ba892500..14e4c6dd 100644 --- a/go.sum +++ b/go.sum @@ -16,9 +16,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -101,10 +99,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 1c33631c1aa3ae8b5158749d55740eab4bf027aa Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 30 Dec 2023 16:06:23 -0800 Subject: [PATCH 074/128] bump deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 447cd53b..a5983d7d 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 - github.com/prometheus/client_golang v1.17.0 + github.com/prometheus/client_golang v1.18.0 github.com/prometheus/common v0.45.0 github.com/quic-go/quic-go v0.40.1 github.com/xlab/treeprint v1.2.0 @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect + github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/onsi/ginkgo/v2 v2.13.2 // indirect github.com/prometheus/client_model v0.5.0 // indirect @@ -29,7 +29,7 @@ require ( github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 14e4c6dd..0cad10d1 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 h1:dHLYa5D8/Ta0aLR2XcPsrkpAgGeFs6thhMcQK0oQ0n8= +github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= @@ -31,8 +31,8 @@ github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= @@ -61,8 +61,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 h1:+iq7lrkxmFNBM7xx+Rae2W6uyPfhPeDWD+n+JgppptE= -golang.org/x/exp v0.0.0-20231219180239-dc181d75b848/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= From ed9087b664e427e4bbac61b5c2a65633d1c56f1c Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 6 Jan 2024 12:55:10 -0800 Subject: [PATCH 075/128] bump deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index a5983d7d..c24c0664 100644 --- a/go.mod +++ b/go.mod @@ -29,9 +29,9 @@ require ( github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect + golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.16.1 // indirect google.golang.org/protobuf v1.32.0 // indirect diff --git a/go.sum b/go.sum index 0cad10d1..4b369edb 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= -golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= +golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -81,8 +81,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= From 8d57112c4c454b858984a018c33398367972689a Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 10 Jan 2024 12:40:30 -0800 Subject: [PATCH 076/128] update deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index c24c0664..c2df2c63 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/quic-go/quic-go v0.40.1 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.19.0 + golang.org/x/net v0.20.0 gotest.tools/v3 v3.5.1 ) @@ -28,8 +28,8 @@ require ( github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 4b369edb..9a035444 100644 --- a/go.sum +++ b/go.sum @@ -59,10 +59,10 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= -golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e h1:723BNChdd0c2Wk6WOE320qGBiPtYx0F0Bbm1kriShfE= +golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -71,8 +71,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= From 11a57d9fcc47ad5f3de37b733a03f023edf4007c Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 12 Jan 2024 13:11:07 -0800 Subject: [PATCH 077/128] update deps --- go.mod | 6 +++--- go.sum | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index c2df2c63..ef685c36 100644 --- a/go.mod +++ b/go.mod @@ -22,17 +22,17 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/onsi/ginkgo/v2 v2.13.2 // indirect + github.com/onsi/ginkgo/v2 v2.14.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e // indirect + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.32.0 // indirect ) diff --git a/go.sum b/go.sum index 9a035444..fa579bf3 100644 --- a/go.sum +++ b/go.sum @@ -25,9 +25,9 @@ github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42/go.mod h1:czg5+yv1E0Z github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= -github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= @@ -61,8 +61,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e h1:723BNChdd0c2Wk6WOE320qGBiPtYx0F0Bbm1kriShfE= -golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -96,8 +96,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= From 057a99080be21fe7d5a463a8649df465e5567215 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 22 Jan 2024 12:33:02 -0800 Subject: [PATCH 078/128] update deps, bump min go version --- go.mod | 16 ++++++++-------- go.sum | 33 +++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index ef685c36..abb28f5e 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,15 @@ module github.com/cactus/go-camo/v2 -go 1.19 +go 1.21 + +toolchain go1.21.6 require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/common v0.45.0 - github.com/quic-go/quic-go v0.40.1 + github.com/prometheus/common v0.46.0 + github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.20.0 @@ -20,16 +22,14 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/onsi/ginkgo/v2 v2.14.0 // indirect + github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 // indirect + github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect - github.com/quic-go/qtls-go1-20 v0.4.1 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index fa579bf3..8aa418d0 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= +github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY= github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= +github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= @@ -14,41 +16,43 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 h1:dHLYa5D8/Ta0aLR2XcPsrkpAgGeFs6thhMcQK0oQ0n8= -github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= +github.com/google/pprof v0.0.0-20240117000934-35fc243c5815/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= -github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= +github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= -github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q= -github.com/quic-go/quic-go v0.40.1/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= +github.com/quic-go/quic-go v0.41.0 h1:aD8MmHfgqTURWNJy48IYFg2OnxwHT3JL7ahGs73lb4k= +github.com/quic-go/quic-go v0.41.0/go.mod h1:qCkNjqczPEvgsOnxZ0eCD14lv+B2LHlFAB++CNOh9hA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -61,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= -golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= @@ -104,6 +108,7 @@ google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= From 5de2f8179437e43b5a73f5bf413ba9b16540c688 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 22 Jan 2024 12:44:32 -0800 Subject: [PATCH 079/128] update reamde, changelog --- CHANGELOG.adoc | 2 ++ README.adoc | 2 +- go.mod | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 142574cd..fd12d295 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,6 +18,8 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD +* Minimum Go version now 1.21 due to quic-go dependency, due to better + cryto/tls support for QUIC in Go-1.21. == v2.4.8 2023-12-19 * Add `--automaxprocs` flag to set GOMAXPROCS automatically to match Linux diff --git a/README.adoc b/README.adoc index 5b5e7894..e0cef5b2 100644 --- a/README.adoc +++ b/README.adoc @@ -147,7 +147,7 @@ Building requires: * make * posix compatible shell (sh) * git -* go (latest version recommended. At least version >= 1.13) +* go (latest version recommended. At least version >= 1.21) * {link-asciidoctor} (for building man pages only) Building: diff --git a/go.mod b/go.mod index abb28f5e..5b37ee56 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/cactus/go-camo/v2 go 1.21 -toolchain go1.21.6 - require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 From d170c29d0bd96203277af94aa415575b3a137182 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 23 Jan 2024 14:49:05 -0800 Subject: [PATCH 080/128] update makefile --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6409215b..d6d7713d 100644 --- a/Makefile +++ b/Makefile @@ -33,17 +33,20 @@ export GOEXPERIMENT=loopvar define HELP_OUTPUT Available targets: - help this help +* help this help (default target) clean clean up - all build binaries and man pages check run checks and validators test run tests cover run tests with cover output bench run benchmarks build build all binaries man build all man pages - tar build release tarball - cross-tar cross compile and build release tarballs + all build binaries and man pages + tar build release tarball for host platform only + cross-tar cross compile and build release tarballs for all platforms + release-sign sign release tarballs with minisign + release build and sign release + update-go-deps updates go.mod and go.sum files endef export HELP_OUTPUT From 2c75cabbbce33f1db1b777071aea7b21997e587c Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 27 Jan 2024 12:16:23 -0800 Subject: [PATCH 081/128] bump dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5b37ee56..28bb536d 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 // indirect + github.com/google/pprof v0.0.0-20240125082051-42cd04596328 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect diff --git a/go.sum b/go.sum index 8aa418d0..1857c545 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= -github.com/google/pprof v0.0.0-20240117000934-35fc243c5815/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240125082051-42cd04596328 h1:oI+lCI2DY1BsRrdzMJBhIMxBBdlZJl31YNQC11EiyvA= +github.com/google/pprof v0.0.0-20240125082051-42cd04596328/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= From ea8986e652b03a42647eec6cc874f4d14009e4ae Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 30 Jan 2024 13:15:18 -0800 Subject: [PATCH 082/128] bump indirect dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 28bb536d..24258824 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240125082051-42cd04596328 // indirect + github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect diff --git a/go.sum b/go.sum index 1857c545..f97be569 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240125082051-42cd04596328 h1:oI+lCI2DY1BsRrdzMJBhIMxBBdlZJl31YNQC11EiyvA= -github.com/google/pprof v0.0.0-20240125082051-42cd04596328/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e h1:E+3PBMCXn0ma79O7iCrne0iUpKtZ7rIcZvoz+jNtNtw= +github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= From 7d1affb3d28df007bac465622ac996f9f0eb6d2a Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 7 Feb 2024 13:40:39 -0800 Subject: [PATCH 083/128] update deps --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 24258824..35102c0a 100644 --- a/go.mod +++ b/go.mod @@ -20,16 +20,16 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e // indirect + github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.32.0 // indirect diff --git a/go.sum b/go.sum index f97be569..f7d6229c 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e h1:E+3PBMCXn0ma79O7iCrne0iUpKtZ7rIcZvoz+jNtNtw= -github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 h1:E/LAvt58di64hlYjx7AsNS6C/ysHWYo+2qPCZKTQhRo= +github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= @@ -63,14 +63,14 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= +golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -85,8 +85,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= From de54ac738d5c74203afff7454af7b77222c19fc8 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 10 Feb 2024 15:31:08 -0800 Subject: [PATCH 084/128] bump deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 35102c0a..8e979755 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.20.0 + golang.org/x/net v0.21.0 gotest.tools/v3 v3.5.1 ) diff --git a/go.sum b/go.sum index f7d6229c..961b56c8 100644 --- a/go.sum +++ b/go.sum @@ -75,8 +75,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= From f4283304b5973bda36aefea5b468cae43c7e1f1a Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 13 Feb 2024 12:05:36 -0800 Subject: [PATCH 085/128] dep updates --- cmd/go-camo/main.go | 8 +++++++- go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index a6c67c24..89c1d426 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -209,7 +209,13 @@ func (cli *CLI) Run() { } if cli.AutoMaxProcs { - maxprocs.Set(maxprocs.Logger(mlog.Infof)) // #nosec G104 + // #nosec G104 + maxprocs.Set( + maxprocs.Logger(mlog.Infof), + // uncomment once gomaxprocs has a new release, as this fixes + // https://github.com/uber-go/automaxprocs/issues/78 and similar. + // maxprocs.RoundQuotaFunc(func(v float64) int { return int(math.Ceil(v)) }), + ) } if cli.LogJson { diff --git a/go.mod b/go.mod index 8e979755..b3a71b43 100644 --- a/go.mod +++ b/go.mod @@ -27,10 +27,10 @@ require ( github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.19.0 // indirect - golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.18.0 // indirect google.golang.org/protobuf v1.32.0 // indirect ) diff --git a/go.sum b/go.sum index 961b56c8..cf8ccf18 100644 --- a/go.sum +++ b/go.sum @@ -65,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= @@ -100,8 +100,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= From de39bc0d22eaedbe721af0e9f426072e34951829 Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 16 Feb 2024 17:07:48 -0800 Subject: [PATCH 086/128] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b3a71b43..ddff97f7 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/common v0.46.0 + github.com/prometheus/common v0.47.0 github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 @@ -22,7 +22,7 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect diff --git a/go.sum b/go.sum index cf8ccf18..de856d96 100644 --- a/go.sum +++ b/go.sum @@ -38,10 +38,10 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4 github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= -github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= From 14d663ca5a5508d646f19a37485022c091ca0f1c Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 16 Feb 2024 17:13:01 -0800 Subject: [PATCH 087/128] update changelog --- CHANGELOG.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index fd12d295..79b5cae5 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -18,8 +18,11 @@ toc::[] :link-proxy-from-env: https://golang.org/pkg/net/http/#ProxyFromEnvironment == HEAD + +== v2.4.9 2024-02-16 * Minimum Go version now 1.21 due to quic-go dependency, due to better cryto/tls support for QUIC in Go-1.21. +* Update library dependencies. == v2.4.8 2023-12-19 * Add `--automaxprocs` flag to set GOMAXPROCS automatically to match Linux From 35f83356b380719320493c5b035c8e01c0295bd7 Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 23 Feb 2024 14:55:57 -0800 Subject: [PATCH 088/128] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index ddff97f7..a8583f40 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.18.0 - github.com/prometheus/common v0.47.0 + github.com/prometheus/common v0.48.0 github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 @@ -27,7 +27,7 @@ require ( github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.19.0 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index de856d96..16178881 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+ github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= -github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= +github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= @@ -65,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= From 66c407ecfdc44b554abb789aa5fa47df808c9f0c Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 25 Feb 2024 16:10:58 -0800 Subject: [PATCH 089/128] update dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a8583f40..3f673182 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect + github.com/google/pprof v0.0.0-20240225044709-fd706174c886 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect diff --git a/go.sum b/go.sum index 16178881..cee4fa23 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 h1:E/LAvt58di64hlYjx7AsNS6C/ysHWYo+2qPCZKTQhRo= -github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240225044709-fd706174c886 h1:JSJUTZTQT1Gzb2ROdAKOY3HwzBYcclS2GgumhMfHqjw= +github.com/google/pprof v0.0.0-20240225044709-fd706174c886/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= From 6f06d421e572c39cfcade6e954e2ceda8cd0d784 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 27 Feb 2024 12:58:48 -0800 Subject: [PATCH 090/128] dep update --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 3f673182..eb835757 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 - github.com/prometheus/client_golang v1.18.0 + github.com/prometheus/client_golang v1.19.0 github.com/prometheus/common v0.48.0 github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 @@ -20,13 +20,13 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240225044709-fd706174c886 // indirect + github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect github.com/onsi/ginkgo/v2 v2.15.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.19.0 // indirect + golang.org/x/crypto v0.20.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/sys v0.17.0 // indirect diff --git a/go.sum b/go.sum index cee4fa23..26934a69 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240225044709-fd706174c886 h1:JSJUTZTQT1Gzb2ROdAKOY3HwzBYcclS2GgumhMfHqjw= -github.com/google/pprof v0.0.0-20240225044709-fd706174c886/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= +github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= @@ -36,8 +36,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= +github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= @@ -63,8 +63,8 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= From 33eebcc23177569cde58176f7ae7d8a617d6a173 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 2 Mar 2024 17:59:53 -0800 Subject: [PATCH 091/128] update dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index eb835757..05acdddf 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v0.8.1 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.48.0 + github.com/prometheus/common v0.49.0 github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 diff --git a/go.sum b/go.sum index 26934a69..376118b8 100644 --- a/go.sum +++ b/go.sum @@ -40,8 +40,8 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= From aed262a63a27ae33d7f29fb992b5f4da54a21f4c Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 5 Mar 2024 16:21:41 -0800 Subject: [PATCH 092/128] update deps --- go.mod | 14 +++++++------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 05acdddf..cb7a2efc 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.21.0 + golang.org/x/net v0.22.0 gotest.tools/v3 v3.5.1 ) @@ -21,16 +21,16 @@ require ( github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect - github.com/onsi/ginkgo/v2 v2.15.0 // indirect + github.com/onsi/ginkgo/v2 v2.16.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.20.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.18.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + golang.org/x/tools v0.19.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/go.sum b/go.sum index 376118b8..94dc48e5 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -28,8 +28,8 @@ github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= +github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -63,20 +63,20 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= -golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -85,8 +85,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -100,11 +100,11 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 51a9609a3a930cf5482e58759a19fb144354e3de Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 8 Mar 2024 13:32:04 -0800 Subject: [PATCH 093/128] update deps --- go.mod | 6 +++--- go.sum | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index cb7a2efc..7e597967 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/cactus/go-camo/v2 go 1.21 require ( - github.com/alecthomas/kong v0.8.1 + github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.49.0 + github.com/prometheus/common v0.50.0 github.com/quic-go/quic-go v0.41.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 @@ -23,7 +23,7 @@ require ( github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect github.com/onsi/ginkgo/v2 v2.16.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect diff --git a/go.sum b/go.sum index 94dc48e5..7b5c893f 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= -github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= -github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY= -github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= -github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= -github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= +github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU= +github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/kong v0.9.0 h1:G5diXxc85KvoV2f0ZRVuMsi45IrBgx9zDNGNj165aPA= +github.com/alecthomas/kong v0.9.0/go.mod h1:Y47y5gKfHp1hDc7CH7OeXgLIpp+Q2m1Ni0L5s3bI8Os= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= @@ -40,10 +40,10 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= -github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= +github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.41.0 h1:aD8MmHfgqTURWNJy48IYFg2OnxwHT3JL7ahGs73lb4k= From c180b7c62cdd21e28b40330d2469a3930120cfb4 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 16 Mar 2024 20:42:09 -0700 Subject: [PATCH 094/128] update --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7e597967..e28668ca 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 7b5c893f..0c48979d 100644 --- a/go.sum +++ b/go.sum @@ -65,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw= +golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= From 967c927fdeec3a81df35fb449f32e065b03ec686 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 16 Mar 2024 21:49:33 -0700 Subject: [PATCH 095/128] fix prometheus build issue --- cmd/go-camo/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index 89c1d426..e8519775 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -25,6 +25,7 @@ import ( "github.com/cactus/mlog" "github.com/prometheus/client_golang/prometheus" + vcoll "github.com/prometheus/client_golang/prometheus/collectors/version" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/version" @@ -259,7 +260,7 @@ func (cli *CLI) Run() { version.Revision = os.Getenv("APP_INFO_REVISION") version.Branch = os.Getenv("APP_INFO_BRANCH") version.BuildDate = os.Getenv("APP_INFO_BUILD_DATE") - prometheus.MustRegister(version.NewCollector(metricNamespace)) + prometheus.MustRegister(vcoll.NewCollector(metricNamespace)) // Wrap the dumb router in instrumentation. router = promhttp.InstrumentHandlerDuration(responseDuration, router) From 632af00c1a340a59adcac68b33de5c932f1dbd74 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 17 Mar 2024 13:38:31 -0700 Subject: [PATCH 096/128] update changelog --- CHANGELOG.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 79b5cae5..77fd2941 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,9 @@ toc::[] == HEAD +== v2.4.10 2024-03-17 +* Update library dependencies. + == v2.4.9 2024-02-16 * Minimum Go version now 1.21 due to quic-go dependency, due to better cryto/tls support for QUIC in Go-1.21. From a2cdb192671d9f392a08d763d78dc0025896afe0 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 18 Mar 2024 16:11:45 -0700 Subject: [PATCH 097/128] update deps --- go.mod | 6 +++--- go.sum | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index e28668ca..a724d9a0 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/common v0.50.0 - github.com/quic-go/quic-go v0.41.0 + github.com/quic-go/quic-go v0.42.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.22.0 @@ -21,13 +21,13 @@ require ( github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect - github.com/onsi/ginkgo/v2 v2.16.0 // indirect + github.com/onsi/ginkgo/v2 v2.17.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.13.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect + golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 0c48979d..9e763e42 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= -github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/ginkgo/v2 v2.17.0 h1:kdnunFXpBjbzN56hcJHrXZ8M+LOkenKA7NnBzTNigTI= +github.com/onsi/ginkgo/v2 v2.17.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -46,8 +46,8 @@ github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGK github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.41.0 h1:aD8MmHfgqTURWNJy48IYFg2OnxwHT3JL7ahGs73lb4k= -github.com/quic-go/quic-go v0.41.0/go.mod h1:qCkNjqczPEvgsOnxZ0eCD14lv+B2LHlFAB++CNOh9hA= +github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= +github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -65,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw= -golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 h1:6R2FC06FonbXQ8pK11/PDFY6N6LWlf9KlzibaCapmqc= +golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= @@ -96,6 +96,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= From 254b01f08b8651a628bc3c17d57a0f5b046e5c3c Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 19 Mar 2024 14:55:34 -0700 Subject: [PATCH 098/128] bump dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a724d9a0..13223697 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 // indirect + github.com/google/pprof v0.0.0-20240319011627-a57c5dfe54fd // indirect github.com/onsi/ginkgo/v2 v2.17.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.13.0 // indirect diff --git a/go.sum b/go.sum index 9e763e42..51f6883f 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q= -github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240319011627-a57c5dfe54fd h1:LjW4RcTwfcqOYGmD7UpFrn1gfBZ9mgu7QN5mSeFkCog= +github.com/google/pprof v0.0.0-20240319011627-a57c5dfe54fd/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.17.0 h1:kdnunFXpBjbzN56hcJHrXZ8M+LOkenKA7NnBzTNigTI= From 567528aca0ca0a4b189517afd67c17df38267791 Mon Sep 17 00:00:00 2001 From: elij Date: Sun, 24 Mar 2024 11:53:06 -0700 Subject: [PATCH 099/128] bump deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 13223697..5571f19b 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.50.0 + github.com/prometheus/common v0.51.1 github.com/quic-go/quic-go v0.42.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 @@ -20,8 +20,8 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240319011627-a57c5dfe54fd // indirect - github.com/onsi/ginkgo/v2 v2.17.0 // indirect + github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07 // indirect + github.com/onsi/ginkgo/v2 v2.17.1 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/procfs v0.13.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect diff --git a/go.sum b/go.sum index 51f6883f..c7181edd 100644 --- a/go.sum +++ b/go.sum @@ -24,12 +24,12 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240319011627-a57c5dfe54fd h1:LjW4RcTwfcqOYGmD7UpFrn1gfBZ9mgu7QN5mSeFkCog= -github.com/google/pprof v0.0.0-20240319011627-a57c5dfe54fd/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07 h1:57oOH2Mu5Nw16KnZAVLdlUjmPH/TSYCKTJgG0OVfX0Y= +github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.17.0 h1:kdnunFXpBjbzN56hcJHrXZ8M+LOkenKA7NnBzTNigTI= -github.com/onsi/ginkgo/v2 v2.17.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -40,8 +40,8 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= -github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= +github.com/prometheus/common v0.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= +github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= From 778e1e62978812de7212bc21a4ea58a3edf8296d Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 3 Apr 2024 15:18:27 -0700 Subject: [PATCH 100/128] update deps --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 5571f19b..e1963e86 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,11 @@ require ( github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.51.1 + github.com/prometheus/common v0.52.2 github.com/quic-go/quic-go v0.42.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.22.0 + golang.org/x/net v0.23.0 gotest.tools/v3 v3.5.1 ) @@ -20,14 +20,14 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07 // indirect + github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect github.com/onsi/ginkgo/v2 v2.17.1 // indirect - github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.13.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect + golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index c7181edd..f8158b00 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07 h1:57oOH2Mu5Nw16KnZAVLdlUjmPH/TSYCKTJgG0OVfX0Y= -github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f h1:f00RU+zOX+B3rLAmMMkzHUF2h1z4DeYR9tTCvEq2REY= +github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= @@ -38,10 +38,10 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4 github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= -github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= +github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= @@ -65,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 h1:6R2FC06FonbXQ8pK11/PDFY6N6LWlf9KlzibaCapmqc= -golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= @@ -75,8 +75,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= From fc2b7bfee1c69730ad2ab3d810adbcc8aa2fa40b Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 3 Apr 2024 20:09:57 -0700 Subject: [PATCH 101/128] update changelog --- CHANGELOG.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 77fd2941..2f3aa5e5 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,10 @@ toc::[] == HEAD +== v2.4.12 2024-04-03 +* Update library dependencies. +* Build with Go-1.22.2 + == v2.4.10 2024-03-17 * Update library dependencies. From 30ac8b8d04c77974903304278f8d1d5f08a57d70 Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 5 Apr 2024 12:34:11 -0700 Subject: [PATCH 102/128] update deps --- go.mod | 14 +++++++------- go.sum | 30 ++++++++++++++++-------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index e1963e86..527d5911 100644 --- a/go.mod +++ b/go.mod @@ -10,14 +10,14 @@ require ( github.com/quic-go/quic-go v0.42.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.23.0 + golang.org/x/net v0.24.0 gotest.tools/v3 v3.5.1 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.2 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect @@ -26,11 +26,11 @@ require ( github.com/prometheus/procfs v0.13.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/sys v0.18.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.19.0 // indirect + golang.org/x/tools v0.20.0 // indirect google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/go.sum b/go.sum index f8158b00..712d67e6 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= github.com/cactus/mlog v1.0.10/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= github.com/cactus/tai64 v1.0.2 h1:c5rm3aQ9z3b6Vva2LXRSICx/Rpu9rj4MHEzRG1g7dK0= github.com/cactus/tai64 v1.0.2/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -63,30 +63,32 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -102,8 +104,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= From 21bf1a069ddc9588ae3cdc9b665e05b64989efb7 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 13 Apr 2024 14:59:50 -0700 Subject: [PATCH 103/128] update dep --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 527d5911..fc6ab99a 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.52.2 + github.com/prometheus/common v0.52.3 github.com/quic-go/quic-go v0.42.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 @@ -20,14 +20,14 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect + github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd // indirect github.com/onsi/ginkgo/v2 v2.17.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.13.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 712d67e6..56185fee 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f h1:f00RU+zOX+B3rLAmMMkzHUF2h1z4DeYR9tTCvEq2REY= -github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= +github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= @@ -40,8 +40,8 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO2ck= -github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= +github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA= +github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= @@ -65,8 +65,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc= +golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= From 1a9ab90f3d961253c51c4d1353cc9c4f84467adb Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 19 Apr 2024 17:29:40 -0700 Subject: [PATCH 104/128] update deps --- go.mod | 10 +++++----- go.sum | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index fc6ab99a..b296a0ae 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.52.3 + github.com/prometheus/common v0.53.0 github.com/quic-go/quic-go v0.42.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 @@ -16,18 +16,18 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cactus/tai64 v1.0.2 // indirect + github.com/cactus/tai64 v1.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd // indirect + github.com/google/pprof v0.0.0-20240416155748-26353dc0451f // indirect github.com/onsi/ginkgo/v2 v2.17.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/procfs v0.14.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/go.sum b/go.sum index 56185fee..a9a16cfe 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,9 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cactus/mlog v1.0.10 h1:xT6iHX2pT3EVrDtch5h5zWu3hWmfcV8gMfCUF4KXJwY= github.com/cactus/mlog v1.0.10/go.mod h1:z0zgmK5rbywKn+lJPzhLEFZOJejzfRBBW1RqC/1i588= -github.com/cactus/tai64 v1.0.2 h1:c5rm3aQ9z3b6Vva2LXRSICx/Rpu9rj4MHEzRG1g7dK0= github.com/cactus/tai64 v1.0.2/go.mod h1:gu5LAXd6eWwrRD/HPw+aTrJF5WkieYswRVLSNslKGg4= +github.com/cactus/tai64 v1.0.3 h1:GKdl8U1VprATgD16ob7Vjn7k+0G+rodh9roOcobjb3I= +github.com/cactus/tai64 v1.0.3/go.mod h1:Ciis5iTJ0/vRkbGsPqBvWTOtXbJdYobxVG/C4tSP9BY= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -24,8 +25,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= -github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240416155748-26353dc0451f h1:WpZiq8iqvGjJ3m3wzAVKL6+0vz7VkE79iSy9GII00II= +github.com/google/pprof v0.0.0-20240416155748-26353dc0451f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= @@ -40,10 +41,10 @@ github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7km github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.52.3 h1:5f8uj6ZwHSscOGNdIQg6OiZv/ybiK2CO2q2drVZAQSA= -github.com/prometheus/common v0.52.3/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdfq6s= +github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= @@ -65,8 +66,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc= -golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= From bf64f783a7dd863e6a43de7996865fcabd090832 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 20 Apr 2024 13:22:49 -0700 Subject: [PATCH 105/128] refactor docker publish CI * remove requirement for running tests. spurious test failures due to temporary network issues should not block building/publishing an already tagged release. * update GH-CI setup-* versions --- .github/workflows/publish-docker.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 040afc27..d9123d40 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -12,23 +12,17 @@ jobs: steps: - name: Src Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.21.x' + go-version: '>=1.22.0' check-latest: true id: go - - name: Tests - if: success() - env: - GOPROXY: "https://proxy.golang.org" - run: make test - - name: Build if: success() env: From d169b171ceb962fb10075afbe4ae566d9dd46841 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 20 Apr 2024 13:25:57 -0700 Subject: [PATCH 106/128] update other GH-CI action versions --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/publish-github.yml | 4 ++-- .github/workflows/unit-tests.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c96edb24..63bde33c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,16 +19,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. fetch-depth: 2 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.21.x' + go-version: '>=1.22.0' check-latest: true id: go diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index 3480309c..ab558668 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -22,9 +22,9 @@ jobs: fetch-depth: 1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.21.x' + go-version: '>=1.22.0' check-latest: true id: go diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 1bcfb43b..2e796715 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -13,14 +13,14 @@ jobs: steps: - name: Src Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.21.x' + go-version: '>=1.22.0' check-latest: true id: go From 8359fe42eec9ff3319938d594e20e883a7dc8cae Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 20 Apr 2024 13:30:01 -0700 Subject: [PATCH 107/128] refactor github publish CI * remove requirement for running tests. spurious test failures due to temporary network issues should not block building/publishing an already tagged release. * update GH-CI setup-* versions --- .github/workflows/publish-github.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index ab558668..fba58d10 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -28,12 +28,6 @@ jobs: check-latest: true id: go - - name: Tests - if: success() - env: - GOPROXY: "https://proxy.golang.org" - run: make test - - name: Build if: success() env: From e77beeccf2e3e83bf0557761e0d8fb80059e6be2 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 20 Apr 2024 13:40:58 -0700 Subject: [PATCH 108/128] fixes for tests * Remove google chart url test, as this chart no longer exists * make tests use `-cpu=4` to avoid flakey httpbin, as httpbin itself starts to 50x if called with _too much_ concurrency. --- Makefile | 2 +- pkg/camo/proxy_test.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Makefile b/Makefile index d6d7713d..30f03485 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ build: setup test: setup @echo "Running tests..." - @go test -count=1 -vet=off ${GOTEST_FLAGS} ./... + @go test -count=1 -cpu=4 -vet=off ${GOTEST_FLAGS} ./... bench: setup @echo "Running benchmarks..." diff --git a/pkg/camo/proxy_test.go b/pkg/camo/proxy_test.go index 654e3ac4..e1a7b6c4 100644 --- a/pkg/camo/proxy_test.go +++ b/pkg/camo/proxy_test.go @@ -58,13 +58,6 @@ func TestSimpleValidImageURL(t *testing.T) { } } -func TestGoogleChartURL(t *testing.T) { - t.Parallel() - testURL := "http://chart.apis.google.com/chart?chs=920x200&chxl=0:%7C2010-08-13%7C2010-09-12%7C2010-10-12%7C2010-11-11%7C1:%7C0%7C0%7C0%7C0%7C0%7C0&chm=B,EBF5FB,0,0,0&chco=008Cd6&chls=3,1,0&chg=8.3,20,1,4&chd=s:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&chxt=x,y&cht=lc" - _, err := makeTestReq(testURL, 200, camoConfig) - assert.Check(t, err) -} - func TestChunkedImageFile(t *testing.T) { t.Parallel() testURL := "https://www.igvita.com/posts/12/spdyproxy-diagram.png" From 83d95c307f311000699ac965b1af0e712342ff54 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 20 Apr 2024 13:49:36 -0700 Subject: [PATCH 109/128] update changelog --- CHANGELOG.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 2f3aa5e5..34c22a59 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,7 +19,11 @@ toc::[] == HEAD -== v2.4.12 2024-04-03 +== v2.4.12 2024-04-20 +* Update library dependencies. +* Fix docker and github packages publishing issue. + +== v2.4.11 2024-04-03 * Update library dependencies. * Build with Go-1.22.2 From bc843c3561e3c4c90fa9e2c5b9204befc43f5c63 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 22 Apr 2024 14:38:11 -0700 Subject: [PATCH 110/128] try multi-arch build, update CI workflows --- .github/workflows/publish-docker-images.yml | 78 +++++++++++++++++++++ .github/workflows/publish-docker.yml | 60 ---------------- .github/workflows/publish-github.yml | 63 ----------------- examples/Dockerfile-build | 18 +++++ 4 files changed, 96 insertions(+), 123 deletions(-) create mode 100644 .github/workflows/publish-docker-images.yml delete mode 100644 .github/workflows/publish-docker.yml delete mode 100644 .github/workflows/publish-github.yml create mode 100644 examples/Dockerfile-build diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml new file mode 100644 index 00000000..ff8dcdc9 --- /dev/null +++ b/.github/workflows/publish-docker-images.yml @@ -0,0 +1,78 @@ +name: publish-docker-images +on: + workflow_dispatch: + push: + tags: + - "v*" + +jobs: + build: + name: docker-publish + runs-on: ubuntu-latest + + steps: + - name: Src Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: write tags env vars + run: | + TAG=$(git describe --tags) + LATEST_TAG=$(git tag -l | grep -viE '(alpha|beta)' | sort -V | tail -n 1) + GITHASH="$(git rev-parse HEAD)" + echo "TAG=$TAG" + echo "TAG=${TAG}" >> "$GITHUB_ENV" + echo "LATEST_TAG=${LATEST_TAG}" + echo "LATEST_TAG=${LATEST_TAG}" >> "$GITHUB_ENV" + echo "GITHASH=${GITHASH}" + echo "GITHASH=${GITHASH}" >> "$GITHUB_ENV" + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + cactus4docker/go-camo + ghcr.io/cactus/go-camo + tags: | + # set latest tag for master branch + type=raw,value=${{ env.TAG }} + type=raw,value=latest,enable=${{ env.TAG == env.LATEST_TAG }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_USERNAME }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + provenance: false + sbom: false + file: ./examples/Dockerfile-build + platforms: linux/amd64,linux/arm64 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + build-args: | + GITHASH=${{env.GITHASH}} + APP_VER=${{env.TAG}} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml deleted file mode 100644 index d9123d40..00000000 --- a/.github/workflows/publish-docker.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: publish-docker -on: - workflow_dispatch: - push: - tags: - - 'v*' - -jobs: - build: - name: docker-publish - runs-on: ubuntu-latest - - steps: - - name: Src Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '>=1.22.0' - check-latest: true - id: go - - - name: Build - if: success() - env: - GOPROXY: "https://proxy.golang.org" - run: make build - - - name: Build Container - if: success() - env: - DOCKER_BUILDKIT: 1 - run: | - TAG=$(git describe --tags) - GITHASH="$(git rev-parse HEAD)" - docker build \ - --build-arg GITHASH=${GITHASH} \ - --build-arg VERSION=${TAG} \ - -f examples/Dockerfile \ - -t cactus4docker/go-camo:${TAG} \ - . - - - name: Publish Container - if: success() - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: | - TAG=$(git describe --tags) - LATEST_TAG=$(git tag -l | grep -viE '(alpha|beta)' | sort -V | tail -n 1) - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker push cactus4docker/go-camo:${TAG} - if [[ "$TAG" = "$LATEST_TAG" ]]; then - docker tag cactus4docker/go-camo:${TAG} cactus4docker/go-camo:latest - docker push cactus4docker/go-camo:latest - fi - docker logout diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml deleted file mode 100644 index fba58d10..00000000 --- a/.github/workflows/publish-github.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: publish-github -on: - workflow_dispatch: - push: - tags: - - 'v*' - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - DOCKER_BUILDKIT: 1 - -jobs: - build: - name: docker-publish - runs-on: ubuntu-latest - - steps: - - name: Src Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '>=1.22.0' - check-latest: true - id: go - - - name: Build - if: success() - env: - GOPROXY: "https://proxy.golang.org" - run: make build - - - name: Build Container - if: success() - run: | - TAG=$(git describe --tags) - GITHASH="$(git rev-parse HEAD)" - docker build \ - --build-arg GITHASH=${GITHASH} \ - --build-arg VERSION=${TAG} \ - -f examples/Dockerfile \ - -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} \ - . - - - name: Publish Container - if: success() - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: | - TAG=$(git describe --tags) - LATEST_TAG=$(git tag -l | grep -viE '(alpha|beta)' | sort -V | tail -n 1) - echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin - docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} - if [[ "$TAG" = "$LATEST_TAG" ]]; then - docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - fi - docker logout diff --git a/examples/Dockerfile-build b/examples/Dockerfile-build new file mode 100644 index 00000000..6a49cb32 --- /dev/null +++ b/examples/Dockerfile-build @@ -0,0 +1,18 @@ +FROM golang:alpine as builder +RUN apk add --no-cache ca-certificates tzdata make git +WORKDIR /workdir +ENV GOEXPERIMENT=loopvar +COPY go.mod go.sum ./ +RUN go mod download +COPY . ./ +ARG APP_VER +RUN make build APP_VER="${APP_VER}" GITHASH="${GITHASH}"; rm -rf /root/.cache/ + +FROM alpine:latest as run +RUN apk add --no-cache ca-certificates tzdata +WORKDIR /app +COPY --from=builder --link /workdir/build/bin/* /bin/ + +USER nobody +EXPOSE 8080/tcp +ENTRYPOINT ["/bin/go-camo"] From f33c2dca2d51204fa2d7953b28cba1e60e1b09c2 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 22 Apr 2024 16:35:05 -0700 Subject: [PATCH 111/128] update changelog --- CHANGELOG.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 34c22a59..aad9b747 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,9 @@ toc::[] == HEAD +== v2.4.13 2024-04-22 +* Release tagged for arm64 docker building only. + == v2.4.12 2024-04-20 * Update library dependencies. * Fix docker and github packages publishing issue. From 406e2f2d9ef94b6806d8b16e36bdb5e78e59ba8f Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 27 Apr 2024 12:33:41 -0700 Subject: [PATCH 112/128] update dependencies --- go.mod | 8 ++++---- go.sum | 27 ++++++++++++--------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index b296a0ae..8b4246f6 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/common v0.53.0 - github.com/quic-go/quic-go v0.42.0 + github.com/quic-go/quic-go v0.43.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.24.0 @@ -18,10 +18,10 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cactus/tai64 v1.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240416155748-26353dc0451f // indirect - github.com/onsi/ginkgo/v2 v2.17.1 // indirect + github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect + github.com/onsi/ginkgo/v2 v2.17.2 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.14.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect diff --git a/go.sum b/go.sum index a9a16cfe..2348ec03 100644 --- a/go.sum +++ b/go.sum @@ -18,21 +18,19 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240416155748-26353dc0451f h1:WpZiq8iqvGjJ3m3wzAVKL6+0vz7VkE79iSy9GII00II= -github.com/google/pprof v0.0.0-20240416155748-26353dc0451f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= -github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= +github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= +github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= @@ -47,13 +45,12 @@ github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdf github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= -github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/quic-go v0.43.0 h1:sjtsTKWX0dsHpuMJvLxGqoQdtgJnbAPWY+W+5vjYW/g= +github.com/quic-go/quic-go v0.43.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= From 23a29fae4ae3dc8c9ce523f3a192e704eb432718 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 27 Apr 2024 12:36:43 -0700 Subject: [PATCH 113/128] address dependency method change/deprecation --- cmd/go-camo/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/go-camo/main.go b/cmd/go-camo/main.go index e8519775..2e61063d 100644 --- a/cmd/go-camo/main.go +++ b/cmd/go-camo/main.go @@ -314,7 +314,7 @@ func (cli *CLI) Run() { } // wrap default mux to set some default quic reference headers on tls responses tlsSrv.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - quicSrv.SetQuicHeaders(w.Header()) // #nosec G104 - ignore error. should only happen if server.Port isn't discoverable + quicSrv.SetQUICHeaders(w.Header()) // #nosec G104 - ignore error. should only happen if server.Port isn't discoverable mux.ServeHTTP(w, r) }) } From c7df2bd5835d21a782247888e17e27b4fa473c61 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 2 May 2024 14:21:48 -0700 Subject: [PATCH 114/128] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8b4246f6..c8f421d5 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect + github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e // indirect github.com/onsi/ginkgo/v2 v2.17.2 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.14.0 // indirect @@ -32,5 +32,5 @@ require ( golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.20.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.0 // indirect ) diff --git a/go.sum b/go.sum index 2348ec03..a64223bb 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e h1:RsXNnXE59RTt8o3DcA+w7ICdRfR2l+Bb5aE0YMpNTO8= +github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= @@ -105,8 +105,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From dbc50d9b0f8fb3e1bde6326d894b37aa25214221 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 4 May 2024 14:45:47 -0700 Subject: [PATCH 115/128] update deps --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c8f421d5..f837b6d7 100644 --- a/go.mod +++ b/go.mod @@ -29,8 +29,8 @@ require ( golang.org/x/crypto v0.22.0 // indirect golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/tools v0.20.0 // indirect google.golang.org/protobuf v1.34.0 // indirect ) diff --git a/go.sum b/go.sum index a64223bb..fbdf6c30 100644 --- a/go.sum +++ b/go.sum @@ -85,8 +85,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -94,8 +94,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 7a26e02524657df1865127f5bb38292617556118 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 7 May 2024 15:26:30 -0700 Subject: [PATCH 116/128] update deps --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index f837b6d7..4041c8ba 100644 --- a/go.mod +++ b/go.mod @@ -7,10 +7,10 @@ require ( github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/common v0.53.0 - github.com/quic-go/quic-go v0.43.0 + github.com/quic-go/quic-go v0.43.1 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.24.0 + golang.org/x/net v0.25.0 gotest.tools/v3 v3.5.1 ) @@ -20,17 +20,17 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e // indirect - github.com/onsi/ginkgo/v2 v2.17.2 // indirect + github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c // indirect + github.com/onsi/ginkgo/v2 v2.17.3 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.14.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.20.0 // indirect - google.golang.org/protobuf v1.34.0 // indirect + golang.org/x/tools v0.21.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect ) diff --git a/go.sum b/go.sum index fbdf6c30..756b28c1 100644 --- a/go.sum +++ b/go.sum @@ -23,12 +23,12 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e h1:RsXNnXE59RTt8o3DcA+w7ICdRfR2l+Bb5aE0YMpNTO8= -github.com/google/pprof v0.0.0-20240430035430-e4905b036c4e/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c h1:GCixZ7sgey01Kjw8pxBzCD0uVrubxl8SRzRgI0jwP+A= +github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= +github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -45,8 +45,8 @@ github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdf github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.43.0 h1:sjtsTKWX0dsHpuMJvLxGqoQdtgJnbAPWY+W+5vjYW/g= -github.com/quic-go/quic-go v0.43.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ= +github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= @@ -61,10 +61,10 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= -golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= @@ -73,8 +73,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= @@ -102,11 +102,11 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From cb0a0f6472a97cfb9d3957bffbfad968ceb3f173 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 8 May 2024 17:08:27 -0700 Subject: [PATCH 117/128] run CI for arm64 via qemu --- .github/workflows/unit-tests.yml | 43 +++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 2e796715..c3a7f2a8 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -2,13 +2,12 @@ name: unit-tests on: workflow_dispatch: push: - branches: ['**'] + branches: ["**"] pull_request: branches: [master] jobs: - build: - name: Build + test: runs-on: ubuntu-latest steps: @@ -20,7 +19,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '>=1.22.0' + go-version: ">=1.22.0" check-latest: true id: go @@ -40,3 +39,39 @@ jobs: GOPROXY: "https://proxy.golang.org" CI: true run: make test + + test-qemu: + needs: test + runs-on: ubuntu-latest + strategy: + matrix: + arch: [arm64] + + steps: + - name: Src Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ">=1.22.0" + check-latest: true + id: go + + - name: Install QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build + env: + GOPROXY: "https://proxy.golang.org" + GOARCH: ${{ matrix.arch }} + run: make build + + - name: Tests + env: + GOPROXY: "https://proxy.golang.org" + GOARCH: ${{ matrix.arch }} + CI: true + run: make test From 65ce43caf9227c46f5383ce7c6dc965f2c60c18f Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 8 May 2024 17:14:38 -0700 Subject: [PATCH 118/128] drop darwin/amd64 from default build targets --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 30f03485..7b9794e8 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ GOBUILD_FLAGS := ${GOBUILD_DEPFLAGS} ${GOBUILD_OPTIONS} -ldflags "${GOBUILD_ # cross compile defs CC_BUILD_TARGETS = go-camo url-tool -CC_BUILD_ARCHES = darwin/amd64 darwin/arm64 freebsd/amd64 linux/amd64 linux/arm64 windows/amd64 +CC_BUILD_ARCHES = darwin/arm64 freebsd/amd64 linux/amd64 linux/arm64 windows/amd64 CC_OUTPUT_TPL := ${BUILDDIR}/bin/{{.Dir}}.{{.OS}}-{{.Arch}} # some exported vars (pre-configure go build behavior) From 144a25bfe8346dbf20668088a025bd1175417eae Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 14 May 2024 13:42:05 -0700 Subject: [PATCH 119/128] update deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 4041c8ba..e5861189 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 - github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_golang v1.19.1 github.com/prometheus/common v0.53.0 github.com/quic-go/quic-go v0.43.1 github.com/xlab/treeprint v1.2.0 @@ -20,10 +20,10 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c // indirect + github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect github.com/onsi/ginkgo/v2 v2.17.3 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/procfs v0.14.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.23.0 // indirect diff --git a/go.sum b/go.sum index 756b28c1..3918a8d9 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c h1:GCixZ7sgey01Kjw8pxBzCD0uVrubxl8SRzRgI0jwP+A= -github.com/google/pprof v0.0.0-20240507183855-6f11f98ebb1c/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 h1:velgFPYr1X9TDwLIfkV7fWqsFlf7TeP11M/7kPd/dVI= +github.com/google/pprof v0.0.0-20240509144519-723abb6459b7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= @@ -35,14 +35,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdfq6s= -github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ= From 881cf98c95853ccd88a17dc1149bcdbaf2aa448d Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 14 May 2024 16:08:25 -0700 Subject: [PATCH 120/128] move Dockerfile and add missing GITHASH --- .github/workflows/publish-docker-images.yml | 2 +- examples/Dockerfile-build => docker/Dockerfile | 1 + examples/Dockerfile | 8 -------- 3 files changed, 2 insertions(+), 9 deletions(-) rename examples/Dockerfile-build => docker/Dockerfile (97%) delete mode 100644 examples/Dockerfile diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index ff8dcdc9..55c3e059 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -67,7 +67,7 @@ jobs: push: true provenance: false sbom: false - file: ./examples/Dockerfile-build + file: ./docker/Dockerfile platforms: linux/amd64,linux/arm64 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/examples/Dockerfile-build b/docker/Dockerfile similarity index 97% rename from examples/Dockerfile-build rename to docker/Dockerfile index 6a49cb32..c20b5344 100644 --- a/examples/Dockerfile-build +++ b/docker/Dockerfile @@ -6,6 +6,7 @@ COPY go.mod go.sum ./ RUN go mod download COPY . ./ ARG APP_VER +ARG GITHASH RUN make build APP_VER="${APP_VER}" GITHASH="${GITHASH}"; rm -rf /root/.cache/ FROM alpine:latest as run diff --git a/examples/Dockerfile b/examples/Dockerfile deleted file mode 100644 index e342133e..00000000 --- a/examples/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM alpine:latest -RUN apk add --no-cache ca-certificates -ARG GITHASH -ARG VERSION -COPY build/bin/* /bin/ -EXPOSE 8080/tcp -USER nobody -ENTRYPOINT ["/bin/go-camo"] From f65fdf05723d15dfdfd2b68f2830f7437a971dd3 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 20 May 2024 13:29:36 -0700 Subject: [PATCH 121/128] bump dep --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e5861189..0fbb72a3 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/common v0.53.0 - github.com/quic-go/quic-go v0.43.1 + github.com/quic-go/quic-go v0.44.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.25.0 diff --git a/go.sum b/go.sum index 3918a8d9..0ae1930f 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ= -github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= +github.com/quic-go/quic-go v0.44.0/go.mod h1:z4cx/9Ny9UtGITIPzmPTXh1ULfOyWh4qGQlpnPcWmek= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= From ee78337c1f92aff2a5470e331a7132232a04daa8 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 21 May 2024 16:05:49 -0700 Subject: [PATCH 122/128] update deps --- go.mod | 4 ++-- go.sum | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 0fbb72a3..f96d5ff4 100644 --- a/go.mod +++ b/go.mod @@ -20,8 +20,8 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 // indirect - github.com/onsi/ginkgo/v2 v2.17.3 // indirect + github.com/google/pprof v0.0.0-20240521024322-9665fa269a30 // indirect + github.com/onsi/ginkgo/v2 v2.18.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect diff --git a/go.sum b/go.sum index 0ae1930f..e32de7a5 100644 --- a/go.sum +++ b/go.sum @@ -23,14 +23,14 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240509144519-723abb6459b7 h1:velgFPYr1X9TDwLIfkV7fWqsFlf7TeP11M/7kPd/dVI= -github.com/google/pprof v0.0.0-20240509144519-723abb6459b7/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240521024322-9665fa269a30 h1:r6YdmbD41tGHeCWDyHF691LWtL7D1iSTyJaKejTWwVU= +github.com/google/pprof v0.0.0-20240521024322-9665fa269a30/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU= -github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= -github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= -github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= +github.com/onsi/ginkgo/v2 v2.18.0 h1:W9Y7IWXxPUpAit9ieMOLI7PJZGaW22DTKgiVAuhDTLc= +github.com/onsi/ginkgo/v2 v2.18.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= From 4ebceb025080335cb1c93e3996eba2638bccc090 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 25 May 2024 14:37:28 -0700 Subject: [PATCH 123/128] bump deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index f96d5ff4..bf94486f 100644 --- a/go.mod +++ b/go.mod @@ -20,14 +20,14 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240521024322-9665fa269a30 // indirect - github.com/onsi/ginkgo/v2 v2.18.0 // indirect + github.com/google/pprof v0.0.0-20240525172833-67f7ab83a680 // indirect + github.com/onsi/ginkgo/v2 v2.19.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect diff --git a/go.sum b/go.sum index e32de7a5..396fc270 100644 --- a/go.sum +++ b/go.sum @@ -23,12 +23,12 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240521024322-9665fa269a30 h1:r6YdmbD41tGHeCWDyHF691LWtL7D1iSTyJaKejTWwVU= -github.com/google/pprof v0.0.0-20240521024322-9665fa269a30/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240525172833-67f7ab83a680 h1:jtWKMkehOTiort4R+HpL3BqB55Q8BhieGpN3eL1mPdo= +github.com/google/pprof v0.0.0-20240525172833-67f7ab83a680/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/onsi/ginkgo/v2 v2.18.0 h1:W9Y7IWXxPUpAit9ieMOLI7PJZGaW22DTKgiVAuhDTLc= -github.com/onsi/ginkgo/v2 v2.18.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -63,8 +63,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d h1:N0hmiNbwsSNwHBAvR3QB5w25pUwH4tK0Y/RltD1j1h4= +golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= From 0836cdcbc90f223b859784e66ba53b27df043d6d Mon Sep 17 00:00:00 2001 From: elij Date: Fri, 31 May 2024 08:32:08 -0700 Subject: [PATCH 124/128] dump deps --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index bf94486f..949f3dd0 100644 --- a/go.mod +++ b/go.mod @@ -20,14 +20,14 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240525172833-67f7ab83a680 // indirect + github.com/google/pprof v0.0.0-20240528025155-186aa0362fba // indirect github.com/onsi/ginkgo/v2 v2.19.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/procfs v0.15.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d // indirect + golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect diff --git a/go.sum b/go.sum index 396fc270..f8d587a2 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240525172833-67f7ab83a680 h1:jtWKMkehOTiort4R+HpL3BqB55Q8BhieGpN3eL1mPdo= -github.com/google/pprof v0.0.0-20240525172833-67f7ab83a680/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20240528025155-186aa0362fba h1:ql1qNgCyOB7iAEk8JTNM+zJrgIbnyCKX/wdlyPufP5g= +github.com/google/pprof v0.0.0-20240528025155-186aa0362fba/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= @@ -41,8 +41,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= @@ -63,8 +63,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d h1:N0hmiNbwsSNwHBAvR3QB5w25pUwH4tK0Y/RltD1j1h4= -golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg= +golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= From 8dc0c34d197d1291f5bdb7c54f8b5162a9e6c159 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 4 Jun 2024 12:28:44 -0700 Subject: [PATCH 125/128] bump deps --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 949f3dd0..1b6492e6 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,11 @@ require ( github.com/alecthomas/kong v0.9.0 github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.1 - github.com/prometheus/common v0.53.0 + github.com/prometheus/common v0.54.0 github.com/quic-go/quic-go v0.44.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 - golang.org/x/net v0.25.0 + golang.org/x/net v0.26.0 gotest.tools/v3 v3.5.1 ) @@ -26,11 +26,11 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect - golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.22.0 // indirect google.golang.org/protobuf v1.34.1 // indirect ) diff --git a/go.sum b/go.sum index f8d587a2..ee5db48a 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,8 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= +github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= @@ -61,20 +61,20 @@ go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg= -golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= @@ -85,8 +85,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -94,16 +94,16 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= From b8b144b9d4ed1777fda2aebdcf27418c41b2d4c1 Mon Sep 17 00:00:00 2001 From: elij Date: Thu, 6 Jun 2024 12:58:36 -0700 Subject: [PATCH 126/128] bump deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1b6492e6..645f32b2 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/cactus/mlog v1.0.10 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/common v0.54.0 - github.com/quic-go/quic-go v0.44.0 + github.com/quic-go/quic-go v0.45.0 github.com/xlab/treeprint v1.2.0 go.uber.org/automaxprocs v1.5.3 golang.org/x/net v0.26.0 diff --git a/go.sum b/go.sum index ee5db48a..1ab50cde 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= -github.com/quic-go/quic-go v0.44.0/go.mod h1:z4cx/9Ny9UtGITIPzmPTXh1ULfOyWh4qGQlpnPcWmek= +github.com/quic-go/quic-go v0.45.0 h1:OHmkQGM37luZITyTSu6ff03HP/2IrwDX1ZFiNEhSFUE= +github.com/quic-go/quic-go v0.45.0/go.mod h1:1dLehS7TIR64+vxGR70GDcatWTOtMX2PUtnKsjbTurI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= From 8eb86a25b67a3fd446b2a71e57219be5535d7381 Mon Sep 17 00:00:00 2001 From: elij Date: Tue, 11 Jun 2024 21:15:41 -0700 Subject: [PATCH 127/128] bump deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 645f32b2..4cb6e1b3 100644 --- a/go.mod +++ b/go.mod @@ -32,5 +32,5 @@ require ( golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/tools v0.22.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/go.sum b/go.sum index 1ab50cde..1fe6f9e8 100644 --- a/go.sum +++ b/go.sum @@ -105,8 +105,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From 926368def0c8d4121ee1d0e687273f01513dd0d4 Mon Sep 17 00:00:00 2001 From: elij Date: Sat, 15 Jun 2024 14:31:17 -0700 Subject: [PATCH 128/128] bump deps --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4cb6e1b3..24bb95bf 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/quic-go/qpack v0.4.0 // indirect go.uber.org/mock v0.4.0 // indirect golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/mod v0.18.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect diff --git a/go.sum b/go.sum index 1fe6f9e8..96eb664f 100644 --- a/go.sum +++ b/go.sum @@ -63,8 +63,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=