Skip to content

feat: log incoming server connections with --verbose - #137

Open
SriVishnu230707 wants to merge 5 commits into
tailscale:mainfrom
SriVishnu230707:feat/log-incoming-connections
Open

SriVishnu230707 wants to merge 5 commits into
tailscale:mainfrom
SriVishnu230707:feat/log-incoming-connections

Conversation

@SriVishnu230707

Copy link
Copy Markdown

Closes #39.

When --verbose is enabled in server mode, Tailcat now logs each accepted TCP connection and UDP flow with its source address, authenticated peer key, destination address, and server key. The default remains quiet. The library exposes Server.LogConnections for the same opt-in behavior.

The logging is placed at the netstack dispatch point, so it covers listeners, served ports, and forwarded flows without changing their handlers. README and CLI help explain the behavior.

Validation on Windows with Go 1.27.1: go test ./cmd/tailcat -run '^Test(ServeWithoutPSK|ServePorts|Perf)$' -count=1 passed. The tests check quiet mode, verbose TCP, and verbose UDP. git diff --check passed.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Add verbose logging flag to log incoming connections

1 participant