Versions in this module Expand all Collapse all v0 v0.1.0 Aug 31, 2020 Changes in this version + const QueueSize + func GetConnData(conn net.Conn, bufferSize int, delay time.Duration) ([]byte, error) + type CBPacket struct + Ack int + Payload string + Seq int + Target PeerType + Type CBPacketType + type CBPacketType int + const PacketTypeControl + const PacketTypeData + type Channel struct + func NewChannel(typ PeerType, options ChannelOptions) (*Channel, error) + func (c *Channel) CloseChannel() + func (c *Channel) Receive() []byte + func (c *Channel) Send(data []byte) + type ChannelOptions struct + Blocksize int + ControlPacketCallback ControlPacketCallback + DebugLogger *log.Logger + ErrorLogger *log.Logger + Interval time.Duration + Password string + TraceLogger *log.Logger + Transport string + type ControlPacketCallback func(cmd, arg string) + type PeerType int + const CLIENT + const SERVER + type PortForwarding struct + Host string + HostPort string + Port string + func ParsePortForwarding(param string) (*PortForwarding, error) + type Tunnel struct + func NewTunnel(typ PeerType, options ChannelOptions) (*Tunnel, error) + func (c *Tunnel) AddLocalPortForwarding(fwd PortForwarding) + func (c *Tunnel) AddRemotePortForwarding(fwd PortForwarding) + func (t *Tunnel) ExecuteCommand(cmd string) (output string, err error) + func (t *Tunnel) StartClient() + func (t *Tunnel) StartServer() + func (t *Tunnel) StartSftp() *sftp.Client + func (t *Tunnel) StartSocksOnPort(port int)