[management, client] Add IPv6 overlay support (#5631)

This commit is contained in:
Viktor Liu
2026-05-07 18:33:37 +09:00
committed by GitHub
parent f23aaa9ae7
commit 205ebcfda2
229 changed files with 10155 additions and 2816 deletions

View File

@@ -112,7 +112,7 @@ func (e *Manager) handleEvent(event *proto.SystemEvent) {
handlers := slices.Clone(e.handlers)
e.mu.Unlock()
if event.UserMessage != "" && (enabled || event.Severity == proto.SystemEvent_CRITICAL) {
if event.UserMessage != "" && (enabled || event.Severity == proto.SystemEvent_CRITICAL) && !isV6DefaultRoutePartner(event) {
title := e.getEventTitle(event)
body := event.UserMessage
id := event.Metadata["id"]
@@ -133,6 +133,14 @@ func (e *Manager) AddHandler(handler Handler) {
e.handlers = append(e.handlers, handler)
}
// isV6DefaultRoutePartner reports whether the event is the IPv6 half of a
// paired v4/v6 default-route event. Management always pairs ::/0 with 0.0.0.0/0
// for exit nodes, so the v4 partner already drives the user-facing toast and
// the v6 one is suppressed to avoid a duplicate notification.
func isV6DefaultRoutePartner(event *proto.SystemEvent) bool {
return event.Category == proto.SystemEvent_NETWORK && event.Metadata["network"] == "::/0"
}
func (e *Manager) getEventTitle(event *proto.SystemEvent) string {
var prefix string
switch event.Severity {