metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeasureConn

func MeasureConn(conn onet.DuplexConn, bytesSent, bytesReceived *int64) onet.DuplexConn

Types

type ProxyMetrics

type ProxyMetrics struct {
	ClientProxy int64
	ProxyTarget int64
	TargetProxy int64
	ProxyClient int64
}

type ShadowsocksMetrics

type ShadowsocksMetrics interface {
	GetLocation(net.Addr) (string, error)

	SetNumAccessKeys(numKeys int, numPorts int)
	AddUDPPacketFromClient(clientLocation, accessKey, status string, clientProxyBytes, proxyTargetBytes int)
	AddUDPPacketFromTarget(clientLocation, accessKey, status string, targetProxyBytes, proxyClientBytes int)
	AddOpenTCPConnection(clientLocation string)
	AddClosedTCPConnection(clientLocation, accessKey, status string, data ProxyMetrics, duration time.Duration)

	AddUdpNatEntry()
	RemoveUdpNatEntry()
}

ShadowsocksMetrics registers metrics for the Shadowsocks service.

func NewShadowsocksMetrics

func NewShadowsocksMetrics(ipCountryDB *geoip2.Reader) ShadowsocksMetrics

Jump to

Keyboard shortcuts

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