sketch/loop: add PortMonitor for TCP port monitoring with Agent integration
Add PortMonitor struct that uses Tailscale portlist library to monitor
open/listening TCP ports and send AgentMessage notifications to Agent
when ports are opened or closed, with cached port list access method.
When I asked Sketch to do this with the old implementation, it did
ok parsing /proc, but then it tried to conver it to ss format...
using a library seems to work ok!
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s8fc57de4b5583d34k
diff --git a/go.mod b/go.mod
index 66ab7e1..18f76c2 100644
--- a/go.mod
+++ b/go.mod
@@ -30,7 +30,7 @@
require (
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/chromedp/sysutil v1.1.0 // indirect
- github.com/go-json-experiment/json v0.0.0-20250211171154-1ae217ad3535 // indirect
+ github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.4.0 // indirect
@@ -39,9 +39,11 @@
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
+ go4.org/mem v0.0.0-20240501181205-ae6ca9944745 // indirect
golang.org/x/mod v0.24.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.24.0 // indirect
+ tailscale.com v1.84.3 // indirect
)
tool golang.org/x/tools/cmd/stringer