mirror of
https://github.com/amitbet/vncproxy.git
synced 2025-08-19 05:57:05 +00:00
new proto
This commit is contained in:
parent
a91646069e
commit
b65099a6bc
BIN
bin/recordings/recording_1565196968/client.rbs
Normal file
BIN
bin/recordings/recording_1565196968/client.rbs
Normal file
Binary file not shown.
BIN
bin/recordings/recording_1565196968/server.rbs
Normal file
BIN
bin/recordings/recording_1565196968/server.rbs
Normal file
Binary file not shown.
BIN
bin/recordings/recording_1565197944/client.rbs
Normal file
BIN
bin/recordings/recording_1565197944/client.rbs
Normal file
Binary file not shown.
0
bin/recordings/recording_1565197944/server.rbs
Normal file
0
bin/recordings/recording_1565197944/server.rbs
Normal file
BIN
bin/recordings/recording_1565198023/client.rbs
Normal file
BIN
bin/recordings/recording_1565198023/client.rbs
Normal file
Binary file not shown.
BIN
bin/recordings/recording_1565198225/client.rbs
Normal file
BIN
bin/recordings/recording_1565198225/client.rbs
Normal file
Binary file not shown.
BIN
bin/recordings/recording_1565198561/client.rbs
Normal file
BIN
bin/recordings/recording_1565198561/client.rbs
Normal file
Binary file not shown.
0
bin/recordings/recording_1565198561/server.rbs
Normal file
0
bin/recordings/recording_1565198561/server.rbs
Normal file
BIN
bin/recordings/recording_1565199074/client.rbs
Normal file
BIN
bin/recordings/recording_1565199074/client.rbs
Normal file
Binary file not shown.
0
bin/recordings/recording_1565199074/server.rbs
Normal file
0
bin/recordings/recording_1565199074/server.rbs
Normal file
BIN
bin/recordings/recording_1565199179/client.rbs
Normal file
BIN
bin/recordings/recording_1565199179/client.rbs
Normal file
Binary file not shown.
0
bin/recordings/recording_1565199179/server.rbs
Normal file
0
bin/recordings/recording_1565199179/server.rbs
Normal file
BIN
bin/vnc_recorder
BIN
bin/vnc_recorder
Binary file not shown.
@ -134,7 +134,6 @@ func (r *ClientRecorder) HandleRfbSegment(data *common.RfbSegment) error {
|
|||||||
r.writeToDisk()
|
r.writeToDisk()
|
||||||
case common.SegmentRectSeparator:
|
case common.SegmentRectSeparator:
|
||||||
logger.Debugf("ClientRecorder.HandleRfbSegment: not writing rect")
|
logger.Debugf("ClientRecorder.HandleRfbSegment: not writing rect")
|
||||||
//r.writeToDisk()
|
|
||||||
case common.SegmentBytes:
|
case common.SegmentBytes:
|
||||||
logger.Debug("ClientRecorder.HandleRfbSegment: not writing bytes, len:", len(data.Bytes))
|
logger.Debug("ClientRecorder.HandleRfbSegment: not writing bytes, len:", len(data.Bytes))
|
||||||
if r.buffer.Len()+len(data.Bytes) > r.maxWriteSize-4 {
|
if r.buffer.Len()+len(data.Bytes) > r.maxWriteSize-4 {
|
||||||
@ -146,20 +145,20 @@ func (r *ClientRecorder) HandleRfbSegment(data *common.RfbSegment) error {
|
|||||||
r.serverInitMessage = data.Message.(*common.ServerInit)
|
r.serverInitMessage = data.Message.(*common.ServerInit)
|
||||||
case common.SegmentFullyParsedClientMessage:
|
case common.SegmentFullyParsedClientMessage:
|
||||||
clientMsg := data.Message.(common.ClientMessage)
|
clientMsg := data.Message.(common.ClientMessage)
|
||||||
|
|
||||||
switch clientMsg.Type() {
|
switch clientMsg.Type() {
|
||||||
case common.SetPixelFormatMsgType:
|
case common.SetPixelFormatMsgType:
|
||||||
clientMsg := data.Message.(*server.MsgSetPixelFormat)
|
clientMsg := data.Message.(*server.MsgSetPixelFormat)
|
||||||
logger.Debugf("ClientRecorder.HandleRfbSegment: client message %v", *clientMsg)
|
logger.Debugf("ClientRecorder.HandleRfbSegment: client message %v", *clientMsg)
|
||||||
r.serverInitMessage.PixelFormat = clientMsg.PF
|
r.serverInitMessage.PixelFormat = clientMsg.PF
|
||||||
case common.KeyEventMsgType:
|
case common.KeyEventMsgType:
|
||||||
clientMsg := data.Message.(*server.MsgKeyEvent)
|
clientMsg := data.Message.(common.ClientMessage)
|
||||||
logger.Debug("Recorder.HandleRfbSegment: writing bytes for KeyEventMsgType, len:", *clientMsg)
|
logger.Debug("Recorder.HandleRfbSegment: writing bytes for KeyEventMsgType, len:", clientMsg)
|
||||||
clientMsg.Write(r.writer)
|
binary.Write(r.writer, binary.BigEndian, clientMsg)
|
||||||
|
|
||||||
case common.PointerEventMsgType:
|
case common.PointerEventMsgType:
|
||||||
clientMsg := data.Message.(*server.MsgPointerEvent)
|
clientMsg := data.Message.(common.ClientMessage)
|
||||||
logger.Debug("Recorder.HandleRfbSegment: writing bytes for PointerEventMsgType, len:", *clientMsg)
|
logger.Debug("Recorder.HandleRfbSegment: writing bytes for PointerEventMsgType, len:", clientMsg)
|
||||||
clientMsg.Write(r.writer)
|
binary.Write(r.writer, binary.BigEndian, clientMsg)
|
||||||
default:
|
default:
|
||||||
//return errors.New("unknown client message type:" + string(data.UpcomingObjectType))
|
//return errors.New("unknown client message type:" + string(data.UpcomingObjectType))
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,6 @@ func (vp *VncProxy) newServerConnHandler(cfg *server.ServerConfig, sconn *server
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if session.Type == SessionTypeRecordingProxy {
|
if session.Type == SessionTypeRecordingProxy {
|
||||||
cconn.Listeners.AddListener(rec_s)
|
|
||||||
cconn.Listeners.AddListener(rec_c)
|
cconn.Listeners.AddListener(rec_c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user