scenarios

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timeout = time.Second * 2

Functions

func BuildV2Ray

func BuildV2Ray() error

func CloseAllServers

func CloseAllServers(servers []*exec.Cmd)

func CloseServer

func CloseServer(server *exec.Cmd)

func GetSourcePath

func GetSourcePath() string

func RunV2RayProtobuf

func RunV2RayProtobuf(config []byte) *exec.Cmd

func StartDnsServer

func StartDnsServer() (*dns.Server, uint16)

func StartTcpServer

func StartTcpServer() (tcp.Server, net1.Destination)

func StartUdpServer

func StartUdpServer() (*udp.Server, net1.Destination)

func StartUdpServers

func StartUdpServers() map[*udp.Server]net1.Destination

func TestTCPConn

func TestTCPConn(port net1.Port, payloadSize int, timeout time.Duration) func() error

func TestTCPConnTls

func TestTCPConnTls(port net1.Port, payloadSize int, timeout time.Duration) func() error

func TestTCPConnTls2

func TestTCPConnTls2(conn net.Conn, payloadSize int, timeout time.Duration) func() error

func TestUDPConn

func TestUDPConn(port net1.Port, payloadSize int, timeout time.Duration) func() error

func TestUDPConnN

func TestUDPConnN(port net1.Port, payloadSize int, timeout time.Duration, num int) func() error

func WriteToConn

func WriteToConn(conn net.Conn, payloadSize int, timeout time.Duration) func() error

Write [payloadSize] bytes to [conn] and read [payloadSize] bytes from [conn] and using xor to check the correctness of the data

func Xor

func Xor(b []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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