Documentation ¶
Index ¶
- Constants
- Variables
- func ByteContains(x, y []byte) (n []byte, contain bool)
- func UrlQueryUnescape(old string) (string, error)
- type WebSSH
- func (ws *WebSSH) AddSSHConn(conn net.Conn)
- func (ws *WebSSH) AddWebsocket(conn *websocket.Conn)
- func (ws *WebSSH) DisableRZ()
- func (ws *WebSSH) DisableSZ()
- func (ws *WebSSH) EnableRZ()
- func (ws *WebSSH) EnableSZ()
- func (ws *WebSSH) SetBuffSize(buffSize uint32)
- func (ws *WebSSH) SetConnTimeOut(connTimeout time.Duration)
- func (ws *WebSSH) SetId(id string)
- func (ws *WebSSH) SetLogOut(out io.Writer)
- func (ws *WebSSH) SetLogger(logger *log.Logger)
- func (ws *WebSSH) SetTerm(term string)
Constants ¶
View Source
const ( TermLinux = "linux" TermAnsi = "ansi" TermScoAnsi = "scoansi" TermXterm = "xterm" TermXterm256Color = "xterm-256color" TermVt100 = "vt100" TermVt102 = "vt102" TermVt220 = "vt220" TermVt320 = "vt320" TermWyse50 = "wyse50" TermWyse60 = "wyse60" TermDumb = "dumb" )
Variables ¶
View Source
var ( DefaultTerm = TermXterm DefaultConnTimeout = 15 * time.Second DefaultLogger = log.New(ioutil.Discard, "[webssh] ", log.Ltime|log.Ldate) DefaultBuffSize = uint32(8192) )
View Source
var ( // sz fmt.Sprintf("%+q", "rz\r**\x18B00000000000000\r\x8a\x11") //ZModemSZStart = []byte{13, 42, 42, 24, 66, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 13, 138, 17} ZModemSZStart = []byte{42, 42, 24, 66, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 13, 138, 17} // sz 结束 fmt.Sprintf("%+q", "\r**\x18B0800000000022d\r\x8a") //ZModemSZEnd = []byte{13, 42, 42, 24, 66, 48, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 100, 13, 138} ZModemSZEnd = []byte{42, 42, 24, 66, 48, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 100, 13, 138} // sz 结束后可能还会发送两个 OO,但是经过测试发现不一定每次都会发送 fmt.Sprintf("%+q", "OO") ZModemSZEndOO = []byte{79, 79} // rz fmt.Sprintf("%+q", "**\x18B0100000023be50\r\x8a\x11") ZModemRZStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 48, 50, 51, 98, 101, 53, 48, 13, 138, 17} // rz -e fmt.Sprintf("%+q", "**\x18B0100000063f694\r\x8a\x11") ZModemRZEStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 48, 54, 51, 102, 54, 57, 52, 13, 138, 17} // rz -S fmt.Sprintf("%+q", "**\x18B0100000223d832\r\x8a\x11") ZModemRZSStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 50, 50, 51, 100, 56, 51, 50, 13, 138, 17} // rz -e -S fmt.Sprintf("%+q", "**\x18B010000026390f6\r\x8a\x11") ZModemRZESStart = []byte{42, 42, 24, 66, 48, 49, 48, 48, 48, 48, 48, 50, 54, 51, 57, 48, 102, 54, 13, 138, 17} // rz 结束 fmt.Sprintf("%+q", "**\x18B0800000000022d\r\x8a") ZModemRZEnd = []byte{42, 42, 24, 66, 48, 56, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 50, 100, 13, 138} // **\x18B0 ZModemRZCtrlStart = []byte{42, 42, 24, 66, 48} // \r\x8a\x11 ZModemRZCtrlEnd1 = []byte{13, 138, 17} // \r\x8a ZModemRZCtrlEnd2 = []byte{13, 138} // zmodem 取消 \x18\x18\x18\x18\x18\x08\x08\x08\x08\x08 ZModemCancel = []byte{24, 24, 24, 24, 24, 8, 8, 8, 8, 8} )
Functions ¶
func ByteContains ¶ added in v0.0.7
func UrlQueryUnescape ¶ added in v0.1.7
Types ¶
Click to show internal directories.
Click to hide internal directories.