Documentation ¶
Overview ¶
date : 2015-08-31 author: xjdrew
Index ¶
- Constants
- Variables
- func Debug(format string, a ...interface{})
- func Error(format string, a ...interface{})
- func Info(format string, a ...interface{})
- func Log(format string, a ...interface{})
- func LogCurStack(format string, a ...interface{})
- func LogStack(format string, a ...interface{})
- func Panic(format string, a ...interface{})
- func Recover()
- func Trace(format string, a ...interface{})
- type Buffer
- type Client
- type ClientHub
- type Cmd
- type Hub
- type HubItem
- type HubQueue
- type IdAllocator
- type MPool
- type Server
- type ServerHub
- type Taa
- type TcpListener
- type Tunnel
- type TunnelConn
- type UdtListener
Constants ¶
View Source
const ( TaaTokenSize int = aes.BlockSize TaaSignatureSize int = md5.Size TaaBlockSize int = TaaTokenSize + TaaSignatureSize )
View Source
const ( LINK_DATA uint8 = iota LINK_CREATE LINK_CLOSE LINK_CLOSE_RECV LINK_CLOSE_SEND TUN_HEARTBEAT )
View Source
const ( TunnelMaxId = ^uint16(0) TunnelMaxTimeout = 3600 TunnelPacketSize = 8192 TunnelKeepAlivePeriod = time.Second * 180 )
Variables ¶
View Source
var ( Timeout int = 0 LogLevel uint = 1 Udt bool = false )
Functions ¶
func LogCurStack ¶
func LogCurStack(format string, a ...interface{})
Types ¶
type ClientHub ¶
type ClientHub struct { *Hub // contains filtered or unexported fields }
client hub
type IdAllocator ¶
type IdAllocator struct {
// contains filtered or unexported fields
}
func (*IdAllocator) Acquire ¶
func (alloc *IdAllocator) Acquire() uint16
func (*IdAllocator) Release ¶
func (alloc *IdAllocator) Release(id uint16)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
tunnel server
type ServerHub ¶
type ServerHub struct { *Hub // contains filtered or unexported fields }
server hub
type Taa ¶
type Taa struct {
// contains filtered or unexported fields
}
gotunnel auth algorithm
func (*Taa) CheckSignature ¶
func (*Taa) ExchangeCipherBlock ¶
exchange cipher block
func (*Taa) GenCipherBlock ¶
generate cipher block
func (*Taa) VerifyCipherBlock ¶
verify cipher block
type TcpListener ¶
type TcpListener struct {
*net.TCPListener
}
type Tunnel ¶
type Tunnel struct { *TunnelConn // contains filtered or unexported fields }
func (*Tunnel) ReadPacket ¶
can't read concurrently
type TunnelConn ¶
func (*TunnelConn) Flush ¶
func (conn *TunnelConn) Flush() error
func (*TunnelConn) SetCipherKey ¶
func (conn *TunnelConn) SetCipherKey(key []byte)
type UdtListener ¶
Click to show internal directories.
Click to hide internal directories.