tailscale / tailscale/caddy-tailscale
Caddy will not bind to non-tailscale interfaces if tsnet can not start
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 978
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
I experienced an internet outage and for unrelated reasons had to restart the host running caddy with the tailscale plugin.
After the host came back up none of the tcp4/0.0.0.0 binds would work
In order to gain local access to the services bound to tcp4/0.0.0.0 I had to modify the caddyfile to remove tailscale/* binds from the configuration blocks and restart caddy.
Here is a minimal repo config that I believe would reproduce this issue
:80 {
bind tailscale/public-ingress
handle public.example.com {
respond 'public'
}
}
*.example.com:80 {
bind tcp4/0.0.0.0 tailscale/private-ingress
handle private.example.com {
respond 'private'
}
}
# dns/tls config omitted for simplicity. modified to bind to port 80. Normally this would be bound to 443 but the port does not seem relevant to the issue
With this setup if tailscale is not reachable by tsnet tcp4/0.0.0.0 bind does not work. Both tailscale/ binds must be removed for caddy to respond to traffic on tcp4/0.0.0.0
I do realize this is a bit of an edge case since most deployments wouldn't be in this situation, but figured it would be valuable to report it anyway
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal Caddyfile configuration in the issue and reproduce the failure when tsnet cannot start. Trace how the tailscale/ and tcp4/0.0.0.0 binds are handled during startup. Done means non-Tailscale listeners respond even when tsnet is unavailable, while Tailscale binds retain their expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100