RFB协议及源码

VNC采用RFB通信协议。RFB("remote 帧缓存")是一个远程图形用户的简单协议,因为它工作在帧缓存级别上。VNC(Virtual Network Computing)基本上是属于一种显示系统,也就是说它能将完整的窗口界面通过网络,传输到另一台计算机的屏幕上.
摘要由CSDN通过智能技术生成

1、VNC简介

  VNC采用RFB通信协议。RFB("remote 帧缓存")是一个远程图形用户的简单协议,因为它工作在帧缓存级别上。VNC(Virtual Network Computing)基本上是属于一种显示系统,也就是说它能将完整的窗口界面通过网络,传输到另一台计算机的屏幕上.


独特的计算环境 

  RFB协议可进行可靠的传输,如字节流或基于消息的。和大多数协议一样,它也是通过TCP/IP协议簇连接

  协议由三步完成连接:

    首先是握手报文,目的是对协议版本和加密方式进行协商。

    第二步是初始化报文,主要用于客户和服务器的初始化消息。

    最后就是正常握手始于服务器向客户发送协议版本的消息,告知客户服务器所能支持RFB 协议的最高版本号。此时客户端会发送相似的消息告诉服务器将要使用的协议版本。客户端不应该请求高于服务器的协议版本。如此一来就给客户和服务器端提供了一种向后兼容机制。 

  一旦协议版本被确定,服务器和客户端必须一致同意连接的安全类型。服务器发送所支持的安全类型,当客户端支持服务器的某一种安全类型,客户端选择这种安全认证类型并发送给服务器。否则客户端发送失败,并标识出失败原因。


安全认证 

  安全认证有多种,有一种为VNC安全认证,当用VNC认证的时候,协议数据采用明文发送,服务器发送一个16字节的随机数验证给客户端,客户端用DES对验证进行加密,用用户密码作为密钥回复给服务器16字节,这时服务器会返回安全结果给客户端。如果成功就进入初始化报文阶段。不成功就关闭连接

  当安全认证成功后,客户端会发送客户端是否共享服务器初始化报文,当客户端设置报文为可共享时,服务器查看当前配置是否允许共享连接,如果同意,则不关闭之前连接的客户端,否则断开之前连接的客户端。 

  这时服务器会发送客户端初始化信息。这些信息包括:服务器上帧缓存的高宽,像素格式还有与桌面相关的名称,其中服务器象素定义服务器本来的象素格式,这种象素格式会被一直使用,除非客户端使用设置象素格式消息来请求另一种象素格式。

  至此初始化报文阶段完成,进入协议交互阶段。 

  协议交互分为客户到服务器消息和服务器到客户消息。


2、UltraVNC、TightVNC、RealVNC联系与比较:

  RealVNC:由VNC團隊部份成員開發,分為全功能商业版和免费版。RealVNC只提供旧版本的源码
  TightVNC:強調節省頻寬使用。 
  UltraVNC:加入了TightVNC的部份程式及加強效能的图形映射驱动程式,并結合Active Directory及NTLM的账号密码认证,但仅仅有Windows版本。UltraVNC每更新一个版本都会随之附加最新版源码


RealVNC

  • The original developers. Out in the market the longest.
  • The free version lacks a lot of features which are included in other VNC clients and it not being actively developed. Not a good thing.

RealVNC provides remote control software which lets you see and interact with desktop applications across any network.

The software has a widespread user base from individuals to the largest multi-national companies. Founded by the original developers of VNC to promote, enhance and commercialise VNC.

TightVNC

  • Const Kaplinsky’s project to improve VNC’s compression between server and viewer. Good replacement for RealVNC, but graphic and performance is sluggish sometimes.
  • Does not allow remote copy and paste
  • The project is being actively maintain, which is a plus.

TightVNC is a free remote control software package. With TightVNC, you can see the desktop of a remote machine and control it with your local mouse and keyboard, just like you would do it sitting in the front of that computer. TightVNC is:

* free for both personal and commercial usage, with full source code available (GPL-licensed);
* useful in remote administration, remote customer support, education, and for many other purposes;
* cross-platform, available for Windows and Unix, compatible with other VNC software.

UltraVNC

  • A project to add in file transfer, chat messaging and NTLM authentication to VNC.
  • Based on experience, UltraVNC runs faster than the other two and has better graphics.
  • Has file transfer, faster conn
  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值