Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dockerproxy/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"os"

"github.com/superfly/flyctl/api"
api "github.com/superfly/fly-go"
)

func authRequest(next http.Handler) http.Handler {
Expand Down Expand Up @@ -51,6 +51,9 @@ func authorizeRequestWithCache(ctx context.Context, appName, authToken string) b
}

authorized := authorizeRequest(ctx, appName, authToken)
if ctx.Err() != nil {
return false
}
authCache.Set(cacheKey, authorized, 0)
log.Debugln("authorized from api")
return authorized
Expand Down
2 changes: 1 addition & 1 deletion dockerproxy/dockerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

const (
healthCheckTimeout = 10 * time.Second
healthCheckTimeout = 20 * time.Second
)

func runDockerd() (func() error, *client.Client, error) {
Expand Down
43 changes: 30 additions & 13 deletions dockerproxy/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,34 @@ require (
github.com/mitchellh/go-ps v1.0.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/superfly/flyctl/api v0.0.0-20221006140614-c60b0a0bf953
github.com/sirupsen/logrus v1.9.3
github.com/superfly/fly-go v0.1.48
)

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Khan/genqlient v0.5.0 // indirect
github.com/Khan/genqlient v0.7.1-0.20240819060157-4466fc10e4f3 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/PuerkitoBio/rehttp v1.1.0 // indirect
github.com/PuerkitoBio/rehttp v1.4.0 // indirect
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/alexflint/go-arg v1.4.2 // indirect
github.com/alexflint/go-scalar v1.0.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/containerd/containerd v1.5.3 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/klauspost/cpuid/v2 v2.0.4 // indirect
github.com/minio/argon2 v1.0.0 // indirect
Expand All @@ -46,21 +54,30 @@ require (
github.com/philhofer/fwd v1.1.1 // indirect
github.com/secure-io/sio-go v0.3.1 // indirect
github.com/shirou/gopsutil/v3 v3.21.3 // indirect
github.com/stretchr/testify v1.7.1 // indirect
github.com/superfly/graphql v0.2.3 // indirect
github.com/superfly/graphql v0.2.6 // indirect
github.com/superfly/macaroon v0.3.0 // indirect
github.com/tinylib/msgp v1.1.3 // indirect
github.com/tklauser/go-sysconf v0.3.4 // indirect
github.com/tklauser/numcpus v0.2.1 // indirect
github.com/vektah/gqlparser/v2 v2.4.5 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
github.com/vektah/gqlparser/v2 v2.5.16 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/genproto v0.0.0-20210722135532-667f2b7c528f // indirect
google.golang.org/grpc v1.42.0-dev.0.20211020220737-f00baa6c3c84 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.0.3 // indirect
)

Expand Down
Loading
Loading