Add support for control connection authentication
Since vncauthproxy no longer uses Unix domain sockets for the controlconnection handling, authentication handling, which was done with POSIXfile permissions, must be implemented in vncauthproxy.
The /var/lib/vncauthproxy/users file (configurable) acts as an...
Use SSL/TLS for control connections
Control connections now use SSL/TLS by default. Since, vncauthproxy controlconnections now use TCP/IP instead of Unix domain sockets, sensitiveinformation could be sent over possibly untrusted / insecure channels.
Set SO_REUSEADDR for the control socket
Fix typos/mistakes introduced by the refactoring
Code refactoring
Minor lexical fixes
Use TCP instead of UNIX sockets (first try)
Initial 'implementation' of vncauthproxy using TCP sockets instead ofUNIX domain sockets for control connections.
By default, it will bind to 127.0.0.1:24999 (forwarding ports start atTCP 25000). The client was changed accordingly....
Make control connection handling async
For every incoming control connection, accept() inside the main loop anddispatch the connection handling/establishment to a new greenlet.
The async handling of the control connections ensures that vncauhtproxy won't...
Modify default port range for port pool
The default port range used for automatic port selectionwas chosen to be the ephemeral port range. This was the wrongthing to do, because it may conflict with ports used for outgoingconnections from the host on which vncauthproxy runs,...
Fix possible race in returning source port to pool
First make sure all sockets for a connection are closed,then return the source port number to the port pool.
This fixes a possible race where the greenlet gets preempted right afterreturning a port to the pool, and the port is picked up from the pool by...
Improve cleanup of worker greenlets
There are two worker greenlets per direction of an establishedconnection. This patch improves the way they are cleaned upby the main connection greenlet.
The workers are no longer linked together. This removes the hideous...
Fix a few more instances of logging
Fix a few more instances of logging, per pylint W6501,after commit c87d99e96.
Use gevent.sleep instead of time.sleep
Use green version of sleep() from gevent,so other greenlets get to run while a specific greenlet sleeps.
Make logging more consistent
Generate all logging-specific function members of VncAuthProxy("info", "error", etc) dynamically, from a single template.
Pass arguments to format string separately, as per pylint W6501,PEP282.
Fix minor typo
Be more verbose when waiting for client to connect
Support argument parsing in command line client
Make the vncauthproxy client a proper command line tool,by adding support for argument parsing. Also output debugginginformation to stderr.
Work with multiple versions of python-daemon
Make source PEP8-compliant
Minor fixes to diagnostics for pidfile handling
Remove stale pid lockfiles on daemon invocation
Make server connect retries and retry wait tunable
Wait for VNC server connection establishment
Wait until the connection to the VNC server has beenestablished, before sending a successful response to theclient.
Sending a response before establishing a connection to theserver could allow a malicious user to access a different...
Workaround libevent-dns fd lost after daemonizing
Currently, gevent uses libevent-dns for asynchornous DNS resolution,which opens a socket upon initialization time. This fails whenbecoming a daemon, leading to all DNS queries timing out, since all file...
Fix crash, Use self.{listeners,password} in proxy
Adjust the control sockets umask
Add g=rwx to the control socket's umask as to allow the owning group tocontrol the proxy (useful e.g. when wanting to do chgrp www-data)
Fix logger crash
Commit 138d0e8 scoped the main flow to a main() function. It seems thatthe variable "logger" was being set there and used in the rest of theprogram implicitly global, which of course make the proxy the crashwhenever it wanted to log something :-)...
Major restructuring of the directory layout
Create a proper Python package called "vncauthproxy" and move the proxyand the client there; also create a vncauthproxy.py, that imports fromthe package and calls its main()