connectiondiag

package
v0.1.80-dev.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package connectiondiag holds shared interpretation for the connection counter API and MCP tools.

Index

Constants

View Source
const Links2Capability = "links/2"
View Source
const VLESSUnknownKeysCapability = "vless-unknown-keys/1"

Variables

This section is empty.

Functions

func AverageRTTMS added in v0.1.57

func AverageRTTMS(sum, samples uint64) uint32

AverageRTTMS returns the integer mean of the node's smoothed RTT samples, or zero when there were no samples.

func LossPermille added in v0.1.57

func LossPermille(lost, sent uint64) uint32

LossPermille returns packets declared lost per thousand sent, or zero when no packets were sent. The division avoids overflowing uint64 when the aggregate packet count is large.

func SupportsHysteria2Links2 added in v0.1.57

func SupportsHysteria2Links2(protocol string, supportsLinks2 bool) bool

SupportsHysteria2Links2 reports whether this protocol/node pair can produce the close and path-quality fields.

func UnsupportedCounters

func UnsupportedCounters(protocol string) []string

UnsupportedCounters returns protocol-level counters this protocol does not report. A fresh slice keeps callers from mutating shared values. Hysteria2 and VLESS are treated as older agents unless their capability is supplied to UnsupportedCountersForNode.

func UnsupportedCountersForNode added in v0.1.57

func UnsupportedCountersForNode(protocol string, agentCaps []string) []string

UnsupportedCountersForNode also accounts for node-agent capabilities. links/2 is the Hysteria2-only close and path-quality contract, and vless-unknown-keys/1 enables the VLESS unknown-user-ID counter.

func UnsupportedDescription

func UnsupportedDescription() string

UnsupportedDescription is the common note used by MCP descriptions and tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL