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 Client
- type Cmd
- type Conn
- type Hub
- type HubItem
- type HubQueue
- type IdAllocator
- type Link
- type LinkBuffer
- type MPool
- type Server
- type ServerHub
- type Service
- type Taa
- type Tunnel
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 )
View Source
const (
PacketSize = 8192
)
tunnel read/write timeout
Variables ¶
View Source
var ( Timeout int64 = 0 LogLevel uint = 1 )
Functions ¶
func LogCurStack ¶
func LogCurStack(format string, a ...interface{})
Types ¶
type Conn ¶
func (*Conn) SetCipherKey ¶
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 Link ¶
type Link struct {
// contains filtered or unexported fields
}
func (*Link) SendCreate ¶
func (link *Link) SendCreate()
type LinkBuffer ¶
type LinkBuffer struct {
// contains filtered or unexported fields
}
func NewLinkBuffer ¶
func NewLinkBuffer(sz int) *LinkBuffer
func (*LinkBuffer) Close ¶
func (b *LinkBuffer) Close() bool
func (*LinkBuffer) Len ¶
func (b *LinkBuffer) Len() int
func (*LinkBuffer) Pop ¶
func (b *LinkBuffer) Pop() ([]byte, bool)
func (*LinkBuffer) Put ¶
func (b *LinkBuffer) Put(data []byte) bool
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
Click to show internal directories.
Click to hide internal directories.