proxy

package
v0.0.0-...-96f71fc Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipe

type Pipe interface {
	Run(ctx context.Context) error
}

A generalize representation of a pipe A pipe represents a stream of proxy traffic for a given session, either "up" (from client to upstream", or "down" (from upstream back to client)

func NewDelayedPipe

func NewDelayedPipe(src net.Conn, dst net.Conn, delay time.Duration) Pipe

func NewSimplePipe

func NewSimplePipe(src net.Conn, dst net.Conn) Pipe

type Server

type Server interface {
	Run(context.Context) error
}

func NewTcpDelayServer

func NewTcpDelayServer(listenPort int, upDelay time.Duration, downDelay time.Duration, randomizeDelay bool, upstreamAddr string) Server

type Session

type Session interface {
	Run(ctx context.Context) error
}

func NewDelayedSession

func NewDelayedSession(upDelay time.Duration, downDelay time.Duration, clientConn net.Conn, upStreamAddr string) Session

Jump to

Keyboard shortcuts

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