x11vnc: add reverse -connect support to -display WAIT:, fix SSL Fetch cert only for -display WAIT:

pull/1/head
runge 18 years ago
parent eb2eeed97e
commit f31f7159b5

@ -1,3 +1,9 @@
2007-08-15 Karl Runge <runge@karlrunge.com>
* x11vnc: add reverse -connect support to -display WAIT:
i.e. -find, -create, -svc, ... mode. Document need for
-shared under -connect host1,host2,... Fix bug in -display
WAIT: mode if vnc client tries to only retrieve SSL cert.
2007-08-03 Karl Runge <runge@karlrunge.com>
* x11vnc: add -xrefresh option, fix KDE .DCOPserver parse bug,
make sure UNIXPW_DISABLE_LOCALHOST/-unixpw_unsafe ignore

@ -1,5 +1,5 @@
x11vnc README file Date: Fri Aug 3 17:26:56 EDT 2007
x11vnc README file Date: Wed Aug 15 15:33:58 EDT 2007
The following information is taken from these URLs:
@ -10060,6 +10060,7 @@ Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
has many additional features (see below for a list).
The short name for this project is "ssvnc" for SSL/SSH VNC Viewer.
This is the name of the command to start it.
It is a self-contained bundle, you could carry it around on, say, a
[4]USB memory stick / flash drive for secure VNC viewing from almost
@ -10082,7 +10083,7 @@ Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
connecting.
* You can also use your own VNC Viewer, e.g. UltraVNC or RealVNC,
with the front-end if you like.
* Sets up any additional SSH port redirections that you desire.
* Sets up any additional SSH port redirections that you want.
* Support for native MacOS X usage with bundled Chicken of the VNC
viewer.
* Reverse (viewer listening) VNC connections via SSL and SSH.
@ -10102,6 +10103,9 @@ Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
* Support for UltraVNC extensions: 1/n Server side scaling, Text
Chat, Single Window, Disable Server-side Input. Both UltraVNC and
x11vnc servers support these extensions.
* UltraVNC File Transfer via an auxiliary Java helper program (java
must be in $PATH). Note that x11vnc supports UltraVNC file
transfer.
* Extremely low color modes: 64 and 8 colors in 8bpp
(-use64/-bgr222, -use8/-bgr111)
* Medium color mode: 16bpp mode on a 32bpp Viewer display
@ -10127,7 +10131,7 @@ Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
* Fix for Popup menu positioning for old window managers (-popupfix
option).
The list of software bundled in the archive files:
The list of 3rd party software bundled in the archive files:
* TightVNC Viewer (windows, unix, macosx)
* Chicken of the VNC Viewer (macosx)
* Stunnel (windows, unix, macosx)
@ -10137,7 +10141,7 @@ Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
These are all self-contained in the bundle directory: they will not be
installed on your system. Just un-zip or un-tar the file you
downloaded and run it straight from its directory.
downloaded and run the frontend ssvnc straight from its directory.
Here is the Quick Start info from the README for how to do that:
Quick Start:
@ -10149,7 +10153,7 @@ Unix and Mac OS X:
Unpack the archive:
% gzip -dc ssvnc-1.0.17.tar.gz | tar xvf -
% gzip -dc ssvnc-1.0.18.tar.gz | tar xvf -
Run the GUI:
@ -10157,7 +10161,7 @@ Unix and Mac OS X:
% ./ssvnc/MacOSX/ssvnc (for Mac OS X)
The smaller file "ssvnc_no_windows-1.0.17.tar.gz" could have been
The smaller file "ssvnc_no_windows-1.0.18.tar.gz" could have been
used as well.
On MacOSX there is also a SSVNC.app directory icon you can click on
@ -10174,7 +10178,7 @@ Windows:
Unzip, using WinZip or a similar utility, the zip file:
ssvnc-1.0.17.zip
ssvnc-1.0.18.zip
Run the GUI, e.g.:
@ -10186,7 +10190,7 @@ Windows:
select Open, and then OK to launch it.
The smaller file "ssvnc_windows_only-1.0.17.zip" could have been used
The smaller file "ssvnc_windows_only-1.0.18.zip" could have been used
as well.
You can make a Windows shortcut to this program if you want to.
@ -10208,7 +10212,7 @@ C:
cd \ssvnc\Windows
ssvnc.exe
Update: A simple workaround is now in place were it will copy
Update: A simple workaround is now in place where it will copy
everything to a cache directory ss_vnc/cache in your Windows home
directory and run out of there.
_________________________________________________________________
@ -10238,9 +10242,11 @@ ssvnc.exe
you want to place SSVNC on a USB flash drive that you carry around for
mobile use and you want the profiles you create to stay with the drive
(otherwise you'd have to browse to the drive directory each time you
load or save). WARNING: if you use ssvnc from an "Internet Cafe", i.e.
an untrusted computer, someone may have set it up to be capturing your
keystrokes, etc.
load or save).
WARNING: if you use ssvnc from an "Internet Cafe", i.e. some untrusted
computer, please be aware that someone may have set up that machine to
be capturing your keystrokes, etc.
Dynamic VNC Server Port determination: If you are running SSVNC on
Unix and are using SSH to start the remote VNC server and the VNC
@ -10474,33 +10480,33 @@ Enhanced TightVNC viewer (SSVNC) options:
Downloading: This project can be downloaded here, choose the archive
file bundle that best suits you (e.g. no source code, windows only,
unix only, zip, tar etc):
[18]ssvnc_windows_only-1.0.17.zip Windows Binaries Only. No source incl
[18]ssvnc_windows_only-1.0.18.zip Windows Binaries Only. No source incl
uded (~6MB)
[19]ssvnc_no_windows-1.0.17.tar.gz Unix and Mac OS X Only. No Windows bin
[19]ssvnc_no_windows-1.0.18.tar.gz Unix and Mac OS X Only. No Windows bin
aries. Source included. (~6MB)
[20]ssvnc_unix_only-1.0.17.tar.gz Unix Binaries Only. No source incl
[20]ssvnc_unix_only-1.0.18.tar.gz Unix Binaries Only. No source incl
uded. (~3.5MB)
[21]ssvnc_unix_minimal-1.0.17.tar.gz Unix Minimal. You must supply your ow
[21]ssvnc_unix_minimal-1.0.18.tar.gz Unix Minimal. You must supply your ow
n vncviewer and stunnel. (~0.1MB)
[22]ssvnc-1.0.17.tar.gz All Unix, Mac OS X, and Windows binari
[22]ssvnc-1.0.18.tar.gz All Unix, Mac OS X, and Windows binari
es and source TGZ. (~11MB)
[23]ssvnc-1.0.17.zip All Unix, Mac OS X, and Windows binari
[23]ssvnc-1.0.18.zip All Unix, Mac OS X, and Windows binari
es and source ZIP. (~11MB)
[24]ssvnc_all-1.0.17.zip All Unix, Mac OS X, and Windows binari
[24]ssvnc_all-1.0.18.zip All Unix, Mac OS X, and Windows binari
es and source AND full archives in the zip dir. (~15MB)
You can try for an older one by replacing, e.g. ".17" by ".11", etc.
You can try for an older one by replacing, e.g. ".18" by ".11", etc.
Here are the corresponding development bundles:
[25]ssvnc_windows_only-1.0.18.zip
[26]ssvnc_no_windows-1.0.18.tar.gz
[27]ssvnc_unix_only-1.0.18.tar.gz
[28]ssvnc_unix_minimal-1.0.18.tar.gz
[25]ssvnc_windows_only-1.0.19.zip
[26]ssvnc_no_windows-1.0.19.tar.gz
[27]ssvnc_unix_only-1.0.19.tar.gz
[28]ssvnc_unix_minimal-1.0.19.tar.gz
[29]ssvnc-1.0.18.tar.gz
[30]ssvnc-1.0.18.zip
[31]ssvnc_all-1.0.18.zip
[29]ssvnc-1.0.19.tar.gz
[30]ssvnc-1.0.19.zip
[31]ssvnc_all-1.0.19.zip
Please help test the UltraVNC File Transfer support in the native Unix
VNC viewer!
@ -10533,7 +10539,8 @@ es and source AND full archives in the zip dir. (~15MB)
compatibility reasons they should install both by default but not all
do). So you may need to instruct your distro to install the 0.9.7
library (it is fine to have both runtimes installed simultaneously
since the libraries have different names).
since the libraries have different names). Update: I now try to
statically link libssl.a for all of the binaries in the archive.
You can also run the included build.unix script to try to
automatically build the binaries if your OS is not in the above list
@ -10645,6 +10652,9 @@ The enhanced TightVNC viewer features are:
ssh's builtin SOCKS proxy, -D) for servers like x11vnc that
print out PORT= at startup.
- Unix Username and Password entry for use with "x11vnc -unixpw"
type login dialogs.
(the following features only apply to the bundled Unix tightvnc viewer)
@ -10652,16 +10662,25 @@ The enhanced TightVNC viewer features are:
- ZRLE VNC encoding support (RealVNC's encoding)
- Cursor alphablending with x11vnc at 32bpp (-alpha option)
- Option "-unixpw ..." for use with "x11vnc -unixpw" login dialogs.
- Support for UltraVNC extensions: Single Window, Disable
Server-side Input, 1/n Server side scaling, Text Chat (shell
terminal UI). Both UltraVNC and x11vnc servers support these
extensions
- UltraVNC File Transfer via an auxiliary Java helper program
(java must be in $PATH). Note that x11vnc supports UltraVNC
file transfer.
- Extremely low color modes: 64 and 8 colors in 8bpp
(-use64/-bgr222, -use8/-bgr111)
- Medium color mode: 16bpp mode even for 32bpp Viewer display
(-16bpp/-bgr565)
- Cursor alphablending with x11vnc at 32bpp (-alpha option)
- Maintains its own BackingStore if the X server does not
- x11vnc's client-side caching -ncache method cropping option
(-ycrop n). This will "hide" the large pixel buffer cache
below the actual display. Set to actual height or use -1 for
@ -10670,6 +10689,14 @@ The enhanced TightVNC viewer features are:
- Scrollbar width setting: -sbwidth n, the default is very thin,
2 pixels, for less distracting -ycrop usage.
- Improvements to the Popup menu, all of these can now be changed
dynamically via the menu: ViewOnly, Toggle Bell, CursorShape
updates, X11 Cursor, Cursor Alphablending, Toggle Tight/ZRLE,
Toggle JPEG, FullColor/16bpp/8bpp (256/64/8 colors), Greyscale
for low color modes.
- Maintains its own BackingStore if the X server does not
- The default for localhost:0 connections is not raw encoding
(local machine). Default assumes you are using SSH tunnel. Use
-rawlocal to revert.
@ -10680,17 +10707,6 @@ The enhanced TightVNC viewer features are:
- Fix for Popup menu positioning for old window managers
(-popupfix option).
- Improvements to the Popup menu, all of these can now be changed
dynamically via the menu: ViewOnly, Toggle Bell, CursorShape
updates, X11 Cursor, Cursor Alphablending, Toggle Tight/ZRLE,
Toggle JPEG, FullColor/16bpp/8bpp (256/64/8 colors), Greyscale
for low color modes.
- Support for UltraVNC extensions: Single Window, Disable
Server-side Input, 1/n Server side scaling, Text Chat (shell
terminal UI). Both UltraVNC and x11vnc servers support these
extensions
- Run vncviewer -help for all options.
@ -10718,7 +10734,7 @@ Unix and Mac OS X:
Unpack the archive:
% gzip -dc ssvnc-1.0.15.tar.gz | tar xvf -
% gzip -dc ssvnc-1.0.18.tar.gz | tar xvf -
Run the GUI:
@ -10728,7 +10744,7 @@ Unix and Mac OS X:
On MacOSX you could also click on the SSVNC app in the Finder.
The smaller file "ssvnc_no_windows-1.0.15.tar.gz"
The smaller file "ssvnc_no_windows-1.0.18.tar.gz"
could have been used as well.
On MacOSX there is also a SSVNC.app directory icon you can click on
@ -10745,7 +10761,7 @@ Windows:
Unzip, using WinZip or a similar utility, the zip file:
ssvnc-1.0.15.zip
ssvnc-1.0.18.zip
Run the GUI, e.g.:
@ -10757,7 +10773,7 @@ Windows:
select Open, and then OK to launch it.
The smaller file "ssvnc_windows_only-1.0.15.zip"
The smaller file "ssvnc_windows_only-1.0.18.zip"
could have been used as well.
You can make a Windows shortcut to this program if you want to.
@ -11022,20 +11038,20 @@ References
15. http://www.karlrunge.com/x11vnc/index.html#faq-smb-shares
16. http://www.karlrunge.com/x11vnc/index.html#faq-cups
17. http://www.karlrunge.com/x11vnc/index.html#faq-sound
18. http://www.karlrunge.com/x11vnc/etv/ssvnc_windows_only-1.0.17.zip
19. http://www.karlrunge.com/x11vnc/etv/ssvnc_no_windows-1.0.17.tar.gz
20. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_only-1.0.17.tar.gz
21. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_minimal-1.0.17.tar.gz
22. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.17.tar.gz
23. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.17.zip
24. http://www.karlrunge.com/x11vnc/etv/ssvnc_all-1.0.17.zip
25. http://www.karlrunge.com/x11vnc/etv/ssvnc_windows_only-1.0.18.zip
26. http://www.karlrunge.com/x11vnc/etv/ssvnc_no_windows-1.0.18.tar.gz
27. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_only-1.0.18.tar.gz
28. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_minimal-1.0.18.tar.gz
29. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.18.tar.gz
30. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.18.zip
31. http://www.karlrunge.com/x11vnc/etv/ssvnc_all-1.0.18.zip
18. http://www.karlrunge.com/x11vnc/etv/ssvnc_windows_only-1.0.18.zip
19. http://www.karlrunge.com/x11vnc/etv/ssvnc_no_windows-1.0.18.tar.gz
20. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_only-1.0.18.tar.gz
21. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_minimal-1.0.18.tar.gz
22. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.18.tar.gz
23. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.18.zip
24. http://www.karlrunge.com/x11vnc/etv/ssvnc_all-1.0.18.zip
25. http://www.karlrunge.com/x11vnc/etv/ssvnc_windows_only-1.0.19.zip
26. http://www.karlrunge.com/x11vnc/etv/ssvnc_no_windows-1.0.19.tar.gz
27. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_only-1.0.19.tar.gz
28. http://www.karlrunge.com/x11vnc/etv/ssvnc_unix_minimal-1.0.19.tar.gz
29. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.19.tar.gz
30. http://www.karlrunge.com/x11vnc/etv/ssvnc-1.0.19.zip
31. http://www.karlrunge.com/x11vnc/etv/ssvnc_all-1.0.19.zip
32. http://www.karlrunge.com/x11vnc/etv/ssvnc
33. http://www.stunnel.org/
34. http://stunnel.mirt.net/
@ -11056,7 +11072,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-03
x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-15
x11vnc options:
-display disp -auth file -N
@ -11170,7 +11186,7 @@ libvncserver-tight-extension options:
% x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-03
x11vnc: allow VNC connections to real X11 displays. 0.9.3 lastmod: 2007-08-15
(type "x11vnc -opts" to just list the options.)
@ -11555,8 +11571,12 @@ Options:
-connect string For use with "vncviewer -listen" reverse connections.
If "string" has the form "host" or "host:port"
the connection is made once at startup. Use commas
for a list of host's and host:port's.
the connection is made once at startup.
Use commas for a list of host's and host:port's.
E.g. -connect host1,host2 or host1:0,host2:5678.
Note that to reverse connect to multiple hosts at the
same time you will likely need to also supply: -shared
Note that unlike most vnc servers, x11vnc will require a
password for reverse as well as for forward connections.

@ -405,8 +405,12 @@ void print_help(int mode) {
"\n"
"-connect string For use with \"vncviewer -listen\" reverse connections.\n"
" If \"string\" has the form \"host\" or \"host:port\"\n"
" the connection is made once at startup. Use commas\n"
" for a list of host's and host:port's.\n"
" the connection is made once at startup.\n"
"\n"
" Use commas for a list of host's and host:port's.\n"
" E.g. -connect host1,host2 or host1:0,host2:5678.\n"
" Note that to reverse connect to multiple hosts at the\n"
" same time you will likely need to also supply: -shared\n"
"\n"
" Note that unlike most vnc servers, x11vnc will require a\n"
" password for reverse as well as for forward connections.\n"

@ -1328,6 +1328,8 @@ int wait_for_client(int *argc, char** argv, int http) {
char *users_list_save = NULL;
int created_disp = 0;
int ncache_save;
int did_client_connect = 0;
int loop = 0;
if (! use_dpy || strstr(use_dpy, "WAIT:") != use_dpy) {
return 0;
@ -1527,20 +1529,113 @@ int wait_for_client(int *argc, char** argv, int http) {
#endif
}
if (inetd && use_openssl) {
accept_openssl(OPENSSL_INETD, -1);
}
if (client_connect != NULL) {
char *remainder = NULL;
if (inetd) {
rfbLog("wait_for_client: -connect disallowed in inetd mode: %s\n",
client_connect);
} else if (screen && screen->clientHead) {
rfbLog("wait_for_client: -connect disallowed: client exists: %s\n",
client_connect);
} else if (strchr(client_connect, '=')) {
rfbLog("wait_for_client: invalid -connect string: %s\n",
client_connect);
} else {
char *q = strchr(client_connect, ',');
if (q) {
rfbLog("wait_for_client: only using first"
" connect host in: %s\n", client_connect);
remainder = strdup(q+1);
*q = '\0';
}
rfbLog("wait_for_client: reverse_connect(%s)\n",
client_connect);
reverse_connect(client_connect);
did_client_connect = 1;
}
free(client_connect);
if (remainder != NULL) {
/* reset to host2,host3,... */
client_connect = remainder;
} else {
client_connect = NULL;
}
}
while (1) {
loop++;
if (shut_down) {
clean_up_exit(0);
}
if (use_openssl) {
if (loop < 2) {
if (did_client_connect) {
goto screen_check;
}
if (inetd) {
goto screen_check;
}
if (screen && screen->clientHead) {
goto screen_check;
}
}
if (use_openssl && !inetd) {
check_openssl();
/*
* This is to handle an initial verify cert from viewer,
* they disconnect right after fetching the cert.
*/
if (! use_threads) rfbPE(-1);
if (screen && screen->clientHead) {
int i;
if (unixpw) {
if (! unixpw_in_progress) {
rfbLog("unixpw but no unixpw_in_progress\n");
clean_up_exit(1);
}
if (unixpw_client && unixpw_client->onHold) {
rfbLog("taking unixpw_client off hold\n");
unixpw_client->onHold = FALSE;
}
}
for (i=0; i<10; i++) {
if (shut_down) {
clean_up_exit(0);
}
usleep(20 * 1000);
if (0) rfbLog("wait_for_client: %d\n", i);
if (! use_threads) {
if (unixpw) {
unixpw_in_rfbPE = 1;
}
rfbPE(-1);
if (unixpw) {
unixpw_in_rfbPE = 0;
}
}
if (unixpw && !unixpw_in_progress) {
/* XXX too soon. */
goto screen_check;
}
if (!screen->clientHead) {
break;
}
}
}
} else if (use_openssl) {
check_openssl();
}
if (! use_threads) {
rfbPE(-1);
}
screen_check:
if (! screen || ! screen->clientHead) {
usleep(100 * 1000);
continue;

@ -2,7 +2,7 @@
.TH X11VNC "1" "August 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.3, lastmod: 2007-08-03
version: 0.9.3, lastmod: 2007-08-15
.SH SYNOPSIS
.B x11vnc
[OPTION]...
@ -480,8 +480,12 @@ Same as \fB-avahi.\fR
.IP
For use with "vncviewer -listen" reverse connections.
If \fIstring\fR has the form "host" or "host:port"
the connection is made once at startup. Use commas
for a list of host's and host:port's.
the connection is made once at startup.
.IP
Use commas for a list of host's and host:port's.
E.g. \fB-connect\fR host1,host2 or host1:0,host2:5678.
Note that to reverse connect to multiple hosts at the
same time you will likely need to also supply: \fB-shared\fR
.IP
Note that unlike most vnc servers, x11vnc will require a
password for reverse as well as for forward connections.

@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.3 lastmod: 2007-08-03";
char lastmod[] = "0.9.3 lastmod: 2007-08-15";
/* X display info */

Loading…
Cancel
Save