pyed / ipfilter

ipfilter is a middleware for Caddy that blocks or allows requests based on the client's IP
https://caddyserver.com/docs/ipfilter
Apache License 2.0
83 stars 19 forks source link

Won't build #47

Open MichaelHipp opened 4 years ago

MichaelHipp commented 4 years ago

I created a stub caddy project as directed here: https://github.com/caddyserver/caddy.

Added an import for ipfilter: _ "github.com/pyed/ipfilter".

Here's what ended up in my go.mod:

module caddy

go 1.13

require (
    github.com/caddyserver/caddy v1.0.4
    github.com/cenkalti/backoff/v3 v3.2.2 // indirect
    github.com/golang/protobuf v1.3.3 // indirect
    github.com/gorilla/websocket v1.4.1 // indirect
    github.com/klauspost/cpuid v1.2.3 // indirect
    github.com/lucas-clemente/quic-go v0.14.4 // indirect
    github.com/marten-seemann/qtls v0.7.1 // indirect
    github.com/mholt/certmagic v0.9.3 // indirect
    github.com/miekg/dns v1.1.27 // indirect
    github.com/onsi/ginkgo v1.12.0 // indirect
    github.com/oschwald/maxminddb-golang v1.6.0 // indirect
    github.com/pyed/ipfilter v1.1.4
    github.com/russross/blackfriday v2.0.0+incompatible // indirect
    golang.org/x/crypto v0.0.0-20200219234226-1ad67e1f0ef4 // indirect
    golang.org/x/net v0.0.0-20200219183655-46282727080f // indirect
    golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c // indirect
    gopkg.in/square/go-jose.v2 v2.4.1 // indirect
    gopkg.in/yaml.v2 v2.2.8 // indirect
)

I get these errors when doing go get or go build:

$ go build
# github.com/caddyserver/caddy/caddyhttp/markdown/summary
../../../go/pkg/mod/github.com/caddyserver/caddy@v1.0.4/caddyhttp/markdown/summary/render.go:24:5: cannot use (*renderer)(nil) (type *renderer) as type blackfriday.Renderer in assignment:
        *renderer does not implement blackfriday.Renderer (missing RenderFooter method)
../../../go/pkg/mod/github.com/caddyserver/caddy@v1.0.4/caddyhttp/markdown/summary/summary.go:26:44: too many arguments to conversion to blackfriday.Markdown: blackfriday.Markdown(input, renderer literal, 0)
# github.com/lucas-clemente/quic-go/internal/handshake
../../../go/pkg/mod/github.com/lucas-clemente/quic-go@v0.14.4/internal/handshake/crypto_setup.go:435:40: not enough arguments in call to h.conn.GetSessionTicket
        have ()
        want ([]byte)
# github.com/caddyserver/caddy/caddytls
../../../go/pkg/mod/github.com/caddyserver/caddy@v1.0.4/caddytls/tls.go:80:42: not enough arguments in call to certmagic.NewDefault().RevokeCert
        have (string, bool)
        want (context.Context, string, bool)

Without the ipfilter import the base caddy builds fine.

Am I doing something wrong?