speedtest

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package speedtest measures a peer Xray proxy using an isolated outbound-only client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	PeerOutbound   json.RawMessage `json:"peer_outbound"`
	DownloadURL    string          `json:"download_url"`
	UploadURL      string          `json:"upload_url"`
	MaxBytes       int64           `json:"max_bytes,omitempty"`
	TimeoutSeconds int             `json:"timeout_seconds,omitempty"`
}

type Result

type Result struct {
	LatencyMillis  []float64 `json:"request_latency_millis"`
	DownloadBytes  int64     `json:"download_bytes"`
	UploadBytes    int64     `json:"upload_bytes"`
	DownloadMbps   float64   `json:"download_mbps"`
	UploadMbps     float64   `json:"upload_mbps"`
	DurationMillis int64     `json:"duration_millis"`
}

func Run

func Run(ctx context.Context, request Request, progress func(string)) (Result, error)

Jump to

Keyboard shortcuts

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