snikket-server
snikket-server copied to clipboard
snikket caddy layer4 broke with alpn xmpp-client proxy
I have started to get a panic in caddy when I include the part of the config that matches for alpn: xmpp-client The panic happens as soon as I visit a page that caddy is serving. Is anyone else experiencing this? I removed these lines and caddy is fine.
https://github.com/snikket-im/snikket-server/blob/f89e01402b9f5d5f63c9c54152531c3755587abd/docs/advanced/reverse_proxy.md?plain=1#L380-L389
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x159e52e]
goroutine 43 [running]:
github.com/mholt/caddy-l4/modules/l4tls.(*MatchALPN).Match(0xc000699d70, 0xc0007a4488)
github.com/mholt/[email protected]/modules/l4tls/alpn_matcher.go:40 +0x2e
github.com/mholt/caddy-l4/modules/l4tls.(*MatchTLS).Match(0xc000745380, 0xc0003387e0)
github.com/mholt/[email protected]/modules/l4tls/matcher.go:115 +0x2ea
github.com/mholt/caddy-l4/layer4.MatcherSet.Match({0xc0007398a0?, 0x596325?, 0xc00069ace8?}, 0xc0003387e0)
github.com/mholt/[email protected]/layer4/matchers.go:53 +0xa3
github.com/mholt/caddy-l4/layer4.(*MatcherSets).AnyMatch(0xc0006336b0, 0xc0003387e0)
github.com/mholt/[email protected]/layer4/matchers.go:88 +0x6f
github.com/mholt/caddy-l4/layer4.(*Server).Provision.RouteList.Compile.func1(0xc0003387e0)
github.com/mholt/[email protected]/layer4/routes.go:156 +0x615
github.com/mholt/caddy-l4/layer4.HandlerFunc.Handle(0x1f83f58?, 0xc00069ace8?)
github.com/mholt/[email protected]/layer4/handlers.go:61 +0x19
github.com/mholt/caddy-l4/layer4.(*Server).handle(0xc000338310, {0x1f83f58, 0xc00069ace8})
github.com/mholt/[email protected]/layer4/server.go:171 +0x191
created by github.com/mholt/caddy-l4/layer4.(*Server).serve in goroutine 35
github.com/mholt/[email protected]/layer4/server.go:89 +0x27c
https://github.com/mholt/caddy-l4/issues/259