Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConnectionClosedErr = "use of closed network connection" ConnectionResetErr = "connection reset by peer" DefaultMaxTeardownTimeInSeconds = 10 )
View Source
const SO_ORIGINAL_DST = 80
Variables ¶
This section is empty.
Functions ¶
func FerryBytes ¶
func FerryBytes( client *net.TCPConn, server *net.TCPConn, cnxId string, maxTeardownTimeInSecs int, )
FerryBytes copies bytes between two sockets. Tries to handle disconnections safely. When one socket disconnects, a CloseWrite() is done to the other socket, and a teardown timer started with the specified timeout value (if value is zero, a default value of 10 seconds is used). If a graceful disconnect from the other socket is not detected within that period, the other end is forcefully closed.
func OriginalDestination ¶
OriginalDestination returns an intercepted connection's original destination. Adapted from https://play.golang.org/p/GMAaKucHOr
func RandomString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.