Version 2 finally

master v2.2.2
Darshil Chanpura 7 months ago
parent 1a1a3f4b61
commit bb74f27f54
  1. 2
      cmd/dumb-http-s3/main.go
  2. 4
      cmd/dumb-http/main.go
  3. 4
      cmd/dumb-proxy/main.go
  4. 2
      go.mod
  5. 18
      go.sum
  6. 7
      proxy/proxy.go

@ -8,7 +8,7 @@ import (
"os"
"git.dcpri.me/modules/s3fs"
"git.dcpri.me/some-fancy-tools/dumb-http/logger"
"git.dcpri.me/some-fancy-tools/dumb-http/v2/logger"
)
var (

@ -8,8 +8,8 @@ import (
"net/http"
"os"
"git.dcpri.me/some-fancy-tools/dumb-http/logger"
"git.dcpri.me/some-fancy-tools/dumb-http/proxy"
"git.dcpri.me/some-fancy-tools/dumb-http/v2/logger"
"git.dcpri.me/some-fancy-tools/dumb-http/v2/proxy"
)
var (

@ -7,8 +7,8 @@ import (
"net/http"
"os"
"git.dcpri.me/some-fancy-tools/dumb-http/logger"
"git.dcpri.me/some-fancy-tools/dumb-http/proxy"
"git.dcpri.me/some-fancy-tools/dumb-http/v2/logger"
"git.dcpri.me/some-fancy-tools/dumb-http/v2/proxy"
)
var (

@ -5,6 +5,6 @@ go 1.17
require git.dcpri.me/modules/s3fs v1.0.0
require (
github.com/aws/aws-sdk-go v1.41.14 // indirect
github.com/aws/aws-sdk-go v1.44.12 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
)

@ -1,8 +1,8 @@
git.dcpri.me/modules/s3fs v1.0.0 h1:iivP7hz93acON2WVUy4xde80iOA0vTb4GQCROR2PO1k=
git.dcpri.me/modules/s3fs v1.0.0/go.mod h1:b6dBmk/TsF/Jhb9hs+/zD8QdyGrpD3xJzkiSzk7m3vo=
github.com/aws/aws-sdk-go v1.33.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.40.44 h1:kECaYybTWYZY5IKHvQMxbE6Wi5Qrb+7hbkV7zQV3Sg8=
github.com/aws/aws-sdk-go v1.40.44/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.44.12 h1:5f7ESFKQv5WHX8m37H2T8G+tc/rggy7sfdZ8ioqXFY8=
github.com/aws/aws-sdk-go v1.44.12/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
@ -18,15 +18,15 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
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-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/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.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

@ -30,11 +30,14 @@ func New(upstream, root string) (*Proxy, error) {
if err != nil {
return nil, err
}
return &Proxy{
p := &Proxy{
mux: http.NewServeMux(),
rp: httputil.NewSingleHostReverseProxy(rpURL),
root: root,
}, nil
}
return p, nil
}
// Routes will set routes based on the values of Proxy.rp and

Loading…
Cancel
Save