Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelayCallback ¶
DelayCallback is a callback that determines how much delay to apply to a packet.
var NoDelay DelayCallback = func(Direction, uint64) time.Duration {
return 0
}
NoDelay doesn't apply a delay.
type Direction ¶
type Direction int
Direction is the direction a packet is sent.
type DropCallback ¶
DropCallback is a callback that determines which packet gets dropped.
var NoDropper DropCallback = func(Direction, uint64) bool { return false }
NoDropper doesn't drop packets.
type Opts ¶
type Opts struct { // The address this proxy proxies packets to. RemoteAddr string // DropPacket determines whether a packet gets dropped. DropPacket DropCallback // DelayPacket determines how long a packet gets delayed. This allows // simulating a connection with non-zero RTTs. // Note that the RTT is the sum of the delay for the incoming and the outgoing packet. DelayPacket DelayCallback }
Opts are proxy options.
Click to show internal directories.
Click to hide internal directories.