1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-10 13:10:33 +08:00

TUN-8785: include the icmp sources in the diag's tunnel state

Closes TUN-8785
This commit is contained in:
Luis Neto
2024-12-10 10:42:33 -08:00
parent 29f0cf354c
commit d74ca97b51
5 changed files with 57 additions and 20 deletions

View File

@@ -552,6 +552,13 @@ func StartServer(
tracker := tunnelstate.NewConnTracker(log)
observer.RegisterSink(tracker)
ipv4, ipv6, err := determineICMPSources(c, log)
sources := make([]string, 0)
if err == nil {
sources = append(sources, ipv4.String())
sources = append(sources, ipv6.String())
}
readinessServer := metrics.NewReadyServer(clientID, tracker)
diagnosticHandler := diagnostic.NewDiagnosticHandler(
log,
@@ -562,6 +569,7 @@ func StartServer(
tracker,
c,
nonSecretFlagsList,
sources,
)
metricsConfig := metrics.Config{
ReadyServer: readinessServer,