VNC Proxy Server: CCVnc

Sponsored by Mark Murphy, mmurphy at codecorps org.

INTRODUCTION

CCVNCProxy is a 100% pure Java implementation of a proxy for VNC 
(Virtual Network Computing) protocol.

The purpose of this server is to allow VNC sessions to occur when one or
both sides of the session are behind a firewall, forcing both sides to
have to initiate their own connections. One scenario is for this server
to enable training-style VNC sessions (one server, many viewers), where
any or all participants are behind firewalls that do not accept incoming
connections. The other scenario to consider is customer support, where
the person needing desktop application support sits on a PC behind a
firewall.

This project will be implemented in Java for long-term maintainability,
plus portability across platforms.

This project is similar to the VNC Reflector project on SourceForge.net.

Note that this proxy runs on a machine separate and distinct from all
other machines in this VNC session. The proxy is outside the firewalls
of the VNC server and VNC clients (where such firewalls exist). For
example, this proxy might run on a publicly hosted Internet server,
whereas all VNC users are behind corporate firewalls.


FEATURES

Can connect to VNC server or accept connection _from_ VNC server.

Can accept connections from VNC viewers.

Can forward traffic between server and clients and automatically
convert data to fit capabilities of remote system, eg. if server uses 24
bit depth and client wants data in 16 bit depth then proxy will convert
data to required depth on the fly.

Can use different passwords to enable full access or viewonly
access to VNC server for VNC clients. 

Can serve multiple VNC clients using one VNC server connection.

Can record VNC session to file and play recorded session to clients
later.

RFB protocol version 3.3 and 3.7 is supported.

It can serve thousands of clients on Duron600 with 512Mb of RAM.


FAQ

Q: Is it free?

A: Yes.

Q: What are the Licensing Terms?

A: This is an Open Source(tm) program. It is supplied under GNU GENERAL
PUBLIC LICENSE Version 2 as published by Free Software Foundation. See
COPYING for details.


RUNNING CCVNCProxy

First you need to start the XMLRPC handler (Controller).

Then you can call any XMLRPC method from remote host via Caller or any
another XMLRPC client.

See examples in "setups" directory.


COMPILING THE SOURCES

You need the following libraries:

junit.jar (junit-3.8.1.jar) - for tests
log4j.jar (log4j-1.2.8.jar) - for logging
xmlrpc.jar (xmlrpc-1.2b.jar) - for caller/controller

Put libraries into "lib" directory (or make symlinks to them).

Command "ant compile" will compile sources into "classes" directory.


ADDITIONAL PROPERTIES

List of all properties:

Class com.ccvnc.caller.Caller - accepts properties from command line

action - an action (eg. shutdown_meeting)
url - base URL of XMLRPC server
username - user name to authentificate on the CCVNC
password - password to authentificate on the CCVNC
display - display name
vncclient_fullaccess_password - password for VNC clients with full access
vncclient_viewonly_password - password for VNC clients with view only access
vncserver_host - full host name of the VNC server host
vncserver_display - number of the VNC display on the VNC server host
vncserver_password - password to use with VNC server
host - a host name to help user separate different sessions to differen hosts

Class com.ccvnc.Controller - accepts properties from command line, all
properties stored in the global application properties list which used
in each XMLRPC call execution as parent propeties list.

logger.conf - name of the file with configuration for log4j
  ("controller.conf" by default)
webserver.port - port to listen

Controller.authentificatorClass - a authentificator class name (eg.
  com.ccvnc.SimpleAuthentificator)

Class com.ccvnc.SimpleAuthentificator

SimpleAuthentificator.passwordsFileName - name of the file with
  usernames and passwords (username=password).

Class com.ccvnc.SessionManager

(Constructor)
trafficManagerClass - class to use as TrafficManager
trafficManager - or name of the standard class to use as TrafficManager
  (use "help" for list)
clientSocketFactoryClass - socket factory used to create server socket
  for client listener
serverSocketFactoryClass - socket factory used to create normal socket
  to connect to VNC server and server socket for server listener. See
  FBSSocketFactory properties.

(listenForClients)

dump_to - atach DumperClientInterface and dump content of each received
  packet to this file. See DumperClientInterface options.
record_to - atach RecorderClientInterface and record FBS stream to this
  file

(connectToServer)
autoreconnect - autoreconnect after server disconnect
autoreconnect.delay - delay between reconnect (5 seconds by default)

Class com.ccvnc.tm.AbstractTrafficManager
(configure)
encodings - fix list of supported encodings (use "help" for help)
pixelFormat - always use this pixel format (use "help" for help)

Class com.ccvnc.DumperClientInterface
dumper.verbose - be a bit verbose

Class com.ccvnc.FBSSocketFactory
fbsurl - full url to recorded VNC session in FBS format



XMLRPC API

method createMeeting
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String hostName - a host name of the VNC server (eg. homecomputer)
Vector propsVector - additional properties (pairs KEY VALUE)
returns String - display name

method listenForServer
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
String serverPassword - password to use with VNC server
Vector propsVector - additional properties (pairs KEY VALUE)
returns int - port number to connect with VNC server
throws IOException

method connectToServer
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
String hostName - host name of the VNC server
int serverPort - port on the VNC server host to use
String serverPassword - password to use with VNC server
Vector propsVector - additional properties (pairs KEY VALUE)
returns boolean - false if someting is fail
throws IOException 

method listenForClients
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
String clientFullAccessPassword - password for VNC viewers with full access
String clientViewOnlyPassword - password for VNC viewers with viewonly access
Vector propsVector - additional properties (pairs KEY VALUE)
returns int - port number to connect with VNC viewer
throws IOException

method shutdownMeeting - shutdowns whole meeting
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
Vector propsVector - additional properties (pairs KEY VALUE)
returns boolean - false if someting is fail

method shutdownServerInterface
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
Vector propsVector - additional properties (pairs KEY VALUE)
returns boolean - false if someting is fail

method shutdownClientInterface
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
Vector propsVector - additional properties (pairs KEY VALUE)
returns boolean - false if someting is fail

method shutdownServer
String userName - user name to authentificate on the CCVNC
String password - password to authentificate on the CCVNC
String displayName - display name
Vector propsVector - additional properties (pairs KEY VALUE)
returns boolean - false if someting is fail


TRAFFIC MANAGERS

OneToOneTrafficManager - simpliest traffic manager optimized to one VNC client
DumbTrafficManager - basic traffic manager
GreedyTrafficManager - tries to minimize traffic usage
SmartTrafficManager - not implemented
PlayerTrafficManager - optimized for playing recorded sessions

SourceForge.net Logo