Expected resultvnclog should be able to log the interaction between gvncviewer and pnmshow
Which erroneous result did you get instead
INFO:twisted:unknown encoding received <Encoding.TIGHT: 7>
Additional information
While #243 added NullTransport.loseConnection required for logproxy, it noticed this issue: currently stream handling is wrong in several cases: As neither TCP nor the RFB/VNC protocol defines any framing, all messages passed from client-to-server and server-to-client must be understood and handled.
While testing with gvncviewer as my client connecting LibVNCServer-0.9.14/examples/pnmshow24 as my server via vnclog I noticed, that they negotiated many more pseudo encoding than vnclog understands and can handle:
Afterwards vnclog is out-of-synchronization and starts logging many errors as most following bytes are seen as an unknown Server-to-Client message ID.
To handle this correctly vnclog needs to sit in-between of the client and the server and must rewrite some of those messages to filter out any AuthType, Encoding, … vncdotool does not understand.
Please include the following information:
vncdotool version 1.1.0-dev
VNC server and version LibVNCServer-0.9.14
Steps to reproduce
Expected result
vnclog
should be able to log the interaction betweengvncviewer
andpnmshow
Which erroneous result did you get instead
Additional information While #243 added
NullTransport.loseConnection
required forlogproxy
, it noticed this issue: currently stream handling is wrong in several cases: As neither TCP nor the RFB/VNC protocol defines any framing, all messages passed from client-to-server and server-to-client must be understood and handled. While testing withgvncviewer
as my client connectingLibVNCServer-0.9.14/examples/pnmshow24
as my server viavnclog
I noticed, that they negotiated many more pseudo encoding thanvnclog
understands and can handle:The
pnmshow24
server supports many of them, but not all:The last one is problematic as this results in a FramebufferUpdate-Message with the
Encoding.TIGHT
pseudo-encoding, whichvncdotool
cannot handle:Afterwards
vnclog
is out-of-synchronization and starts logging many errors as most following bytes are seen as an unknown Server-to-Client message ID.To handle this correctly
vnclog
needs to sit in-between of the client and the server and must rewrite some of those messages to filter out anyAuthType
,Encoding
, …vncdotool
does not understand.