Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snikket caddy layer4 broke with alpn xmpp-client proxy #237

Open
tctlrd opened this issue Oct 25, 2024 · 0 comments
Open

snikket caddy layer4 broke with alpn xmpp-client proxy #237

tctlrd opened this issue Oct 25, 2024 · 0 comments

Comments

@tctlrd
Copy link

tctlrd commented Oct 25, 2024

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.

routes:
- match:
- tls: # match encrypted XMPP traffic
alpn:
- xmpp-client
handle:
- handler: proxy
upstreams:
- dial: # and send to Snikket's encrypted XMPP port
- localhost:5223

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

mholt/caddy-l4#259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant