summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrunge <runge>2007-04-07 21:29:04 +0000
committerrunge <runge>2007-04-07 21:29:04 +0000
commit570b8e90900d4ca5a9136f0f835557553410df4a (patch)
tree51d68877f24559f21757532cdd564c3c1a916bc8
parentaf44bff5364d01a5b310204256a3533da3f51c31 (diff)
downloadlibtdevnc-570b8e90900d4ca5a9136f0f835557553410df4a.tar.gz
libtdevnc-570b8e90900d4ca5a9136f0f835557553410df4a.zip
update viewer jars and ss script
-rw-r--r--classes/ssl/SignedVncViewer.jarbin77664 -> 77721 bytes
-rw-r--r--classes/ssl/VncViewer.jarbin74938 -> 74996 bytes
-rwxr-xr-xclasses/ssl/ss_vncviewer56
-rw-r--r--classes/ssl/tightvnc-1.3dev7_javasrc-vncviewer-ssl.patch31
4 files changed, 69 insertions, 18 deletions
diff --git a/classes/ssl/SignedVncViewer.jar b/classes/ssl/SignedVncViewer.jar
index 38cb51b..d756dea 100644
--- a/classes/ssl/SignedVncViewer.jar
+++ b/classes/ssl/SignedVncViewer.jar
Binary files differ
diff --git a/classes/ssl/VncViewer.jar b/classes/ssl/VncViewer.jar
index fb3da29..8caaa33 100644
--- a/classes/ssl/VncViewer.jar
+++ b/classes/ssl/VncViewer.jar
Binary files differ
diff --git a/classes/ssl/ss_vncviewer b/classes/ssl/ss_vncviewer
index 381e678..857cfce 100755
--- a/classes/ssl/ss_vncviewer
+++ b/classes/ssl/ss_vncviewer
@@ -3,7 +3,7 @@
# ss_vncviewer: wrapper for vncviewer to use an stunnel SSL tunnel
# or an SSH tunnel.
#
-# Copyright (c) 2006 by Karl J. Runge <runge@karlrunge.com>
+# Copyright (c) 2006-2007 by Karl J. Runge <runge@karlrunge.com>
#
# You must have stunnel(8) installed on the system and in your PATH
# (however, see the -ssh option below, in which case you will need ssh(1)
@@ -112,7 +112,9 @@ VNCVIEWERCMD=${VNCVIEWERCMD:-vncviewer}
# Same for STUNNEL, e.g. set it to /path/to/stunnel or stunnel4, etc.
#
-#set -xv
+if [ "X$SS_DEBUG" != "X" ]; then
+ set -xv
+fi
PATH=$PATH:/usr/sbin:/usr/local/sbin:/dist/sbin; export PATH
@@ -146,6 +148,10 @@ showcert=""
reverse=""
if [ "X$1" = "X-viewerflavor" ]; then
+ if echo "$VNCVIEWERCMD" | egrep -i '^(xmessage|sleep )' > /dev/null; then
+ echo "unknown"
+ exit 0
+ fi
if echo "$VNCVIEWERCMD" | grep -i chicken.of > /dev/null; then
echo "cotvnc"
exit 0
@@ -167,6 +173,12 @@ if [ "X$1" = "X-viewerflavor" ]; then
exit 0
fi
+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/'`
+fi
+
# grab our cmdline options:
while [ "X$1" != "X" ]
do
@@ -215,10 +227,6 @@ else
fi
if [ "X$reverse" != "X" ]; then
ssh_sleep=1800
- if [ "X$use_ssh" = "X1" ]; then
- VNCVIEWER_LISTEN_LOCALHOST=1
- export VNCVIEWER_LISTEN_LOCALHOST
- fi
if [ "X$proxy" != "X" ]; then
if [ "X$use_ssh" = "X" -a "X$use_sshssl" = "X" ]; then
echo ""
@@ -256,6 +264,15 @@ if echo "$orig" | grep '^vnc://' > /dev/null; then
direct_connect=1
elif echo "$orig" | grep '^vncs://' > /dev/null; then
orig=`echo "$orig" | sed -e 's,vncs://,,'`
+elif echo "$orig" | grep '^vncssl://' > /dev/null; then
+ orig=`echo "$orig" | sed -e 's,vncssl://,,'`
+elif echo "$orig" | grep '^vncssh://' > /dev/null; then
+ orig=`echo "$orig" | sed -e 's,vncssh://,,'`
+ use_ssh=1
+fi
+if [ "X$reverse" != "X" -a "X$direct_connect" = "X" ]; then
+ VNCVIEWER_LISTEN_LOCALHOST=1
+ export VNCVIEWER_LISTEN_LOCALHOST
fi
# play around with host:display port:
@@ -264,6 +281,8 @@ if echo "$orig" | grep ':' > /dev/null; then
else
if [ "X$reverse" = "X" ]; then
orig="$orig:0"
+ elif [ "X$orig" = "X" ]; then
+ orig=":0"
fi
fi
@@ -295,11 +314,32 @@ fi
date_sec=`date +%S`
+if echo "$VNCVIEWERCMD" | grep '^sleep[ ][ ]*[0-9][0-9]*' > /dev/null; then
+ if [ "X$SS_VNCVIEWER_LISTEN_PORT" = "X" ]; then
+ p=`echo "$VNCVIEWERCMD" | awk '{print $3}'`
+ if [ "X$p" != "X" ]; then
+ SS_VNCVIEWER_LISTEN_PORT=$p
+ fi
+ fi
+ p2=`echo "$VNCVIEWERCMD" | awk '{print $2}'`
+ VNCVIEWERCMD="eval sleep $p2; echo Local "
+elif echo "$VNCVIEWERCMD" | grep '^xmessage[ ][ ]*[0-9][0-9]*' > /dev/null; then
+ if [ "X$SS_VNCVIEWER_LISTEN_PORT" = "X" ]; then
+ p=`echo "$VNCVIEWERCMD" | awk '{print $2}'`
+ SS_VNCVIEWER_LISTEN_PORT=$p
+ fi
+fi
+
findfree() {
try0=$1
try=$try0
use0=""
+ if [ "X$SS_VNCVIEWER_LISTEN_PORT" != "X" ]; then
+ echo "$SS_VNCVIEWER_LISTEN_PORT"
+ return
+ fi
+
while [ $try -lt 6000 ]
do
if [ "X$inuse" = "X" ]; then
@@ -763,10 +803,10 @@ if [ "X$direct_connect" != "X" ]; then
echo ""
echo "NOTE: Press Ctrl-C to terminate viewer LISTEN mode."
echo ""
- echo "$VNCVIEWERCMD" "$@" -listen $N
+ echo "$VNCVIEWERCMD" "$@" -listen $disp
trap "final" 0 2 15
echo ""
- $VNCVIEWERCMD "$@" -listen $N
+ $VNCVIEWERCMD "$@" -listen $disp
fi
exit $?
fi
diff --git a/classes/ssl/tightvnc-1.3dev7_javasrc-vncviewer-ssl.patch b/classes/ssl/tightvnc-1.3dev7_javasrc-vncviewer-ssl.patch
index bd26a47..281092a 100644
--- a/classes/ssl/tightvnc-1.3dev7_javasrc-vncviewer-ssl.patch
+++ b/classes/ssl/tightvnc-1.3dev7_javasrc-vncviewer-ssl.patch
@@ -73,8 +73,8 @@ diff -x VncCanvas.java -Naur vnc_javasrc.orig/RfbProto.java vnc_javasrc/RfbProto
serverMajor = (b[4] - '0') * 100 + (b[5] - '0') * 10 + (b[6] - '0');
diff -x VncCanvas.java -Naur vnc_javasrc.orig/SSLSocketToMe.java vnc_javasrc/SSLSocketToMe.java
--- vnc_javasrc.orig/SSLSocketToMe.java 1969-12-31 19:00:00.000000000 -0500
-+++ vnc_javasrc/SSLSocketToMe.java 2007-02-21 23:27:10.000000000 -0500
-@@ -0,0 +1,1366 @@
++++ vnc_javasrc/SSLSocketToMe.java 2007-03-31 23:33:21.000000000 -0400
+@@ -0,0 +1,1371 @@
+/*
+ * SSLSocketToMe.java: add SSL encryption to Java VNC Viewer.
+ *
@@ -470,6 +470,13 @@ diff -x VncCanvas.java -Naur vnc_javasrc.orig/SSLSocketToMe.java vnc_javasrc/SSL
+ public void check_for_proxy() {
+
+ boolean result = false;
++
++ trusturlCerts = null;
++ proxy_in_use = false;
++ if (viewer.ignoreProxy) {
++ return;
++ }
++
+ String ustr = "https://" + host + ":";
+ if (viewer.httpsPort != null) {
+ ustr += viewer.httpsPort;
@@ -479,8 +486,6 @@ diff -x VncCanvas.java -Naur vnc_javasrc.orig/SSLSocketToMe.java vnc_javasrc/SSL
+ ustr += viewer.urlPrefix + "/check.https.proxy.connection";
+ dbg("ustr is: " + ustr);
+
-+ trusturlCerts = null;
-+ proxy_in_use = false;
+
+ try {
+ URL url = new URL(ustr);
@@ -1443,8 +1448,8 @@ diff -x VncCanvas.java -Naur vnc_javasrc.orig/SSLSocketToMe.java vnc_javasrc/SSL
+}
diff -x VncCanvas.java -Naur vnc_javasrc.orig/VncViewer.java vnc_javasrc/VncViewer.java
--- vnc_javasrc.orig/VncViewer.java 2004-03-04 08:34:25.000000000 -0500
-+++ vnc_javasrc/VncViewer.java 2007-02-21 23:24:37.000000000 -0500
-@@ -88,6 +88,16 @@
++++ vnc_javasrc/VncViewer.java 2007-03-31 23:35:26.000000000 -0400
+@@ -88,6 +88,17 @@
int deferCursorUpdates;
int deferUpdateRequests;
@@ -1455,13 +1460,14 @@ diff -x VncCanvas.java -Naur vnc_javasrc.orig/VncViewer.java vnc_javasrc/VncView
+ String httpsPort;
+ String oneTimeKey;
+ boolean forceProxy;
++ boolean ignoreProxy;
+ boolean trustAllVncCerts;
+ boolean trustUrlVncCert;
+
// Reference to this applet for inter-applet communication.
public static java.applet.Applet refApplet;
-@@ -626,6 +636,63 @@
+@@ -626,6 +637,68 @@
// SocketFactory.
socketFactory = readParameter("SocketFactory", false);
@@ -1510,17 +1516,22 @@ diff -x VncCanvas.java -Naur vnc_javasrc.orig/VncViewer.java vnc_javasrc/VncView
+ forceProxy = false;
+ str = readParameter("forceProxy", false);
+ if (str != null && str.equalsIgnoreCase("Yes")) {
-+ forceProxy = true;
++ forceProxy = true;
++ }
++ ignoreProxy = false;
++ str = readParameter("ignoreProxy", false);
++ if (str != null && str.equalsIgnoreCase("Yes")) {
++ ignoreProxy = true;
+ }
+ trustAllVncCerts = false;
+ str = readParameter("trustAllVncCerts", false);
+ if (str != null && str.equalsIgnoreCase("Yes")) {
-+ trustAllVncCerts = true;
++ trustAllVncCerts = true;
+ }
+ trustUrlVncCert = false;
+ str = readParameter("trustUrlVncCert", false);
+ if (str != null && str.equalsIgnoreCase("Yes")) {
-+ trustUrlVncCert = true;
++ trustUrlVncCert = true;
+ }
}