metrics

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: GPL-3.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// connections
	MaxConn         uint64 // max number of connections ever reached
	ActiveOpens     uint64 // accumulated active open connections
	PassiveOpens    uint64 // accumulated passive open connections
	CurrEstablished uint64 // current number of established connections

	// server decryption
	ServerDirectDecrypt       uint64 // number of decryption using the cipher block associated with the connection
	ServerFailedDirectDecrypt uint64 // number of decryption using the stored cipher block but failed

	// client decryption
	ClientDirectDecrypt       uint64 // number of decryption using the cipher block associated with the connection
	ClientFailedDirectDecrypt uint64 // number of decryption using the stored cipher block but failed

	// UDP packets
	InPkts  uint64 // incoming packets count
	OutPkts uint64 // outgoing packets count

	// KCP segments
	InSegs           uint64 // incoming KCP segments
	OutSegs          uint64 // outgoing KCP segments
	RepeatSegs       uint64 // repeated KCP segments
	LostSegs         uint64 // lost KCP segments
	OutOfWindowSegs  uint64 // KCP segments that have sequence number out of receiving window
	FastRetransSegs  uint64 // fast retransmission KCP segments
	EarlyRetransSegs uint64 // early retransmission KCP segments
	RetransSegs      uint64 // retransmission KCP segments

	// UDP bytes
	UDPInBytes  uint64 // UDP bytes received
	UDPOutBytes uint64 // UDP bytes sent

	// KCP bytes
	KCPBytesSent     uint64 // KCP bytes sent from upper level
	KCPBytesReceived uint64 // KCP bytes delivered to upper level
	KCPPaddingSent   uint64 // KCP bytes sent for padding purpose

	TCPInBytes     uint64 // TCP bytes received
	TCPOutBytes    uint64 // TCP bytes sent
	TCPPaddingSent uint64 // TCP bytes sent for padding purpose

	// Replay protection
	ReplayKnownSession uint64 // replay packets sent from a known session
	ReplayNewSession   uint64 // replay packets sent from a new session

	// UDP Errors
	UDPInErrors      uint64 // UDP read errors reported from net.PacketConn
	KCPInErrors      uint64 // packet input errors reported from KCP
	KCPSendErrors    uint64 // packet send errors reported from KCP
	KCPReceiveErrors uint64 // packet receive errors reported from KCP

	// TCP Errors
	TCPSendErrors    uint64 // TCP send errors
	TCPReceiveErrors uint64 // TCP receive errors

	// Socks5 Errors
	Socks5HandshakeErrors          uint64 // Socks5 handshake errors
	Socks5DNSResolveErrors         uint64 // Socks5 can't resolve DNS address
	Socks5UnsupportedCommandErrors uint64 // Socks5 command is not supported
	Socks5NetworkUnreachableErrors uint64 // Destination network is unreachable
	Socks5HostUnreachableErrors    uint64 // Destination Host is unreachable
	Socks5ConnectionRefusedErrors  uint64 // Connection is refused
)

Functions

func DisableLogging

func DisableLogging()

Disable metrics logging.

func EnableLogging

func EnableLogging()

Enable metrics logging with the given time duration.

func LogClientDecryption added in v1.4.0

func LogClientDecryption()

func LogConnections

func LogConnections()

func LogKCPBytes

func LogKCPBytes()

func LogKCPSegments

func LogKCPSegments()

func LogReplay added in v1.1.0

func LogReplay()

func LogServerDecryption added in v1.4.0

func LogServerDecryption()

func LogSocks5Errors added in v1.5.0

func LogSocks5Errors()

func LogTCPBytes added in v1.4.0

func LogTCPBytes()

func LogTCPErrors added in v1.5.0

func LogTCPErrors()

func LogUDPBytes

func LogUDPBytes()

func LogUDPErrors added in v1.5.0

func LogUDPErrors()

func LogUDPPackets

func LogUDPPackets()

func SetLoggingDuration

func SetLoggingDuration(duration time.Duration) error

Set the metrics logging time duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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