feat: cleanup removal of old ssh plexer and logic

we also have added the necessary logic to auto prune ephemeral nodes because
headscale doesn't seem to automatically remove them. this change made use of a database
which is now stored in the persistent headplane directory.
This commit is contained in:
Aarnav Tale
2025-06-20 00:14:00 -04:00
parent bf1d75a27a
commit b18147fa82
24 changed files with 963 additions and 547 deletions
+7 -1
View File
@@ -72,7 +72,13 @@ func ParseTsWasmNetCallbacks(obj js.Value) (*TsWasmNetCallbacks, error) {
},
NotifyNetMap: func(nm *netmap.NetworkMap) {
// TODO: This is complicated
// We need to build a JSON representation of the NetworkMap
// For now we just pass the NodeKey since that's what we need.
jsObj := js.ValueOf(map[string]any{
"NodeKey": nm.NodeKey.String(),
})
obj.Get("NotifyNetMap").Invoke(jsObj)
},
NotifyBrowseToURL: func(url string) {
+4
View File
@@ -37,6 +37,10 @@ func registerNotifyCallback(callbacks *TsWasmNetCallbacks, lb *ipnlocal.LocalBac
callbacks.NotifyBrowseToURL(*n.BrowseToURL)
}
if n.NetMap != nil {
callbacks.NotifyNetMap(n.NetMap)
}
log.Printf("NOTIFY: %+v", n)
// if nm := n.NetMap; nm != nil {