SSVNC 1.0.22 release (+ a little bit more). crl lists, ssh pid finding improvements, and more.

pull/1/head
runge 16 years ago
parent effe81e36a
commit a868b6476e

@ -134,6 +134,8 @@ fi
SSVNC_BASEDIR="$dir"
export SSVNC_BASEDIR
SSVNC_BASEDIRNAME="$dir/$name"
export SSVNC_BASEDIRNAME
if [ -f "$dir/util/ultraftp.jar" ]; then
SSVNC_ULTRA_FTP_JAR="$dir/util/ultraftp.jar"

@ -158,6 +158,8 @@ dir=`dirname "$f"`
PATH="$dir:$PATH"
SSVNC_BASEDIR="$dir"
export SSVNC_BASEDIR
SSVNC_BASEDIRNAME="$dir/$name"
export SSVNC_BASEDIRNAME
SSVNC_UNAME="$name"
export SSVNC_UNAME

@ -23,6 +23,7 @@
#
# -verify /path/to/cacert.pem
# -mycert /path/to/mycert.pem
# -crl /path/to/my_crl.pem (or directory)
# -proxy host:port
#
# -verify specifies a CA cert PEM file (or a self-signed one) for
@ -125,14 +126,32 @@ fi
PATH=$PATH:/usr/sbin:/usr/local/sbin:/dist/sbin; export PATH
# work out which stunnel t use (debian installs as stunnel4)
localhost="localhost"
if uname | grep Darwin >/dev/null; then
localhost="127.0.0.1"
fi
# work out which stunnel to use (debian installs as stunnel4)
if [ "X$STUNNEL" = "X" ]; then
check_stunnel=1
if [ "X$SSVNC_BASEDIRNAME" != "X" ]; then
if [ -x "$SSVNC_BASEDIRNAME/stunnel" ]; then
type stunnel > /dev/null 2>&1
if [ $? = 0 ]; then
# found ours
STUNNEL=stunnel
check_stunnel=0
fi
fi
fi
if [ "X$check_stunnel" = "X1" ]; then
type stunnel4 > /dev/null 2>&1
if [ $? = 0 ]; then
STUNNEL=stunnel4
else
STUNNEL=stunnel
fi
fi
fi
help() {
@ -164,6 +183,11 @@ reverse=""
ciphers=""
anondh="ALL:RC4+RSA:+SSLv2:@STRENGTH"
anondh_set=""
stunnel_debug="6"
if [ "X$SS_DEBUG" != "X" -o "X$SSVNC_VENCRYPT_DEBUG" != "X" -o "X$SSVNC_STUNNEL_DEBUG" != "X" ]; then
stunnel_debug="7"
fi
if [ "X$1" = "X-viewerflavor" ]; then
# special case, try to guess which viewer:
@ -193,16 +217,9 @@ if [ "X$1" = "X-viewerflavor" ]; then
fi
exit 0
fi
# maxconn is something we added to stunnel, this disables it:
if [ "X$SS_VNCVIEWER_NO_MAXCONN" != "X" ]; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
elif echo "$VNCVIEWERCMD" | egrep -i '^(xmessage|sleep )' > /dev/null; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
else
STUNNEL_ONCE=1; export STUNNEL_ONCE
STUNNEL_MAX_CLIENTS=1; export STUNNEL_MAX_CLIENTS
STUNNEL_NO_SYSLOG=1; export STUNNEL_NO_SYSLOG
if [ "X$1" = "X-viewerhelp" ]; then
$VNCVIEWERCMD -h 2>&1
exit 0
fi
# grab our cmdline options:
@ -213,6 +230,8 @@ do
;;
"-mycert") shift; mycert="$1"
;;
"-crl") shift; crl="$1"
;;
"-proxy") shift; proxy="$1"
;;
"-ssh") use_ssh=1
@ -225,6 +244,7 @@ do
"-sshargs") shift; ssh_args="$1"
;;
"-anondh") ciphers="ciphers=$anondh"
anondh_set=1
;;
"-ciphers") shift; ciphers="ciphers=$1"
;;
@ -246,6 +266,8 @@ do
;;
"-scale") shift; SSVNC_SCALE="$1"; export SSVNC_SCALE
;;
"-onelisten") SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE
;;
"-escape") shift; VNCVIEWER_ESCAPE="$1"; export VNCVIEWER_ESCAPE
;;
"-ssvnc_encodings") shift; VNCVIEWER_ENCODINGS="$1"; export VNCVIEWER_ENCODINGS
@ -268,7 +290,28 @@ do
shift
done
# this is the -t ssh option (gives better keyboard responsd thru SSH tunnel)
# maxconn is something we added to stunnel, this disables it:
if [ "X$SS_VNCVIEWER_NO_MAXCONN" != "X" ]; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
elif echo "$VNCVIEWERCMD" | egrep -i '^(xmessage|sleep )' > /dev/null; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
elif [ "X$reverse" != "X" ]; then
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
else
# new way (our patches). other than the above, we set these:
if [ "X$SKIP_STUNNEL_ONCE" = "X" ]; then
STUNNEL_ONCE=1; export STUNNEL_ONCE
fi
if [ "X$SKIP_STUNNEL_MAX_CLIENTS" = "X" ]; then
STUNNEL_MAX_CLIENTS=1; export STUNNEL_MAX_CLIENTS
fi
fi
# always set this one:
if [ "X$SKIP_STUNNEL_NO_SYSLOG" = "X" ]; then
STUNNEL_NO_SYSLOG=1; export STUNNEL_NO_SYSLOG
fi
# this is the -t ssh option (gives better keyboard response thru SSH tunnel)
targ="-t"
if [ "X$SS_VNCVIEWER_NO_T" != "X" ]; then
targ=""
@ -289,18 +332,18 @@ if [ "X$reverse" != "X" ]; then
# check proxy usage under reverse connection:
if [ "X$use_ssh" = "X" -a "X$use_sshssl" = "X" ]; then
echo ""
if echo "$proxy" | egrep "repeater://" > /dev/null; then
if echo "$proxy" | egrep -i "(repeater|vencrypt)://" > /dev/null; then
:
else
echo "*Warning*: SSL -listen and a Web proxy does not make sense."
sleep 3
sleep 2
fi
elif echo "$proxy" | grep "," > /dev/null; then
:
else
echo ""
echo "*Warning*: -listen and a single proxy/gateway does not make sense."
sleep 3
sleep 2
fi
SSVNC_LISTEN_ONCE=1; export SSVNC_LISTEN_ONCE
fi
@ -320,6 +363,14 @@ if uname -sr | egrep 'SunOS 5\.[5-8]' > /dev/null; then
dL="-h"
fi
rchk() {
# a kludge to set $RANDOM if we are not bash:
if [ "X$BASH_VERSION" = "X" ]; then
RANDOM=`date +%S``sh -c 'echo $$'``ps -elf 2>&1 | sum 2>&1 | awk '{print $1}'`
fi
}
rchk
# a portable, but not absolutely safe, tmp file creator
mytmp() {
tf=$1
@ -397,6 +448,7 @@ if echo "$orig" | grep '^vnc://' > /dev/null; then
orig=`echo "$orig" | sed -e 's,vnc://,,'`
verify=""
mycert=""
crl=""
use_ssh=""
use_sshssl=""
direct_connect=1
@ -417,6 +469,7 @@ fi
if [ "X$SSVNC_ULTRA_DSM" != "X" ]; then
verify=""
mycert=""
crl=""
use_ssh=""
use_sshssl=""
direct_connect=1
@ -459,7 +512,7 @@ fi
host=`echo "$orig" | awk -F: '{print $1}'`
disp=`echo "$orig" | awk -F: '{print $2}'`
if [ "X$host" = "X" ]; then
host=localhost
host=$localhost
fi
if [ "X$disp" = "X" ]; then
port="" # probably -listen mode.
@ -483,9 +536,9 @@ inuse=""
if uname | grep Linux > /dev/null; then
inuse=`netstat -ant | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $4}' | sed 's/^.*://'`
elif uname | grep SunOS > /dev/null; then
inuse=`netstat -an -f inet -P tcp | grep LISTEN | awk '{print $1}' | sed 's/^.*\.//'`
elif uname | grep -i bsd > /dev/null; then
inuse=`netstat -ant -f inet | grep LISTEN | awk '{print $4}' | sed 's/^.*\.//'`
inuse=`netstat -an -f inet -P tcp | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $1}' | sed 's/^.*\.//'`
elif uname | egrep -i 'bsd|darwin' > /dev/null; then
inuse=`netstat -ant -f inet | egrep 'LISTEN|WAIT|ESTABLISH|CLOSE' | awk '{print $4}' | sed 's/^.*\.//'`
# add others...
fi
@ -590,7 +643,14 @@ final() {
if [ "X$reverse" = "X" ]; then
# normal connections try 5930-5999:
if [ "X$showcert" = "X" ]; then
use=`findfree 5930`
else
# move away from normal place for (possibly many) -showcert
pstart=`date +%S`
pstart=`expr 6130 + $pstart + $pstart`
use=`findfree $pstart`
fi
if [ $use -ge 5900 ]; then
N=`expr $use - 5900`
else
@ -612,14 +672,6 @@ if echo "$0" | grep vncip > /dev/null; then
VNCVIEWERCMD="$VNCIPCMD"
fi
rchk() {
# a kludge to set $RANDOM if we are not bash:
if [ "X$BASH_VERSION" = "X" ]; then
RANDOM=`date +%S``sh -c 'echo $$'``ps -elf 2>&1 | sum 2>&1 | awk '{print $1}'`
fi
}
rchk
# trick for the undocumented rsh://host:port method.
rsh_setup() {
if echo "$ssh_host" | grep '@' > /dev/null; then
@ -670,7 +722,7 @@ if (exists $ENV{PPROXY_SLEEP}) {
foreach my $var (qw(PPROXY_PROXY PPROXY_SOCKS PPROXY_DEST PPROXY_LISTEN
PPROXY_REVERSE PPROXY_REPEATER PPROXY_REMOVE PPROXY_KILLPID PPROXY_SLEEP)) {
if (0 || $ENV{SS_DEBUG}) {
if (0 || $ENV{SS_DEBUG} || $ENV{SSVNC_VENCRYPT_DEBUG}) {
print STDERR "$var: $ENV{$var}\n";
}
}
@ -683,7 +735,7 @@ if ($ENV{PPROXY_SOCKS} ne "" && $ENV{PPROXY_PROXY} !~ m,^socks5?://,i) {
}
}
my $rfbSecTypeTlsVnc = 18;
my $rfbSecTypeAnonTls = 18;
my $rfbSecTypeVencrypt = 19;
my $rfbVencryptPlain = 256;
@ -755,13 +807,24 @@ if ($ENV{PPROXY_REVERSE} ne "") {
die "pproxy: $! -- PPROXY_REVERSE\n";
}
print STDERR "PPROXY_REVERSE: connected to $rhost $rport\n";
} elsif ($ENV{PPROXY_LISTEN} ne "") {
my $listen_sock = IO::Socket::INET->new(
my $listen_sock = "";
if ($ENV{PPROXY_LISTEN} =~ /^INADDR_ANY:(.*)/) {
my $p = $1;
$listen_sock = IO::Socket::INET->new(
Listen => 2,
LocalPort => $p,
Proto => "tcp"
);
} else {
$listen_sock = IO::Socket::INET->new(
Listen => 2,
LocalAddr => "localhost",
LocalAddr => "127.0.0.1",
LocalPort => $ENV{PPROXY_LISTEN},
Proto => "tcp"
);
}
if (! $listen_sock) {
die "pproxy: $! -- PPROXY_LISTEN\n";
}
@ -770,6 +833,7 @@ if ($ENV{PPROXY_REVERSE} ne "") {
if (! $listen_handle) {
die "pproxy: $!\n";
}
close $listen_sock;
}
my $sock = IO::Socket::INET->new(
@ -786,6 +850,13 @@ if (! $sock) {
unlink($0) if $ENV{PPROXY_REMOVE};
if ($ENV{PPROXY_PROXY} =~ /^vencrypt:/ && $ENV{PPROXY_LISTEN} =~ /^INADDR_ANY:/) {
print STDERR "PPROXY: vencrypt+reverse: swapping listen socket with connect socket.\n";
my $tmp_swap = $sock;
$sock = $listen_handle;
$listen_handle = $tmp_swap;
}
$cur_proxy = $first;
setmode($mode_1st);
@ -810,7 +881,14 @@ if ($second ne "") {
$parent = $$;
$child = fork;
if (! defined $child) {
kill "TERM", $ENV{PPROXY_KILLPID} if $ENV{PPROXY_KILLPID};
if ($ENV{PPROXY_KILLPID}) {
foreach my $p (split(/,/, $ENV{PPROXY_KILLPID})) {
if ($p =~ /^(\+|-)/) {
$p = $parent + $p;
}
kill "TERM", $p;
}
}
exit 1;
}
@ -824,7 +902,7 @@ if ($child) {
select(undef, undef, undef, 0.25);
if (kill 0, $child) {
select(undef, undef, undef, 1.5);
#print STDERR "pproxy\[$$]: kill TERM $child\n";
print STDERR "pproxy\[$$]: kill TERM $child\n";
kill "TERM", $child;
}
} else {
@ -837,16 +915,20 @@ if ($child) {
select(undef, undef, undef, 0.25);
if (kill 0, $parent) {
select(undef, undef, undef, 1.5);
#print STDERR "pproxy\[$$]: kill TERM $parent\n";
print STDERR "pproxy\[$$]: kill TERM $parent\n";
kill "TERM", $parent;
}
}
if ($ENV{PPROXY_KILLPID} ne "") {
if ($ENV{PPROXY_KILLPID} =~ /^(\+|-)/) {
$ENV{PPROXY_KILLPID} = $$ + $ENV{PPROXY_KILLPID};
if ($ENV{PPROXY_KILLPID}) {
foreach my $p (split(/,/, $ENV{PPROXY_KILLPID})) {
if ($p =~ /^(\+|-)/) {
$p = $parent + $p;
}
print STDERR "kill TERM, $p (PPROXY_KILLPID)\n";
kill "TERM", $p;
}
}
print STDERR "kill TERM, $ENV{PPROXY_KILLPID}\n";
kill "TERM", $ENV{PPROXY_KILLPID};
}
exit;
@ -1079,12 +1161,12 @@ sub vdie {
exit(1);
}
sub tlsvnc_handshake {
sub anontls_handshake {
my ($vmode, $db) = @_;
print STDERR "PPROXY: Doing TLSVNC Handshake\n";
print STDERR "PPROXY: Doing ANONTLS Handshake\n";
my $psec = pack("C", $rfbSecTypeTlsVnc);
my $psec = pack("C", $rfbSecTypeAnonTls);
syswrite($sock, $psec, 1);
append_handshake("done\n");
@ -1097,6 +1179,13 @@ sub vencrypt_handshake {
print STDERR "PPROXY: Doing VeNCrypt Handshake\n";
my $psec = pack("C", $rfbSecTypeVencrypt);
if (exists $ENV{SSVNC_TEST_SEC_TYPE}) {
my $fake = $ENV{SSVNC_TEST_SEC_TYPE};
print STDERR "PPROXY: sending sec-type: $fake\n";
$psec = pack("C", $fake);
}
syswrite($sock, $psec, 1);
my $vmajor;
@ -1108,10 +1197,14 @@ sub vencrypt_handshake {
$vmajor = unpack("C", $vmajor);
$vminor = unpack("C", $vminor);
print STDERR "$vmajor.$vminor\n" if $db;
print STDERR "server vencrypt version $vmajor.$vminor\n" if $db;
if (exists $ENV{SSVNC_TEST_SEC_TYPE}) {
print STDERR "PPROXY: continuing on in test mode.\n";
} else {
vdie if $vmajor ne 0;
vdie if $vminor < 2;
}
$vmajor = pack("C", 0);
$vminor = pack("C", 2);
@ -1122,6 +1215,7 @@ sub vencrypt_handshake {
my $result;
sysread($sock, $result, 1);
print STDERR "result empty\n" if $db && $result eq "";
vdie if $result eq "";
$result = unpack("C", $result);
@ -1170,12 +1264,23 @@ sub vencrypt_handshake {
$subtype = $rfbVencryptTlsPlain;
print STDERR "selected rfbVencryptTlsPlain\n" if $db;
}
if (exists $ENV{SSVNC_TEST_SEC_SUBTYPE}) {
my $fake = $ENV{SSVNC_TEST_SEC_SUBTYPE};
print STDERR "PPROXY: sending sec-subtype: $fake\n";
$subtype = $fake;
}
append_handshake("subtype=$subtype\n");
my $pst = pack("N", $subtype);
syswrite($sock, $pst, 4);
if (exists $ENV{SSVNC_TEST_SEC_SUBTYPE}) {
print STDERR "PPROXY: continuing on in test mode.\n";
} else {
vdie if $subtype == 0;
}
my $ok;
sysread($sock, $ok, 1);
@ -1192,11 +1297,12 @@ sub vencrypt_dialog {
my $db = 0;
$db = 1 if exists $ENV{SS_DEBUG};
$db = 1 if exists $ENV{SSVNC_VENCRYPT_DEBUG};
append_handshake("mode=$vmode\n");
my $server_rfb = "";
syswrite($sock, $rep, 250);
#syswrite($sock, $rep, 250);
for (my $i = 0; $i < 12; $i++) {
my $c;
sysread($sock, $c, 1);
@ -1246,10 +1352,10 @@ sub vencrypt_dialog {
print STDERR "found rfbSecTypeVencrypt\n" if $db;
append_handshake("sectype=$rfbSecTypeVencrypt\n");
vencrypt_handshake($vmode, $db);
} elsif (exists $sectypes{$rfbSecTypeTlsVnc}) {
print STDERR "found rfbSecTypeTlsVnc\n" if $db;
append_handshake("sectype=$rfbSecTypeTlsVnc\n");
tlsvnc_handshake($vmode, $db);
} elsif (exists $sectypes{$rfbSecTypeAnonTls}) {
print STDERR "found rfbSecTypeAnonTls\n" if $db;
append_handshake("sectype=$rfbSecTypeAnonTls\n");
anontls_handshake($vmode, $db);
} else {
print STDERR "No supported sec-type found\n" if $db;
vdie;
@ -1296,9 +1402,12 @@ sub xfer {
close($out);
}
'
# '
# xpg_echo will expand \n \r, etc.
# try to unset and then test for it.
if type shopt > /dev/null 2>&1; then
shopt -u xpg_echo >/dev/null 2>&1
fi
v='print STDOUT "abc\n";'
echo "$v" > $tf
chmod 700 $tf
@ -1314,6 +1423,67 @@ sub xfer {
perl -e 'use IO::Socket::INET; select(undef, undef, undef, 0.01)' >/dev/null 2>&1
}
# make_tcert is no longer invoked via the ssvnc gui (Listen mode).
# make_tcert is for testing only now via -mycert BUILTIN
make_tcert() {
tcert="/tmp/ss_vnc_viewer_tcert${RANDOM}.$$"
tcert=`mytmp "$tcert"`
cat > $tcert <<END
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvkfXxb0wcxgrjV2ziFikjII+ze8iKcTBt47L0GM/c21efelN
+zZpJUUXLu4zz8Ryq8Q+sQgfNy7uTOpN9bUUaOk1TnD7gaDQnQWiNHmqbW2kL+DS
OKngJVPo9dETAS8hf7+D1e1DBZxjTc1a4RQqWJixwpYj99ixWzu8VC2m/xXsjvOs
jp4+DLBB490nbkwvstmhmiWm1CmI5O5xOkgioVNQqHvQMdVKOSz9PpbjvZiRX1Uo
qoMrk+2NOqwP90TB35yPASXb9zXKpO7DLhkube+yYGf+yk46aD707L07Eb7cosFP
S84vNZ9gX7rQ0UOwm5rYA/oZTBskgaqhtIzkLwIDAQABAoIBAD4ot/sXt5kRn0Ca
CIkU9AQWlC+v28grR2EQW9JiaZrqcoDNUzUqbCTJsi4ZkIFh2lf0TsqELbZYNW6Y
6AjJM7al4E0UqYSKJTv2WCuuRxdiRs2BMwthqyBmjeanev7bB6V0ybt7u3Y8xU/o
MrTuYnr4vrEjXPKdLirwk7AoDbKsRXHSIiHEIBOq1+dUQ32t36ukdnnza4wKDLZc
PKHiCdCk/wOGhuDlxD6RspqUAlRnJ8/aEhrgWxadFXw1hRhRsf/v1shtB0T3DmTe
Jchjwyiw9mryb9JZAcKxW+fUc4EVvj6VdQGqYInQJY5Yxm5JAlVQUJicuuJEvn6A
rj5osQECgYEA552CaHpUiFlB4HGkjaH00kL+f0+gRF4PANCPk6X3UPDVYzKnzmuu
yDvIdEETGFWBwoztUrOOKqVvPEQ+kBa2+DWWYaERZLtg2cI5byfDJxQ3ldzilS3J
1S3WgCojqcsG/hlxoQJ1dZFanUy/QhUZ0B+wlC+Zp1Q8AyuGQvhHp68CgYEA0lBI
eqq2GGCdJuNHMPFbi8Q0BnX55LW5C1hWjhuYiEkb3hOaIJuJrqvayBlhcQa2cGqp
uP34e9UCfoeLgmoCQ0b4KpL2NGov/mL4i8bMgog4hcoYuIi3qxN18vVR14VKEh4U
RLk0igAYPU+IK2QByaQlBo9OSaKkcfm7U1/pK4ECgYAxr6VpGk0GDvfF2Tsusv6d
GIgV8ZP09qSLTTJvvxvF/lQYeqZq7sjI5aJD5i3de4JhpO/IXQJzfZfWOuGc8XKA
3qYK/Y2IqXXGYRcHFGWV/Y1LFd55mCADHlk0l1WdOBOg8P5iRu/Br9PbiLpCx9oI
vrOXpnp03eod1/luZmqguwKBgQCWFRSj9Q7ddpSvG6HCG3ro0qsNsUMTI1tZ7UBX
SPogx4tLf1GN03D9ZUZLZVFUByZKMtPLX/Hi7K9K/A9ikaPrvsl6GEX6QYzeTGJx
3Pw0amFrmDzr8ySewNR6/PXahxPEuhJcuI31rPufRRI3ZLah3rFNbRbBFX+klkJH
zTnoAQKBgDbUK/aQFGduSy7WUT7LlM3UlGxJ2sA90TQh4JRQwzur0ACN5GdYZkqM
YBts4sBJVwwJoxD9OpbvKu3uKCt41BSj0/KyoBzjT44S2io2tj1syujtlVUsyyBy
/ca0A7WBB8lD1D7QMIhYUm2O9kYtSCLlUTHt5leqGaRG38DqlX36
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDzDCCArQCCQDSzxzxqhyqLzANBgkqhkiG9w0BAQQFADCBpzELMAkGA1UEBhMC
VVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNVBAcTBkJvc3RvbjETMBEG
A1UEChMKTXkgQ29tcGFueTEcMBoGA1UECxMTUHJvZHVjdCBEZXZlbG9wbWVudDEZ
MBcGA1UEAxMQd3d3Lm5vd2hlcmUubm9uZTEhMB8GCSqGSIb3DQEJARYSYWRtaW5A
bm93aGVyZS5ub25lMB4XDTA3MDMyMzE4MDc0NVoXDTI2MDUyMjE4MDc0NVowgacx
CzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1NYXNzYWNodXNldHRzMQ8wDQYDVQQHEwZC
b3N0b24xEzARBgNVBAoTCk15IENvbXBhbnkxHDAaBgNVBAsTE1Byb2R1Y3QgRGV2
ZWxvcG1lbnQxGTAXBgNVBAMTEHd3dy5ub3doZXJlLm5vbmUxITAfBgkqhkiG9w0B
CQEWEmFkbWluQG5vd2hlcmUubm9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAL5H18W9MHMYK41ds4hYpIyCPs3vIinEwbeOy9BjP3NtXn3pTfs2aSVF
Fy7uM8/EcqvEPrEIHzcu7kzqTfW1FGjpNU5w+4Gg0J0FojR5qm1tpC/g0jip4CVT
6PXREwEvIX+/g9XtQwWcY03NWuEUKliYscKWI/fYsVs7vFQtpv8V7I7zrI6ePgyw
QePdJ25ML7LZoZolptQpiOTucTpIIqFTUKh70DHVSjks/T6W472YkV9VKKqDK5Pt
jTqsD/dEwd+cjwEl2/c1yqTuwy4ZLm3vsmBn/spOOmg+9Oy9OxG+3KLBT0vOLzWf
YF+60NFDsJua2AP6GUwbJIGqobSM5C8CAwEAATANBgkqhkiG9w0BAQQFAAOCAQEA
vGomHEp6TVU83X2EBUgnbOhzKJ9u3fOI/Uf5L7p//Vxqow7OR1cguzh/YEzmXOIL
ilMVnzX9nj/bvcLAuqEP7MR1A8f4+E807p/L/Sf49BiCcwQq5I966sGKYXjkve+T
2GTBNwMSq+5kLSf6QY8VZI+qnrAudEQMeJByQhTZZ0dH8Njeq8EGl9KUio+VWaiW
CQK6xJuAvAHqa06OjLmwu1fYD4GLGSrOIiRVkSXV8qLIUmzxdJaIRznkFWsrCEKR
wAH966SAOvd2s6yOHMvyDRIL7WHxfESB6rDHsdIW/yny1fBePjv473KrxyXtbz7I
dMw1yW09l+eEo4A7GzwOdw==
-----END CERTIFICATE-----
END
chmod 600 $tcert
echo "$tcert"
}
Kecho() {
if [ "X$USER" = "Xrunge" ]; then
echo "dbg: $*"
@ -1326,7 +1496,7 @@ if [ "X$use_ssh" = "X1" ]; then
#
ssh_port="22"
ssh_host="$host"
vnc_host="localhost"
vnc_host="$localhost"
# let user override ssh via $SSH
ssh=${SSH:-"ssh -x"}
@ -1444,9 +1614,9 @@ if [ "X$use_ssh" = "X1" ]; then
u=`echo "$host" | sed -e 's/@.*$/@/'`
fi
proxy="${u}localhost:$nd"
proxy="${u}$localhost:$nd"
else
proxy="${sproxy1_user}localhost:$nd"
proxy="${sproxy1_user}$localhost:$nd"
fi
if [ "X$sproxy_rest" != "X" ]; then
proxy="$proxy,$sproxy_rest"
@ -1487,7 +1657,7 @@ if [ "X$use_ssh" = "X1" ]; then
ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes"
sleep 1
stty sane
proxy="${ssh_user2}localhost:$proxport"
proxy="${ssh_user2}$localhost:$proxport"
fi
if [ "X$proxy" != "X" ]; then
@ -1515,14 +1685,14 @@ if [ "X$use_ssh" = "X1" ]; then
getport=""
teeport=""
if echo "$ssh_cmd" | egrep "^(PORT=|P=)" > /dev/null; then
if echo "$ssh_cmd" | egrep "(PORT=|P=) " > /dev/null; then
getport=1
if echo "$ssh_cmd" | egrep "^P=" > /dev/null; then
if echo "$ssh_cmd" | egrep "P= " > /dev/null; then
teeport=1
fi
PORT=""
ssh_cmd=`echo "$ssh_cmd" | sed -e 's/^PORT=[ ]*//' -e 's/^P=//'`
ssh_cmd=`echo "$ssh_cmd" | sed -e 's/PORT=[ ]*//' -e 's/P=//'`
SSVNC_NO_ENC_WARN=1
if [ "X$use_sshssl" = "X" ]; then
direct_connect=1
@ -1561,7 +1731,7 @@ if [ "X$use_ssh" = "X1" ]; then
tport=`mytmp "$tport"`
if [ "X$rsh" != "X1" ]; then
if echo "$ssh_cmd" | grep -w sudo > /dev/null; then
if echo "$ssh_cmd" | grep "sudo " > /dev/null; then
echo ""
echo "Initial ssh with 'sudo id' to prime sudo so hopefully the next one"
echo "will require no password..."
@ -1634,9 +1804,9 @@ if [ "X$use_ssh" = "X1" ]; then
PPROXY_SOCKS=5
fi
export PPROXY_SOCKS
host="localhost"
host="$localhost"
port="$PORT"
proxy="localhost:$use"
proxy="$localhost:$use"
else
if [ "X$rsh" != "X1" ]; then
@ -1665,14 +1835,20 @@ if [ "X$use_ssh" = "X1" ]; then
c=0
pssh=""
mssh=`echo "$ssh" | sed -e 's/^env.*ssh/ssh/'`
while [ $c -lt 30 ]
while [ $c -lt 40 ]
do
p=`expr $pmark + $c`
if ps -p "$p" 2>&1 | grep "$mssh" > /dev/null; then
pout=`ps -p "$p" 2>/dev/null | grep -v '^[ ]*PID' | sed -e 's/-L.*$//' -e 's/-x .*$//'`
if echo "$pout" | grep "ssh" > /dev/null; then
if echo "$pout" | egrep -i 'ssh.*(-add|-agent|-ask|-keygen|-argv0|vnc)' >/dev/null; then
:
elif echo "$pout" | egrep -i 'scp|sshd' >/dev/null; then
:
else
pssh=$p
break
fi
fi
c=`expr $c + 1`
done
if [ "X$getport" != "X" ]; then
@ -1697,20 +1873,20 @@ if [ "X$use_ssh" = "X1" ]; then
echo "sleep $SSVNC_EXTRA_SLEEP"
sleep $SSVNC_EXTRA_SLEEP
fi
#echo "pssh=\"$pssh\""
echo "ssh_pid='$pssh'"; echo
if [ "X$use_sshssl" = "X" -a "X$getport" = "X" ]; then
echo "Running viewer:"
trap "final" 0 2 15
if [ "X$reverse" = "X" ]; then
echo "$VNCVIEWERCMD" "$@" localhost:$N
echo "$VNCVIEWERCMD" "$@" $localhost:$N
echo ""
$VNCVIEWERCMD "$@" localhost:$N
$VNCVIEWERCMD "$@" $localhost:$N
if [ $? != 0 ]; then
echo "vncviewer command failed: $?"
if [ "X$secondtry" = "X1" ]; then
sleep 2
$VNCVIEWERCMD "$@" localhost:$N
$VNCVIEWERCMD "$@" $localhost:$N
fi
fi
else
@ -1734,7 +1910,7 @@ if [ "X$use_ssh" = "X1" ]; then
use2=`findfree 5960`
host0=$host
port0=$port
host=localhost
host=$localhost
port=$use
use=$use2
N=`expr $use - 5900`
@ -1760,6 +1936,13 @@ fi
if [ "X$mycert" != "X" ]; then
cert="cert = $mycert"
fi
if [ "X$crl" != "X" ]; then
if [ -d $crl ]; then
crl="CRLpath = $crl"
else
crl="CRLfile = $crl"
fi
fi
ptmp=""
if [ "X$proxy" != "X" ]; then
@ -1769,7 +1952,12 @@ if [ "X$proxy" != "X" ]; then
pcode "$ptmp"
if [ "X$showcert" != "X1" -a "X$direct_connect" = "X" ]; then
if uname | egrep 'Darwin|SunOS' >/dev/null; then
# on mac we need to listen on socket instead of stdio:
vout=`echo "$proxy" | grep -i vencrypt`
if [ "X$vout" != "X" -a "X$reverse" = "X1" ]; then
# need to exec for reverse vencrypt
connect="exec = $ptmp"
else
# on mac and solaris we need to listen on socket instead of stdio:
nd=`findfree 6700`
PPROXY_LISTEN=$nd
export PPROXY_LISTEN
@ -1777,11 +1965,11 @@ if [ "X$proxy" != "X" ]; then
#$ptmp 2>/dev/null &
$ptmp &
fi
#sleep 3
sleep 2
host="localhost"
host="$localhost"
port="$nd"
connect="connect = localhost:$nd"
connect="connect = $localhost:$nd"
fi
else
# otherwise on unix we can exec it:
connect="exec = $ptmp"
@ -1803,7 +1991,7 @@ if [ "X$showcert" = "X1" ]; then
$ptmp 2>/dev/null &
fi
sleep 1
host="localhost"
host="$localhost"
port="$use"
fi
cipher_args=""
@ -1811,8 +1999,63 @@ if [ "X$showcert" = "X1" ]; then
cipher_args=`echo "$ciphers" | sed -e 's/ciphers=/-cipher /'`
fi
#echo "openssl s_client $cipher_args -connect $host:$port"
if [ "X$reverse" = "X" ]; then
openssl s_client $cipher_args -prexit -connect $host:$port 2>&1 < /dev/null
rc=$?
else
tcert=""
if [ "X$mycert" = "X" ]; then
tcert=`make_tcert`
cert_args="-cert $tcert -CAfile $tcert"
else
cert_args="-cert $mycert -CAfile $mycert"
fi
tmp_out=/tmp/showcert_out${RANDOM}.$$
tmp_out=`mytmp "$tmp_out"`
tmp_err=/tmp/showcert_err${RANDOM}.$$
tmp_err=`mytmp "$tmp_err"`
#echo "openssl s_server $cipher_args $cert_args -accept $port -verify 2 > $tmp_out 2> $tmp_err" 1>&2
perl -e "
\$p = open(O, \"|openssl s_server $cipher_args $cert_args -accept $port -verify 2 1>$tmp_out 2> $tmp_err\");
exit 1 unless \$p;
while (1) {
sleep 1;
if (!open(F, \"<$tmp_out\")) {
kill \$p;
exit 1;
}
while (<F>) {
if (/RFB 00/) {
fsleep(0.25);
print O \"RFB 000.000\\n\";
fsleep(1.00);
kill \$p;
fsleep(0.25);
exit 0;
}
}
close F;
}
sub fsleep {
select(undef, undef, undef, shift);
}
";
echo ""
cat $tmp_out
echo ""
echo "----2----"
cat $tmp_err
if grep BEGIN.CERTIFICATE $tmp_out >/dev/null; then
rc=0
else
rc=1
fi
rm -f $tmp_out $tmp_err
fi
if [ "X$SSVNC_PREDIGESTED_HANDSHAKE" != "X" ]; then
rm -f $SSVNC_PREDIGESTED_HANDSHAKE
fi
@ -1860,7 +2103,7 @@ if [ "X$direct_connect" != "X" ]; then
PPROXY_LISTEN=$use
export PPROXY_LISTEN
else
PPROXY_REVERSE="localhost:$use"
PPROXY_REVERSE="$localhost:$use"
export PPROXY_REVERSE
pps=3
if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then
@ -1877,7 +2120,7 @@ if [ "X$direct_connect" != "X" ]; then
#echo T sleep 1
sleep 1
fi
host="localhost"
host="$localhost"
disp="$N"
port=`expr $disp + 5900`
fi
@ -1894,7 +2137,7 @@ if [ "X$direct_connect" != "X" ]; then
pf=`findfree 5970`
cmd="$SSVNC_ULTRA_DSM -$pf $host:$port"
pf=`expr $pf - 5900`
hostdisp="localhost:$pf"
hostdisp="$localhost:$pf"
ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "Running:"
echo
@ -1930,7 +2173,7 @@ if [ "X$direct_connect" != "X" ]; then
VNCVIEWER_LISTEN_LOCALHOST=1
export VNCVIEWER_LISTEN_LOCALHOST
dport=`expr 5500 + $disp`
cmd="$SSVNC_ULTRA_DSM $dport localhost:$use"
cmd="$SSVNC_ULTRA_DSM $dport $localhost:$use"
ustr=`echo "$cmd" | sed -e 's/pw=[^ ]*/pw=******/g'`
echo "Running:"
echo
@ -1961,69 +2204,10 @@ fi
tmp_cfg=/tmp/ss_vncviewer${RANDOM}.$$
tmp_cfg=`mytmp "$tmp_cfg"`
# make_tcert is no longer invoked via the ssvnc gui (Listen mode).
# make_tcert is for testing only now via -mycert BUILTIN
make_tcert() {
tcert="/tmp/ss_vnc_viewer_tcert${RANDOM}.$$"
tcert=`mytmp "$tcert"`
cat > $tcert <<END
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAvkfXxb0wcxgrjV2ziFikjII+ze8iKcTBt47L0GM/c21efelN
+zZpJUUXLu4zz8Ryq8Q+sQgfNy7uTOpN9bUUaOk1TnD7gaDQnQWiNHmqbW2kL+DS
OKngJVPo9dETAS8hf7+D1e1DBZxjTc1a4RQqWJixwpYj99ixWzu8VC2m/xXsjvOs
jp4+DLBB490nbkwvstmhmiWm1CmI5O5xOkgioVNQqHvQMdVKOSz9PpbjvZiRX1Uo
qoMrk+2NOqwP90TB35yPASXb9zXKpO7DLhkube+yYGf+yk46aD707L07Eb7cosFP
S84vNZ9gX7rQ0UOwm5rYA/oZTBskgaqhtIzkLwIDAQABAoIBAD4ot/sXt5kRn0Ca
CIkU9AQWlC+v28grR2EQW9JiaZrqcoDNUzUqbCTJsi4ZkIFh2lf0TsqELbZYNW6Y
6AjJM7al4E0UqYSKJTv2WCuuRxdiRs2BMwthqyBmjeanev7bB6V0ybt7u3Y8xU/o
MrTuYnr4vrEjXPKdLirwk7AoDbKsRXHSIiHEIBOq1+dUQ32t36ukdnnza4wKDLZc
PKHiCdCk/wOGhuDlxD6RspqUAlRnJ8/aEhrgWxadFXw1hRhRsf/v1shtB0T3DmTe
Jchjwyiw9mryb9JZAcKxW+fUc4EVvj6VdQGqYInQJY5Yxm5JAlVQUJicuuJEvn6A
rj5osQECgYEA552CaHpUiFlB4HGkjaH00kL+f0+gRF4PANCPk6X3UPDVYzKnzmuu
yDvIdEETGFWBwoztUrOOKqVvPEQ+kBa2+DWWYaERZLtg2cI5byfDJxQ3ldzilS3J
1S3WgCojqcsG/hlxoQJ1dZFanUy/QhUZ0B+wlC+Zp1Q8AyuGQvhHp68CgYEA0lBI
eqq2GGCdJuNHMPFbi8Q0BnX55LW5C1hWjhuYiEkb3hOaIJuJrqvayBlhcQa2cGqp
uP34e9UCfoeLgmoCQ0b4KpL2NGov/mL4i8bMgog4hcoYuIi3qxN18vVR14VKEh4U
RLk0igAYPU+IK2QByaQlBo9OSaKkcfm7U1/pK4ECgYAxr6VpGk0GDvfF2Tsusv6d
GIgV8ZP09qSLTTJvvxvF/lQYeqZq7sjI5aJD5i3de4JhpO/IXQJzfZfWOuGc8XKA
3qYK/Y2IqXXGYRcHFGWV/Y1LFd55mCADHlk0l1WdOBOg8P5iRu/Br9PbiLpCx9oI
vrOXpnp03eod1/luZmqguwKBgQCWFRSj9Q7ddpSvG6HCG3ro0qsNsUMTI1tZ7UBX
SPogx4tLf1GN03D9ZUZLZVFUByZKMtPLX/Hi7K9K/A9ikaPrvsl6GEX6QYzeTGJx
3Pw0amFrmDzr8ySewNR6/PXahxPEuhJcuI31rPufRRI3ZLah3rFNbRbBFX+klkJH
zTnoAQKBgDbUK/aQFGduSy7WUT7LlM3UlGxJ2sA90TQh4JRQwzur0ACN5GdYZkqM
YBts4sBJVwwJoxD9OpbvKu3uKCt41BSj0/KyoBzjT44S2io2tj1syujtlVUsyyBy
/ca0A7WBB8lD1D7QMIhYUm2O9kYtSCLlUTHt5leqGaRG38DqlX36
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDzDCCArQCCQDSzxzxqhyqLzANBgkqhkiG9w0BAQQFADCBpzELMAkGA1UEBhMC
VVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNVBAcTBkJvc3RvbjETMBEG
A1UEChMKTXkgQ29tcGFueTEcMBoGA1UECxMTUHJvZHVjdCBEZXZlbG9wbWVudDEZ
MBcGA1UEAxMQd3d3Lm5vd2hlcmUubm9uZTEhMB8GCSqGSIb3DQEJARYSYWRtaW5A
bm93aGVyZS5ub25lMB4XDTA3MDMyMzE4MDc0NVoXDTI2MDUyMjE4MDc0NVowgacx
CzAJBgNVBAYTAlVTMRYwFAYDVQQIEw1NYXNzYWNodXNldHRzMQ8wDQYDVQQHEwZC
b3N0b24xEzARBgNVBAoTCk15IENvbXBhbnkxHDAaBgNVBAsTE1Byb2R1Y3QgRGV2
ZWxvcG1lbnQxGTAXBgNVBAMTEHd3dy5ub3doZXJlLm5vbmUxITAfBgkqhkiG9w0B
CQEWEmFkbWluQG5vd2hlcmUubm9uZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBAL5H18W9MHMYK41ds4hYpIyCPs3vIinEwbeOy9BjP3NtXn3pTfs2aSVF
Fy7uM8/EcqvEPrEIHzcu7kzqTfW1FGjpNU5w+4Gg0J0FojR5qm1tpC/g0jip4CVT
6PXREwEvIX+/g9XtQwWcY03NWuEUKliYscKWI/fYsVs7vFQtpv8V7I7zrI6ePgyw
QePdJ25ML7LZoZolptQpiOTucTpIIqFTUKh70DHVSjks/T6W472YkV9VKKqDK5Pt
jTqsD/dEwd+cjwEl2/c1yqTuwy4ZLm3vsmBn/spOOmg+9Oy9OxG+3KLBT0vOLzWf
YF+60NFDsJua2AP6GUwbJIGqobSM5C8CAwEAATANBgkqhkiG9w0BAQQFAAOCAQEA
vGomHEp6TVU83X2EBUgnbOhzKJ9u3fOI/Uf5L7p//Vxqow7OR1cguzh/YEzmXOIL
ilMVnzX9nj/bvcLAuqEP7MR1A8f4+E807p/L/Sf49BiCcwQq5I966sGKYXjkve+T
2GTBNwMSq+5kLSf6QY8VZI+qnrAudEQMeJByQhTZZ0dH8Njeq8EGl9KUio+VWaiW
CQK6xJuAvAHqa06OjLmwu1fYD4GLGSrOIiRVkSXV8qLIUmzxdJaIRznkFWsrCEKR
wAH966SAOvd2s6yOHMvyDRIL7WHxfESB6rDHsdIW/yny1fBePjv473KrxyXtbz7I
dMw1yW09l+eEo4A7GzwOdw==
-----END CERTIFICATE-----
END
chmod 600 $tcert
echo "$tcert"
}
stunnel_exec=""
if echo $STUNNEL_EXTRA_SVC_OPTS | grep '#stunnel-exec' > /dev/null; then
if [ "X$SSVNC_USE_OURS" != "X1" ]; then
:
elif echo $STUNNEL_EXTRA_SVC_OPTS | grep '#stunnel-exec' > /dev/null; then
stunnel_exec="#"
fi
@ -2042,25 +2226,29 @@ if [ "X$reverse" = "X" ]; then
foreground = yes
pid =
client = yes
debug = 6
debug = $stunnel_debug
$ciphers
$STUNNEL_EXTRA_OPTS
$STUNNEL_EXTRA_OPTS_USER
$verify
$cert
$crl
$verify
${stunnel_exec}[vnc_stunnel]
${stunnel_exec}accept = localhost:$use
${stunnel_exec}accept = $localhost:$use
$connect
$STUNNEL_EXTRA_SVC_OPTS
$STUNNEL_EXTRA_SVC_OPTS_USER
END
else
# REVERSE case:
stunnel_exec="" # doesn't work for listening.
p2=`expr 5500 + $N`
connect="connect = localhost:$p2"
connect="connect = $localhost:$p2"
if [ "X$cert" = "XBUILTIN" ]; then
ttcert=`make_tcert`
cert="cert = $ttcert"
@ -2068,22 +2256,33 @@ else
# Note for listen mode, an empty cert will cause stunnel to fail.
# The ssvnc gui will have already taken care of this.
STUNNEL_EXTRA_OPTS=`echo "$STUNNEL_EXTRA_OPTS" | sed -e 's/maxconn/#maxconn/'`
hloc=""
if [ "X$use_ssh" = "X1" ]; then
hloc="localhost:"
hloc="$localhost:"
fi
if echo "$proxy" | grep -i '^vencrypt:' > /dev/null; then
hloc="$localhost:"
pv=`findfree 5570`
proxy="vencrypt:$pv:$port"
port=$pv
if [ "X$anondh_set" = "X1" ]; then
# not needed for ANONDH in this mode
#ciphers="ciphers = ADH:@STRENGTH"
:
fi
fi
cat > "$tmp_cfg" <<END
foreground = yes
pid =
client = no
debug = 6
debug = $stunnel_debug
$ciphers
$STUNNEL_EXTRA_OPTS
$STUNNEL_EXTRA_OPTS_USER
$verify
$cert
$crl
$verify
[vnc_stunnel]
accept = $hloc$port
@ -2092,6 +2291,7 @@ $STUNNEL_EXTRA_SVC_OPTS
$STUNNEL_EXTRA_SVC_OPTS_USER
END
fi
echo ""
@ -2114,11 +2314,21 @@ if [ "X$stunnel_exec" = "X" ]; then
# pause here to let the user supply a possible passphrase for the
# mycert key:
if [ "X$mycert" != "X" ]; then
sleep 1
nsl=10
dsl=0
if [ ! -f $mycert ]; then
dsl=0
elif grep -i 'Proc-Type.*ENCRYPTED' "$mycert" > /dev/null 2>/dev/null; then
dsl=1
fi
if [ "X$dsl" = "X1" ]; then
echo ""
echo "(** pausing $nsl secs for possible certificate passphrase dialog **)"
echo ""
echo "(** pausing for possible certificate passphrase dialog **)"
sleep $nsl
echo "(** done pausing for passphrase **)"
echo ""
sleep 4
fi
fi
#echo T sleep 1
sleep 1
@ -2133,7 +2343,7 @@ if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then
fi
echo "Running viewer:"
if [ "X$reverse" = "X" ]; then
vnc_hp=localhost:$N
vnc_hp=$localhost:$N
if [ "X$stunnel_exec" != "X" ]; then
vnc_hp="exec=$STUNNEL $tmp_cfg"
fi
@ -2163,8 +2373,18 @@ else
trap "final" 0 2 15
echo ""
if [ "X$proxy" != "X" ]; then
PPROXY_REVERSE="localhost:$port"; export PPROXY_REVERSE
if echo "$proxy" | grep -i '^vencrypt:' > /dev/null; then
pstunnel=`echo "$proxy" | awk -F: '{print $2}'`
plisten=`echo "$proxy" | awk -F: '{print $3}'`
PPROXY_LISTEN="INADDR_ANY:$plisten"; export PPROXY_LISTEN
PPROXY_PROXY="vencrypt://$localhost:$pstunnel"; export PPROXY_PROXY
PPROXY_DEST="$localhost:$pstunnel"; export PPROXY_DEST
STUNNEL_ONCE=1; export STUNNEL_ONCE
STUNNEL_MAX_CLIENTS=1; export STUNNEL_MAX_CLIENTS
else
PPROXY_REVERSE="$localhost:$port"; export PPROXY_REVERSE
PPROXY_SLEEP=1; export PPROXY_SLEEP;
fi
PPROXY_KILLPID=+1; export PPROXY_KILLPID;
$ptmp &
fi

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@
.\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution.
.\"
.TH ssvnc 1 "November 2008" "" "SSVNC"
.TH ssvnc 1 "December 2008" "" "SSVNC"
.SH NAME
ssvnc \- a GUI wrapper for SSL and SSH VNC connections.
.SH SYNOPSIS
@ -98,6 +98,7 @@ Same as SSVNC_TS_ALWAYS=1.
.TP
\fB\-ssl\fR
Force the full GUI Mode: both SSL and SSH. This is the default.
Same as \fB-ss\fR.
.TP
\fB\-nv\fR
Toggle the "Verify All Certs" button to be off at startup.
@ -113,14 +114,36 @@ Same as SSVNC_BIGGER_DIALOG=1.
\fB\-noenc\fR
Start off in a mode where a 'No Encryption' check button is present.
You can toggle the mode with Ctrl-E.
Same as SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or noenc=1 in ~/.ssvncrc.
Same as SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or \fInoenc=1\fR in ~/.ssvncrc.
Selecting no encryption is the same as the vnc:// and Vnc:// prefixes
described below.
described below. \fB-enc\fR implies the opposite.
.TP
\fB\-killstunnel\fR
On Windows, automatically terminate the STUNNEL process when the viewer
exits instead of prompting you (same as killstunnel=1 in ssvnc_rc or
exits instead of prompting you (same as \fIkillstunnel=1\fR in ssvnc_rc or
toggle in Options menu)
.TP
\fB\-nokillstunnel\fR
On Windows, disable \fB-killstunnel\fR mode.
Same as \fIkillstunnel=0\fR in ssvnc_rc or
toggle in Options menu. Note that \fB-killstunnel\fR mode is now the default.
.TP
\fB\-mycert\fR \fI/path/to/mycert.pem\fR
Set the default "MyCert" to be \fI/path/to/mycert.pem\fR.
Same as \fB-cert\fR.
If the file does not exist, ~/.vnc/certs is prefixed and tried.
You can also set \fImycert=/path/to/mycert.pem\fR in ~/.ssvncrc.
.TP
\fB\-cacert\fR \fI/path/to/cacert.crt\fR
Set the default "ServerCert" to be \fI/path/to/cacert.crt\fR.
Same as \fB-ca\fR.
If the file does not exist, ~/.vnc/certs is prefixed and tried.
You can also set \fIcacert=/path/to/cacert.crt\fR in ~/.ssvncrc.
.TP
\fB\-crl\fR \fI/path/to/mycrl.pem\fR
Set the default Certificate Revocation List to be \fI/path/to/mycrl.pem\fR.
If the file does not exist, ~/.vnc/certs is prefixed and tried.
You can also set \fIcrl=/path/to/mycrl.pem\fR in ~/.ssvncrc.
.SH URL NOTATION
Here are all of our URL-like prefixes that you can put in front of
host:display (or host:port):

@ -11,7 +11,7 @@
.\" License as specified in the file LICENCE.TXT that comes with the
.\" TightVNC distribution.
.\"
.TH ssvncviewer 1 "October 2008" "" "SSVNC"
.TH ssvncviewer 1 "December 2008" "" "SSVNC"
.SH NAME
ssvncviewer \- an X viewer client for VNC
.SH SYNOPSIS
@ -258,11 +258,27 @@ must be 32bpp and same endianness.
Scale the desktop locally. The string "str" can
a floating point ratio, e.g. "0.9", or a fraction,
e.g. "3/4", or WxH, e.g. 1280x1024. Use "fit"
to fit in the current screen size.
Use "auto" to fit in the window size.
Note that scaling is done in software and can be slow
and requires more memory. "str" can also be set by
to fit in the current screen size. Use "auto" to
fit in the window size. "str" can also be set by
the env. var. SSVNC_SCALE.
If you observe mouse trail painting errors, enable
X11 Cursor mode (either via Popup or \fB\-x11cursor\fR.)
Note that scaling is done in software and so can be
slow and requires more memory. Some speedup Tips:
ZRLE is faster than Tight in this mode. When
scaling is first detected, the encoding will
be automatically switched to ZRLE. Use the
Popup menu if you want to go back to Tight.
Set SSVNC_PRESERVE_ENCODING=1 to disable this.
Use a solid background on the remote side.
(e.g. manually or via x11vnc \fB\-solid\fR ...)
If the remote server is x11vnc, try client
side caching: x11vnc \fB\-ncache\fR 10 ...
.TP
\fB\-ycrop\fR n
Only show the top n rows of the framebuffer. For
@ -302,11 +318,14 @@ Whether or not to use X server Backingstore for the
main viewer window. The default is to not, mainly
because most Linux, etc, systems X servers disable
*all* Backingstore by default. To re\fB\-enable\fR it put
Option "Backingstore"
in the Device section of /etc/X11/xorg.conf.
In \fB\-bs\fR mode with no X server backingstore, whenever an
area of the screen is re\fB\-exposed\fR it must go out to the
VNC server to retrieve the pixels. This is too slow.
In \fB\-nobs\fR mode, memory is allocated by the viewer to
provide its own backing of the main viewer window. This
actually makes some activities faster (changes in large
@ -327,11 +346,14 @@ password, newline are sent to the VNC server after any VNC
authentication has taken place. Under x11vnc they are
used for the \fB\-unixpw\fR login. Other VNC servers could do
something similar.
You can also indicate "str" via the environment
variable SSVNC_UNIXPW.
Note that the Escape key is actually sent first to tell
x11vnc to not echo the Unix Username back to the VNC
viewer. Set SSVNC_UNIXPW_NOESC=1 to override this.
If str is ".", then you are prompted at the command line
for the username and password in the normal way. If str is
"-" the stdin is read via getpass(3) for username@password.

@ -1,7 +1,7 @@
#!/bin/sh
rm -rf ./src/tmp/* || exit 1
vers=1.0.22
vers=1.0.23
cd .. || exit 1

@ -664,7 +664,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview
+
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/vncviewer/argsresources.c
--- vnc_unixsrc.orig/vncviewer/argsresources.c 2007-02-04 17:10:31.000000000 -0500
+++ vnc_unixsrc/vncviewer/argsresources.c 2008-11-16 14:26:47.000000000 -0500
+++ vnc_unixsrc/vncviewer/argsresources.c 2008-12-30 19:22:59.000000000 -0500
@@ -31,9 +31,9 @@
char *fallback_resources[] = {
@ -1519,7 +1519,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
" %s [<OPTIONS>] -listen [<DISPLAY#>]\n"
" %s -help\n"
"\n"
@@ -332,10 +975,287 @@
@@ -332,10 +975,302 @@
" -autopass\n"
"\n"
"Option names may be abbreviated, e.g. -bgr instead of -bgr233.\n"
@ -1586,12 +1586,27 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ " a floating point ratio, e.g. \"0.9\", or a fraction,\n"
+ " e.g. \"3/4\", or WxH, e.g. 1280x1024. Use \"fit\"\n"
+ " to fit in the current screen size. Use \"auto\" to\n"
+ " fit in the window size.\n"
+ "\n"
+ " Note that scaling is done in software and can be slow\n"
+ " and requires more memory. \"str\" can also be set by\n"
+ " fit in the window size. \"str\" can also be set by\n"
+ " the env. var. SSVNC_SCALE.\n"
+ "\n"
+ " If you observe mouse trail painting errors, enable\n"
+ " X11 Cursor mode (either via Popup or -x11cursor.)\n"
+ "\n"
+ " Note that scaling is done in software and so can be\n"
+ " slow and requires more memory. Some speedup Tips:\n"
+ "\n"
+ " ZRLE is faster than Tight in this mode. When\n"
+ " scaling is first detected, the encoding will\n"
+ " be automatically switched to ZRLE. Use the\n"
+ " Popup menu if you want to go back to Tight.\n"
+ " Set SSVNC_PRESERVE_ENCODING=1 to disable this.\n"
+ "\n"
+ " Use a solid background on the remote side.\n"
+ " (e.g. manually or via x11vnc -solid ...)\n"
+ "\n"
+ " If the remote server is x11vnc, try client\n"
+ " side caching: x11vnc -ncache 10 ...\n"
+ "\n"
+ " -ycrop n Only show the top n rows of the framebuffer. For\n"
+ " use with x11vnc -ncache client caching option\n"
+ " to help \"hide\" the pixel cache region.\n"
@ -1809,7 +1824,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
/*
@@ -347,73 +1267,191 @@
@@ -347,73 +1282,191 @@
void
GetArgsAndResources(int argc, char **argv)
{
@ -3385,7 +3400,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
-
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncviewer/desktop.c
--- vnc_unixsrc.orig/vncviewer/desktop.c 2004-05-28 13:29:29.000000000 -0400
+++ vnc_unixsrc/vncviewer/desktop.c 2008-10-29 07:32:30.000000000 -0400
+++ vnc_unixsrc/vncviewer/desktop.c 2008-12-30 19:33:58.000000000 -0500
@@ -28,28 +28,473 @@
#include <X11/extensions/XShm.h>
#endif
@ -3864,7 +3879,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
/*
* DesktopInitBeforeRealization creates the "desktop" widget and the viewport
@@ -59,91 +504,964 @@
@@ -59,91 +504,1012 @@
void
DesktopInitBeforeRealization()
{
@ -3980,8 +3995,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ float t = 0.0;
+ XtVaSetValues(w, XtNtopOfThumb, &t, NULL);
+ }
+}
+
}
+static XtCallbackProc Jumped(Widget w, XtPointer closure, XtPointer call_data) {
+ float top = *((float *) call_data);
+ Position x, y;
@ -3999,8 +4014,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ XtVaSetValues(w, XtNtopOfThumb, *(XtArgVal*)&t, XtNshown, *(XtArgVal*)&s, NULL);
+ }
+ }
}
+}
+
+extern double dnow(void);
+
+void check_things() {
@ -4066,6 +4081,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ return;
+ }
+
+ if (image_scale) {
+ scale_check_zrle();
+ }
+
+ /* e.g. xrandr resize */
+ dpyWidth = WidthOfScreen(DefaultScreenOfDisplay(dpy));
+ dpyHeight = HeightOfScreen(DefaultScreenOfDisplay(dpy));
@ -4259,8 +4278,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+#else
+#define nfix(i, n) ( i < 0 ? 0 : ( (i >= n) ? (n - 1) : i ) )
+#endif
- XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
+
+int scale_round(int len, double fac) {
+ double eps = 0.000001;
+
@ -4269,8 +4287,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ len = 1;
+ }
+ return len;
}
+}
+
+static void scale_rect(double factor_x, double factor_y, int blend, int interpolate,
+ int *px, int *py, int *pw, int *ph, int solid) {
+
@ -4333,7 +4351,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ /* try to avoid problems with bleeding... */
+ sbdy = (int) (2.0 * fmax * sbdy);
+ }
+
- XChangeWindowAttributes(dpy, desktopWin, valuemask, &attr);
+ //fprintf(stderr, "scale_rect: %dx%d+%d+%d\n", *pw, *ph, *px, *py);
+
+ *px = (int) (*px * factor_x);
@ -4798,6 +4817,36 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ markit:
+/* End taken from x11vnc scale: */
+ if (0) {}
}
+void do_scale_stats(int width, int height) {
+ static double calls = 0.0, sum = 0.0, var = 0.0, last = 0.0;
+ double A = width * height;
+
+ if (last == 0.0) {
+ last = dnow();
+ }
+
+ calls += 1.0;
+ sum += A;
+ var += A*A;
+
+ if (dnow() > last + 4.0) {
+ double cnt = calls;
+ if (cnt <= 0.0) cnt = 1.0;
+ var /= cnt;
+ sum /= cnt;
+ var = var - sum * sum;
+ if (sum > 0.0) {
+ var = var / (sum*sum);
+ }
+ fprintf(stderr, "scale_rect stats: %10d %10.1f ave: %10.3f var-rat: %10.3f\n", (int) calls, sum * cnt, sum, var);
+
+ calls = 0.0;
+ sum = 0.0;
+ var = 0.0;
+ last = dnow();
+ }
+}
+
+void put_image(int src_x, int src_y, int dst_x, int dst_y, int width,
@ -4810,6 +4859,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+
+ if (image_scale) {
+ int i;
+ static int scale_stats = -1;
+
+ for (i=0; i < 2; i++) {
+ if (src_x > 0) src_x--;
+ if (src_y > 0) src_y--;
@ -4818,8 +4869,20 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (src_x + width < xmax) width++;
+ if (src_y + height < ymax) height++;
+ }
+if (db) fprintf(stderr, "put_image(%d %d %d %d %d %d)\n", src_x, src_y, dst_x, dst_y, width, height);
+if (db) fprintf(stderr, "scale_rect(%d %d %d %d)\n", src_x, src_y, width, height);
+
+ if (db) fprintf(stderr, "put_image(%d %d %d %d %d %d)\n", src_x, src_y, dst_x, dst_y, width, height);
+ if (db) fprintf(stderr, "scale_rect(%d %d %d %d)\n", src_x, src_y, width, height);
+
+ if (scale_stats < 0) {
+ if (getenv("SSVNC_SCALE_STATS")) {
+ scale_stats = 1;
+ } else {
+ scale_stats = 0;
+ }
+ }
+ if (scale_stats) {
+ do_scale_stats(width, height);
+ }
+
+ scale_rect(scale_factor_x, scale_factor_y, 1, 0, &src_x, &src_y, &width, &height, solid);
+ dst_x = src_x;
@ -4891,7 +4954,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
/*
* HandleBasicDesktopEvent - deal with expose and leave events.
@@ -152,41 +1470,392 @@
@@ -152,41 +1518,392 @@
static void
HandleBasicDesktopEvent(Widget w, XtPointer ptr, XEvent *ev, Boolean *cont)
{
@ -4899,13 +4962,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ int i, x, y, width, height;
+ static double last_expose = 0.0;
+ double now = dnow();
- switch (ev->type) {
+
+ if (0) {
+ PR_EXPOSE;
+ }
+
- switch (ev->type) {
+ switch (ev->type) {
case Expose:
case GraphicsExpose:
@ -4933,6 +4996,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (y + height < si.framebufferHeight) height++;
+ }
+ }
+
+ if (x + width > si.framebufferWidth) {
+ width = si.framebufferWidth - x;
+ if (width <= 0) {
+ break;
+ }
+ }
- if (ev->xexpose.x + ev->xexpose.width > si.framebufferWidth) {
- ev->xexpose.width = si.framebufferWidth - ev->xexpose.x;
@ -4947,13 +5017,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
- SendFramebufferUpdateRequest(ev->xexpose.x, ev->xexpose.y,
- ev->xexpose.width, ev->xexpose.height, False);
- break;
+ if (x + width > si.framebufferWidth) {
+ width = si.framebufferWidth - x;
+ if (width <= 0) {
+ break;
+ }
+ }
+
+ if (y + height > si.framebufferHeight) {
+ height = si.framebufferHeight - y;
+ if (height <= 0) {
@ -5027,8 +5090,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ break;
}
+ check_things();
}
+}
+
+extern Position desktopX, desktopY;
+
+void scroll_desktop(int horiz, int vert, double amount) {
@ -5095,8 +5158,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ } else if (amount == -1.0) {
+ XSync(dpy, False);
+ }
+}
+
}
+void scale_desktop(int bigger, double frac) {
+ double current, new;
+ char tmp[100];
@ -5306,7 +5369,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
/*
* SendRFBEvent is an action which sends an RFB event. It can be used in two
@@ -201,127 +1870,322 @@
@@ -201,127 +1918,322 @@
* button2 down, 3 for both, etc).
*/
@ -5350,8 +5413,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ last = now;
+ }
+ }
- if (appData.viewOnly) return;
+
+ if (selectingSingleWindow && ev->type == ButtonPress) {
+ selectingSingleWindow = False;
+ SendSingleWindow(ev->xbutton.x, ev->xbutton.y);
@ -5525,7 +5587,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ if (appData.viewOnly) {
+ return;
+ }
+
- if (appData.viewOnly) return;
+ if (*num_params != 0) {
+ if (strncasecmp(params[0],"key",3) == 0) {
+ if (*num_params != 2) {
@ -5737,7 +5800,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
@@ -329,26 +2193,185 @@
@@ -329,26 +2241,185 @@
* CreateDotCursor.
*/
@ -5939,7 +6002,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
@@ -359,38 +2382,37 @@
@@ -359,38 +2430,37 @@
void
CopyDataToScreen(char *buf, int x, int y, int width, int height)
{
@ -6007,7 +6070,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
@@ -401,62 +2423,297 @@
@@ -401,62 +2471,297 @@
static void
CopyBGR233ToScreen(CARD8 *buf, int x, int y, int width, int height)
{
@ -9233,7 +9296,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewe
+}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncviewer/rfbproto.c
--- vnc_unixsrc.orig/vncviewer/rfbproto.c 2008-09-05 19:51:24.000000000 -0400
+++ vnc_unixsrc/vncviewer/rfbproto.c 2008-11-19 20:38:51.000000000 -0500
+++ vnc_unixsrc/vncviewer/rfbproto.c 2008-12-08 10:53:56.000000000 -0500
@@ -23,6 +23,7 @@
* rfbproto.c - functions to deal with client side of RFB protocol.
*/
@ -9370,7 +9433,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ }
+ }
+
+ fprintf(stderr, "exec-cmd: %s\n", cmd2);
+ fprintf(stderr, "exec-cmd: %s\n\n", cmd2);
+ free(cmd2);
+
+ if (! SocketPair(sfd)) {
@ -9473,7 +9536,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ if (type == rfbSecTypeTight) str = "rfbSecTypeTight";
+ if (type == rfbSecTypeUltra) str = "rfbSecTypeUltra";
+
+ if (type == rfbSecTypeTlsVnc) str = "rfbSecTypeTlsVnc";
+ if (type == rfbSecTypeAnonTls) str = "rfbSecTypeAnonTls";
+ if (type == rfbSecTypeVencrypt) str = "rfbSecTypeVencrypt";
+ return str;
+}
@ -9492,7 +9555,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
/*
* InitialiseRFBConnection.
@@ -212,211 +399,494 @@
@@ -212,211 +399,493 @@
Bool
InitialiseRFBConnection(void)
{
@ -9791,7 +9854,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ fprintf(stderr, "Pre-Handshake set Security-Type to: %d (%s)\n", st, pr_sec_type(st));
+ if (secType == rfbSecTypeVencrypt) {
+ goto sec_type;
+ } else if (secType == rfbSecTypeTlsVnc) {
+ } else if (secType == rfbSecTypeAnonTls) {
+ break;
+ }
+ }
@ -9874,7 +9937,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+ switch (secType) {
+ case rfbSecTypeNone:
+ fprintf(stderr, "No authentication needed\n");
+ /* TBD 3.8 */
+ if (viewer_minor == 8) {
+ CARD32 authResult;
+
@ -10142,7 +10204,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -451,6 +921,9 @@
@@ -451,6 +920,9 @@
return True;
}
@ -10152,7 +10214,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
/*
* Negotiate authentication scheme (protocol version 3.7t)
@@ -459,56 +932,61 @@
@@ -459,56 +931,61 @@
static Bool
PerformAuthenticationTight(void)
{
@ -10256,7 +10318,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -519,80 +997,104 @@
@@ -519,80 +996,104 @@
static Bool
AuthenticateVNC(void)
{
@ -10424,7 +10486,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
/*
@@ -602,68 +1104,71 @@
@@ -602,68 +1103,71 @@
static Bool
AuthenticateUnixLogin(void)
{
@ -10548,7 +10610,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -675,19 +1180,20 @@
@@ -675,19 +1179,20 @@
static Bool
ReadInteractionCaps(void)
{
@ -10581,7 +10643,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -700,17 +1206,18 @@
@@ -700,17 +1205,18 @@
static Bool
ReadCapabilityList(CapsContainer *caps, int count)
{
@ -10609,7 +10671,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -729,6 +1236,11 @@
@@ -729,6 +1235,11 @@
Bool requestCompressLevel = False;
Bool requestQualityLevel = False;
Bool requestLastRectEncoding = False;
@ -10621,7 +10683,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
spf.type = rfbSetPixelFormat;
spf.format = myFormat;
@@ -736,12 +1248,18 @@
@@ -736,12 +1247,18 @@
spf.format.greenMax = Swap16IfLE(spf.format.greenMax);
spf.format.blueMax = Swap16IfLE(spf.format.blueMax);
@ -10640,7 +10702,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
if (appData.encodingsString) {
char *encStr = appData.encodingsString;
int encStrLen;
@@ -754,11 +1272,17 @@
@@ -754,11 +1271,17 @@
encStrLen = strlen(encStr);
}
@ -10659,7 +10721,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingTight);
requestLastRectEncoding = True;
if (appData.compressLevel >= 0 && appData.compressLevel <= 9)
@@ -767,16 +1291,33 @@
@@ -767,16 +1290,33 @@
requestQualityLevel = True;
} else if (strncasecmp(encStr,"hextile",encStrLen) == 0) {
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingHextile);
@ -10695,7 +10757,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
encStr = nextEncStr;
@@ -797,7 +1338,7 @@
@@ -797,7 +1337,7 @@
if (appData.useRemoteCursor) {
if (se->nEncodings < MAX_ENCODINGS)
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingXCursor);
@ -10704,7 +10766,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRichCursor);
if (se->nEncodings < MAX_ENCODINGS)
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingPointerPos);
@@ -806,10 +1347,14 @@
@@ -806,10 +1346,14 @@
if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) {
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingLastRect);
}
@ -10720,7 +10782,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
fprintf(stderr,"Same machine: preferring raw encoding\n");
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRaw);
} else {
@@ -818,13 +1363,15 @@
@@ -818,13 +1362,15 @@
}
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingCopyRect);
@ -10740,7 +10802,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
encs[se->nEncodings++] = Swap32IfLE(appData.compressLevel +
rfbEncodingCompressLevel0);
} else if (!tunnelSpecified) {
@@ -835,7 +1382,7 @@
@@ -835,7 +1381,7 @@
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingCompressLevel1);
}
@ -10749,7 +10811,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
if (appData.qualityLevel < 0 || appData.qualityLevel > 9)
appData.qualityLevel = 5;
encs[se->nEncodings++] = Swap32IfLE(appData.qualityLevel +
@@ -844,18 +1391,35 @@
@@ -844,18 +1390,35 @@
if (appData.useRemoteCursor) {
encs[se->nEncodings++] = Swap32IfLE(rfbEncodingXCursor);
@ -10788,7 +10850,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
return True;
}
@@ -868,31 +1432,86 @@
@@ -868,31 +1431,86 @@
Bool
SendIncrementalFramebufferUpdateRequest()
{
@ -10888,7 +10950,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -903,19 +1522,36 @@
@@ -903,19 +1521,36 @@
Bool
SendPointerEvent(int x, int y, int buttonMask)
{
@ -10937,7 +10999,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -926,12 +1562,20 @@
@@ -926,12 +1561,20 @@
Bool
SendKeyEvent(CARD32 key, Bool down)
{
@ -10963,7 +11025,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -942,281 +1586,943 @@
@@ -942,281 +1585,943 @@
Bool
SendClientCutText(char *str, int len)
{
@ -12130,7 +12192,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
#ifdef MITSHM
/* if using shared memory PutImage, make sure that the X server has
@@ -1224,59 +2530,165 @@
@@ -1224,59 +2529,165 @@
mainly to avoid copyrect using invalid screen contents - not sure
if we'd need it otherwise. */
@ -12329,7 +12391,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
}
@@ -1296,26 +2708,47 @@
@@ -1296,26 +2707,47 @@
#define CONCAT2(a,b) a##b
#define CONCAT2E(a,b) CONCAT2(a,b)
@ -12377,7 +12439,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
#undef BPP
/*
@@ -1358,9 +2791,9 @@
@@ -1358,9 +2790,9 @@
" %s significant bit in each byte is leftmost on the screen.\n",
(format->bigEndian ? "Most" : "Least"));
} else {
@ -12389,7 +12451,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
(format->bigEndian ? "Most" : "Least"));
}
if (format->trueColour) {
@@ -1462,4 +2895,3 @@
@@ -1462,4 +2894,3 @@
cinfo->src = &jpegSrcManager;
}
@ -13258,8 +13320,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/tunnel.c vnc_unixsrc/vncviewe
sprintf(lastArgv, "localhost::%d", localPort);
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vncviewer/vncviewer._man
--- vnc_unixsrc.orig/vncviewer/vncviewer._man 1969-12-31 19:00:00.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer._man 2008-10-29 08:24:43.000000000 -0400
@@ -0,0 +1,717 @@
+++ vnc_unixsrc/vncviewer/vncviewer._man 2008-12-30 19:24:50.000000000 -0500
@@ -0,0 +1,739 @@
+'\" t
+.\" ** The above line should force tbl to be a preprocessor **
+.\" Man page for X vncviewer
@ -13273,7 +13335,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+.\" License as specified in the file LICENCE.TXT that comes with the
+.\" TightVNC distribution.
+.\"
+.TH ssvncviewer 1 "October 2008" "" "SSVNC"
+.TH ssvncviewer 1 "December 2008" "" "SSVNC"
+.SH NAME
+ssvncviewer \- an X viewer client for VNC
+.SH SYNOPSIS
@ -13520,11 +13582,27 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+Scale the desktop locally. The string "str" can
+a floating point ratio, e.g. "0.9", or a fraction,
+e.g. "3/4", or WxH, e.g. 1280x1024. Use "fit"
+to fit in the current screen size.
+Use "auto" to fit in the window size.
+Note that scaling is done in software and can be slow
+and requires more memory. "str" can also be set by
+to fit in the current screen size. Use "auto" to
+fit in the window size. "str" can also be set by
+the env. var. SSVNC_SCALE.
+
+If you observe mouse trail painting errors, enable
+X11 Cursor mode (either via Popup or \fB\-x11cursor\fR.)
+
+Note that scaling is done in software and so can be
+slow and requires more memory. Some speedup Tips:
+
+ZRLE is faster than Tight in this mode. When
+scaling is first detected, the encoding will
+be automatically switched to ZRLE. Use the
+Popup menu if you want to go back to Tight.
+Set SSVNC_PRESERVE_ENCODING=1 to disable this.
+
+Use a solid background on the remote side.
+(e.g. manually or via x11vnc \fB\-solid\fR ...)
+
+If the remote server is x11vnc, try client
+side caching: x11vnc \fB\-ncache\fR 10 ...
+.TP
+\fB\-ycrop\fR n
+Only show the top n rows of the framebuffer. For
@ -13564,11 +13642,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+main viewer window. The default is to not, mainly
+because most Linux, etc, systems X servers disable
+*all* Backingstore by default. To re\fB\-enable\fR it put
+
+Option "Backingstore"
+
+in the Device section of /etc/X11/xorg.conf.
+In \fB\-bs\fR mode with no X server backingstore, whenever an
+area of the screen is re\fB\-exposed\fR it must go out to the
+VNC server to retrieve the pixels. This is too slow.
+
+In \fB\-nobs\fR mode, memory is allocated by the viewer to
+provide its own backing of the main viewer window. This
+actually makes some activities faster (changes in large
@ -13589,11 +13670,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+authentication has taken place. Under x11vnc they are
+used for the \fB\-unixpw\fR login. Other VNC servers could do
+something similar.
+
+You can also indicate "str" via the environment
+variable SSVNC_UNIXPW.
+
+Note that the Escape key is actually sent first to tell
+x11vnc to not echo the Unix Username back to the VNC
+viewer. Set SSVNC_UNIXPW_NOESC=1 to override this.
+
+If str is ".", then you are prompted at the command line
+for the username and password in the normal way. If str is
+"-" the stdin is read via getpass(3) for username@password.
@ -13979,7 +14063,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn
+Karl Runge <runge@karlrunge.com>
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncviewer/vncviewer.c
--- vnc_unixsrc.orig/vncviewer/vncviewer.c 2004-01-13 09:22:05.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.c 2008-11-17 21:29:21.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.c 2008-12-30 19:22:19.000000000 -0500
@@ -22,6 +22,7 @@
*/
@ -14212,7 +14296,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
/* The -listen option is used to make us a daemon process which listens for
incoming connections from servers, rather than actively connecting to a
@@ -45,89 +256,1398 @@
@@ -45,89 +256,1415 @@
listenForIncomingConnections() returns, setting the listenSpecified
flag. */
@ -14776,6 +14860,23 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ schedule_format_change();
+}
+
+void scale_check_zrle(void) {
+ static int didit = 0;
+ if (didit) {
+ return;
+ }
+ didit = 1;
+ if (getenv("SSVNC_PRESERVE_ENCODING")) {
+ return;
+ }
+ if (!usingZRLE) {
+ Widget w;
+ fprintf(stderr, "\nSwitching to faster ZRLE encoding in client-side scaling mode.\n");
+ fprintf(stderr, "Switch back to Tight via the Popup menu if you prefer it.\n\n");
+ ToggleTightZRLE(w, NULL, NULL, NULL);
+ }
+}
+
+/*
+ * ToggleViewOnly
+ */
@ -15294,8 +15395,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ XtVaSetValues(w, XtNstate, False, NULL);
+ }
+}
- Cleanup();
+
+void
+SetNOJPEGState(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
@ -15360,8 +15460,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ XtVaSetValues(w, XtNstate, False, NULL);
+ }
+}
- return 0;
+
+void
+Set16bppState(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
@ -15617,7 +15716,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ XtVaSetValues(w, XtNstate, False, NULL);
+ }
+}
+
- Cleanup();
+void
+SetSingleWindowState(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
@ -15627,7 +15727,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ XtVaSetValues(w, XtNstate, False, NULL);
+ }
+}
+
- return 0;
+void
+SetTextChatState(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
@ -15649,7 +15750,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncviewer/vncviewer.h
--- vnc_unixsrc.orig/vncviewer/vncviewer.h 2004-03-11 13:14:40.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.h 2008-11-17 21:22:35.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.h 2008-12-30 14:03:39.000000000 -0500
@@ -28,6 +28,7 @@
#include <string.h>
#include <sys/time.h>
@ -15957,7 +16058,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern int StringToIPAddr(const char *str, unsigned int *addr);
extern Bool SameMachine(int sock);
@@ -271,3 +386,70 @@
@@ -271,3 +386,72 @@
extern XtAppContext appContext;
extern Display* dpy;
extern Widget toplevel;
@ -16002,6 +16103,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
+extern void ToggleFileXfer(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void ToggleTermTextChat(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+
+extern void scale_check_zrle(void);
+
+extern void SetViewOnlyState(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void SetNOJPEGState(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void SetScaleNState(Widget w, XEvent *ev, String *params, Cardinal *num_params);
@ -16030,7 +16133,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
+extern void SetEscapeKeysState(Widget w, XEvent *ev, String *params, Cardinal *num_params);
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vncviewer/vncviewer.man
--- vnc_unixsrc.orig/vncviewer/vncviewer.man 2004-03-11 13:14:40.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.man 2008-10-29 08:24:43.000000000 -0400
+++ vnc_unixsrc/vncviewer/vncviewer.man 2008-12-30 19:24:50.000000000 -0500
@@ -5,38 +5,55 @@
.\" Copyright (C) 1998 Marcus.Brinkmann@ruhr-uni-bochum.de
.\" Copyright (C) 2000,2001 Red Hat, Inc.
@ -16042,7 +16145,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.\" TightVNC distribution.
.\"
-.TH vncviewer 1 "January 2003" "" "TightVNC"
+.TH ssvncviewer 1 "October 2008" "" "SSVNC"
+.TH ssvncviewer 1 "December 2008" "" "SSVNC"
.SH NAME
-vncviewer \- an X viewer client for VNC
+ssvncviewer \- an X viewer client for VNC
@ -16095,7 +16198,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
You can use F8 to display a pop\-up utility menu. Press F8 twice to
pass single F8 to the remote side.
.SH OPTIONS
@@ -168,6 +185,313 @@
@@ -168,6 +185,335 @@
\fB\-autopass\fR
Read a plain-text password from stdin. This option affects only the
standard VNC authentication.
@ -16172,11 +16275,27 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
+Scale the desktop locally. The string "str" can
+a floating point ratio, e.g. "0.9", or a fraction,
+e.g. "3/4", or WxH, e.g. 1280x1024. Use "fit"
+to fit in the current screen size.
+Use "auto" to fit in the window size.
+Note that scaling is done in software and can be slow
+and requires more memory. "str" can also be set by
+to fit in the current screen size. Use "auto" to
+fit in the window size. "str" can also be set by
+the env. var. SSVNC_SCALE.
+
+If you observe mouse trail painting errors, enable
+X11 Cursor mode (either via Popup or \fB\-x11cursor\fR.)
+
+Note that scaling is done in software and so can be
+slow and requires more memory. Some speedup Tips:
+
+ZRLE is faster than Tight in this mode. When
+scaling is first detected, the encoding will
+be automatically switched to ZRLE. Use the
+Popup menu if you want to go back to Tight.
+Set SSVNC_PRESERVE_ENCODING=1 to disable this.
+
+Use a solid background on the remote side.
+(e.g. manually or via x11vnc \fB\-solid\fR ...)
+
+If the remote server is x11vnc, try client
+side caching: x11vnc \fB\-ncache\fR 10 ...
+.TP
+\fB\-ycrop\fR n
+Only show the top n rows of the framebuffer. For
@ -16216,11 +16335,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
+main viewer window. The default is to not, mainly
+because most Linux, etc, systems X servers disable
+*all* Backingstore by default. To re\fB\-enable\fR it put
+
+Option "Backingstore"
+
+in the Device section of /etc/X11/xorg.conf.
+In \fB\-bs\fR mode with no X server backingstore, whenever an
+area of the screen is re\fB\-exposed\fR it must go out to the
+VNC server to retrieve the pixels. This is too slow.
+
+In \fB\-nobs\fR mode, memory is allocated by the viewer to
+provide its own backing of the main viewer window. This
+actually makes some activities faster (changes in large
@ -16241,11 +16363,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
+authentication has taken place. Under x11vnc they are
+used for the \fB\-unixpw\fR login. Other VNC servers could do
+something similar.
+
+You can also indicate "str" via the environment
+variable SSVNC_UNIXPW.
+
+Note that the Escape key is actually sent first to tell
+x11vnc to not echo the Unix Username back to the VNC
+viewer. Set SSVNC_UNIXPW_NOESC=1 to override this.
+
+If str is ".", then you are prompted at the command line
+for the username and password in the normal way. If str is
+"-" the stdin is read via getpass(3) for username@password.
@ -16409,7 +16534,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.SH ENCODINGS
The server supplies information in whatever format is desired by the
client, in order to make the client as easy as possible to implement.
@@ -238,6 +562,15 @@
@@ -238,6 +584,15 @@
\-quality and \-nojpeg options above). Tight encoding is usually the
best choice for low\-bandwidth network environments (e.g. slow modem
connections).
@ -16425,7 +16550,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.SH RESOURCES
X resources that \fBvncviewer\fR knows about, aside from the
normal Xt resources, are as follows:
@@ -364,8 +697,8 @@
@@ -364,8 +719,8 @@
.B %R
remote TCP port number.
.SH SEE ALSO
@ -16436,7 +16561,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc
.SH AUTHORS
Original VNC was developed in AT&T Laboratories Cambridge. TightVNC
additions was implemented by Constantin Kaplinsky. Many other people
@@ -380,3 +713,5 @@
@@ -380,3 +735,5 @@
Tim Waugh <twaugh@redhat.com>,
.br
Constantin Kaplinsky <const@ce.cctpu.edu.ru>
@ -18710,7 +18835,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zywrletemplate.c vnc_unixsrc/
+#undef ZYWRLE_SAVE_PIXEL
diff -Naur vnc_unixsrc.orig/include/rfbproto.h vnc_unixsrc/include/rfbproto.h
--- vnc_unixsrc.orig/include/rfbproto.h 2004-05-27 03:02:02.000000000 -0400
+++ vnc_unixsrc/include/rfbproto.h 2008-11-18 11:08:50.000000000 -0500
+++ vnc_unixsrc/include/rfbproto.h 2008-12-07 09:35:32.000000000 -0500
@@ -205,7 +205,22 @@
#define rfbSecTypeInvalid 0
#define rfbSecTypeNone 1
@ -18721,7 +18846,7 @@ diff -Naur vnc_unixsrc.orig/include/rfbproto.h vnc_unixsrc/include/rfbproto.h
+#define rfbSecTypeUltra 17
+
+/* try to support VeNCrypt and TLS */
+#define rfbSecTypeTlsVnc 18
+#define rfbSecTypeAnonTls 18
+#define rfbSecTypeVencrypt 19
+
+#define rfbVencryptPlain 256

Loading…
Cancel
Save