Repository navigation
feat(explain): one-command flow, path check, readable report - #18
Merged
Merged
Conversation
`tcpcat explain inventory.json` now probes the host by itself: it takes the public address from the inventory and probes only the listening ports, Kubernetes Service and node ports, plus --expect/--ports, slowly and with retries. It refuses to run on the host itself (loopback path would bypass the firewall). The scan-report form still works. Before trusting results it probes control ports where nothing listens; if they answer, a device on the path (VPN, hotspot, proxy, antivirus, anti-DDoS) answers for the host and explain stops, naming the tunnel interface when the route goes through one. Also: - REFUSED class: listening but refused (REJECT rule, or a Docker port mapping with nothing listening in the container) - a Kubernetes Service mapping a port takes precedence over a local listener; NodePort-specific advice - --expect accepts ranges (25565-25570); -v details expected/local ports - sectioned report (to fix / firewall only / refused / public as expected / local) with a verdict; inventory grouped the same way - subcommands print the banner; the scan engine gets a Quiet option
| // the kernel would route target through, if any. Connecting a UDP socket | ||
| // only selects a route; nothing is sent. | ||
| func tunnelInterfaceFor(target string) (string, string) { | ||
| conn, err := net.Dial("udp", net.JoinHostPort(target, "9")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #17, from testing
tcpcat explainagainst a real k3s/Docker host:tcpcat explain inventory.jsonprobes the host itself (public address from the inventory; only listening ports, Kubernetes Service and node ports, plus--expect/--ports; slow, with retries). It refuses to run on the host itself. Theinventory.json scan.jsonform still works.--expectaccepts ranges (25565-25570);-vdetails expected/local ports.inventorygrouped the same way. Subcommands print the banner; the scan engine gets aQuietoption.Checklist
gofmt -l .produces no outputgo vet ./...passesgo test -race ./...passesREADME.md/docs/for user-facing changesTest plan