VNC is GPL. You could download the code and start with that. Recently, some interns over at Fog Creek worked on a project called Copilot, which is a specialized version of VNC that connects to a closed source server software. They have a blog over at http://www.projectaardvark.com/ but development is over, and there haven't been new posts in a while.