mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
Fixed login timeout term handling/restoreState * NOTE breaking change to exit codes
Also some value => ref fixes for Conn receiver methods Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
parent
769df46fb1
commit
69a3fb5d08
8 changed files with 56 additions and 18 deletions
|
@ -59,7 +59,7 @@ func expandKeyMat(keymat []byte, blocksize int) []byte {
|
|||
/* Support functionality to set up encryption after a channel has
|
||||
been negotiated via xsnet.go
|
||||
*/
|
||||
func (hc Conn) getStream(keymat []byte) (rc cipher.Stream, mc hash.Hash, err error) {
|
||||
func (hc *Conn) getStream(keymat []byte) (rc cipher.Stream, mc hash.Hash, err error) {
|
||||
var key []byte
|
||||
var block cipher.Block
|
||||
var iv []byte
|
||||
|
|
|
@ -62,9 +62,12 @@ const (
|
|||
CSOTermSize // set term size (rows:cols)
|
||||
CSOExitStatus // Remote cmd exit status
|
||||
CSOChaff // Dummy packet, do not pass beyond decryption
|
||||
|
||||
// Client side errors
|
||||
CSOLoginTimeout = 16
|
||||
|
||||
// Tunnel setup/control/status
|
||||
CSOTunSetup // client -> server tunnel setup request (dstport)
|
||||
CSOTunSetup = 32 // client -> server tunnel setup request (dstport)
|
||||
CSOTunSetupAck // server -> client tunnel setup ack
|
||||
CSOTunRefused // server -> client: tunnel rport connection refused
|
||||
CSOTunData // packet contains tunnel data [rport:data]
|
||||
|
|
|
@ -40,7 +40,7 @@ func getKCPalgnum(extensions []string) (k KCPAlg) {
|
|||
switch s {
|
||||
case "KCP_NONE":
|
||||
k = KCP_NONE
|
||||
break //out of for
|
||||
break //golint:ignore SA4011 out of for
|
||||
case "KCP_AES":
|
||||
k = KCP_AES
|
||||
break //out of for
|
||||
|
|
|
@ -191,11 +191,11 @@ func (hc *Conn) Unlock() {
|
|||
hc.m.Unlock()
|
||||
}
|
||||
|
||||
func (hc Conn) KEX() KEXAlg {
|
||||
func (hc *Conn) KEX() KEXAlg {
|
||||
return hc.kex
|
||||
}
|
||||
|
||||
func (hc Conn) GetStatus() CSOType {
|
||||
func (hc *Conn) GetStatus() CSOType {
|
||||
return *hc.closeStat
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ func (hc *Conn) SetStatus(stat CSOType) {
|
|||
//
|
||||
// (Used for protocol-level negotiations after KEx such as
|
||||
// cipher/HMAC algorithm options etc.)
|
||||
func (hc Conn) ConnOpts() uint32 {
|
||||
func (hc *Conn) ConnOpts() uint32 {
|
||||
return hc.cipheropts
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue