Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
74d77479
Commit
74d77479
authored
Nov 23, 2006
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename ssl_vncviewer to ss_vncviewer
parent
0a6f75c6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
664 deletions
+44
-664
ss_vncviewer
classes/ssl/ss_vncviewer
+44
-26
ssl_vncviewer
classes/ssl/ssl_vncviewer
+0
-638
No files found.
classes/ssl/ss_vncviewer
View file @
74d77479
#!/bin/sh
#!/bin/sh
#
#
# ss
l
_vncviewer: wrapper for vncviewer to use an stunnel SSL tunnel
# ss_vncviewer: wrapper for vncviewer to use an stunnel SSL tunnel
# or an SSH tunnel.
# or an SSH tunnel.
#
#
# Copyright (c) 2006 by Karl J. Runge <runge@karlrunge.com>
# Copyright (c) 2006 by Karl J. Runge <runge@karlrunge.com>
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
# (or use stunnel on the server side for any other VNC server)
# (or use stunnel on the server side for any other VNC server)
#
#
#
#
# Usage: ss
l
_vncviewer [cert-args] host:display <vncviewer-args>
# Usage: ss_vncviewer [cert-args] host:display <vncviewer-args>
#
#
# e.g.: ss
l
_vncviewer snoopy:0
# e.g.: ss_vncviewer snoopy:0
# ss
l
_vncviewer snoopy:0 -encodings "copyrect tight zrle hextile"
# ss_vncviewer snoopy:0 -encodings "copyrect tight zrle hextile"
#
#
# [cert-args] can be:
# [cert-args] can be:
#
#
...
@@ -69,13 +69,13 @@
...
@@ -69,13 +69,13 @@
#
#
# Examples:
# Examples:
#
#
# ss
l
_vncviewer -ssh bob@bobs-home.net:0
# ss_vncviewer -ssh bob@bobs-home.net:0
# ss
l
_vncviewer -ssh -sshcmd 'x11vnc -localhost' bob@bobs-home.net:0
# ss_vncviewer -ssh -sshcmd 'x11vnc -localhost' bob@bobs-home.net:0
#
#
# ss
l
_vncviewer -ssh -proxy fred@mygate.com:2022 mymachine:0
# ss_vncviewer -ssh -proxy fred@mygate.com:2022 mymachine:0
# ss
l
_vncviewer -ssh -proxy bob@bobs-home.net:2222 localhost:0
# ss_vncviewer -ssh -proxy bob@bobs-home.net:2222 localhost:0
#
#
# ss
l
_vncviewer -ssh -proxy fred@gw-host,fred@peecee localhost:0
# ss_vncviewer -ssh -proxy fred@gw-host,fred@peecee localhost:0
#
#
# -sshcmd cmd Run "cmd" via ssh instead of the default "sleep 15"
# -sshcmd cmd Run "cmd" via ssh instead of the default "sleep 15"
# e.g. -sshcmd 'x11vnc -display :0 -localhost -rfbport 5900'
# e.g. -sshcmd 'x11vnc -display :0 -localhost -rfbport 5900'
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
# this if you need to tunnel additional services via -R and -L
# this if you need to tunnel additional services via -R and -L
# (see -sshargs above).
# (see -sshargs above).
#
#
# ss
l
_vncviewer -sshssl -proxy fred@mygate.com mymachine:0
# ss_vncviewer -sshssl -proxy fred@mygate.com mymachine:0
#
#
#
#
# -alpha turn on cursor alphablending hack if you are using the
# -alpha turn on cursor alphablending hack if you are using the
...
@@ -129,11 +129,29 @@ use_sshssl=""
...
@@ -129,11 +129,29 @@ use_sshssl=""
direct_connect
=
""
direct_connect
=
""
ssh_sleep
=
15
ssh_sleep
=
15
ssh_cmd
=
"sleep
$ssh_sleep
"
ssh_cmd
=
"sleep
$ssh_sleep
"
if
[
"X
$SS
L
_VNCVIEWER_SSH_CMD
"
!=
"X"
]
;
then
if
[
"X
$SS_VNCVIEWER_SSH_CMD
"
!=
"X"
]
;
then
ssh_cmd
=
"
$SS
L
_VNCVIEWER_SSH_CMD
"
ssh_cmd
=
"
$SS_VNCVIEWER_SSH_CMD
"
fi
fi
ssh_args
=
""
ssh_args
=
""
if
[
"X
$1
"
=
"X-viewerflavor"
]
;
then
if
echo
"
$VNCVIEWERCMD
"
|
grep
-i
chicken.of
>
/dev/null
;
then
echo
"cotvnc"
exit
0
fi
str
=
`
"
$VNCVIEWERCMD
"
-h
2>&1 |
head
-5
`
if
echo
"
$str
"
|
grep
-i
'TightVNC.viewer'
>
/dev/null
;
then
echo
"tightvnc"
elif
echo
"
$str
"
|
grep
-i
'RealVNC.Ltd'
>
/dev/null
;
then
echo
"realvnc4"
elif
echo
"
$str
"
|
grep
-i
'VNC viewer version 3'
>
/dev/null
;
then
echo
"realvnc3"
else
echo
"unknown"
fi
exit
0
fi
# grab our cmdline options:
# grab our cmdline options:
while
[
"X
$1
"
!=
"X"
]
while
[
"X
$1
"
!=
"X"
]
do
do
...
@@ -312,16 +330,16 @@ if [ "X$use_ssh" = "X1" ]; then
...
@@ -312,16 +330,16 @@ if [ "X$use_ssh" = "X1" ]; then
fi
fi
C
=
""
C
=
""
if
[
"X
$SS
L
_VNCVIEWER_USE_C
"
!=
"X"
]
;
then
if
[
"X
$SS_VNCVIEWER_USE_C
"
!=
"X"
]
;
then
C
=
"-C"
C
=
"-C"
fi
fi
# the -t option actually speeds up typing response via VNC!!
# the -t option actually speeds up typing response via VNC!!
if
[
"X
$SS
L
_VNCVIEWER_SSH_ONLY
"
!=
"X"
]
;
then
if
[
"X
$SS_VNCVIEWER_SSH_ONLY
"
!=
"X"
]
;
then
echo
"
$ssh
-x -p
$ssh_port
-t
$C
$ssh_args
$ssh_host
\"
$info
\"
"
echo
"
$ssh
-x -p
$ssh_port
-t
$C
$ssh_args
$ssh_host
\"
$info
\"
"
echo
""
echo
""
$ssh
-x
-p
$ssh_port
-t
$C
$ssh_args
$ssh_host
"
$ssh_cmd
"
$ssh
-x
-p
$ssh_port
-t
$C
$ssh_args
$ssh_host
"
$ssh_cmd
"
exit
$?
exit
$?
elif
[
"X
$SS
L
_VNCVIEWER_NO_F
"
!=
"X"
]
;
then
elif
[
"X
$SS_VNCVIEWER_NO_F
"
!=
"X"
]
;
then
echo
"
$ssh
-x -p
$ssh_port
-t
$C
-L
${
use
}
:
${
vnc_host
}
:
${
port
}
$ssh_args
$ssh_host
\"
$info
\"
"
echo
"
$ssh
-x -p
$ssh_port
-t
$C
-L
${
use
}
:
${
vnc_host
}
:
${
port
}
$ssh_args
$ssh_host
\"
$info
\"
"
echo
""
echo
""
$ssh
-x
-p
$ssh_port
-t
$C
-L
${
use
}
:
${
vnc_host
}
:
${
port
}
$ssh_args
$ssh_host
"
$ssh_cmd
"
$ssh
-x
-p
$ssh_port
-t
$C
-L
${
use
}
:
${
vnc_host
}
:
${
port
}
$ssh_args
$ssh_host
"
$ssh_cmd
"
...
@@ -401,17 +419,17 @@ fi
...
@@ -401,17 +419,17 @@ fi
pcode
()
{
pcode
()
{
tf
=
$1
tf
=
$1
SS
L_VNC_PROXY
=
$proxy
;
export
SSL_
VNC_PROXY
SS
VNC_PROXY
=
$proxy
;
export
SS
VNC_PROXY
SS
L_VNC_DEST
=
"
$host
:
$port
"
;
export
SSL_
VNC_DEST
SS
VNC_DEST
=
"
$host
:
$port
"
;
export
SS
VNC_DEST
cod
=
'#!/usr/bin/perl
cod
=
'#!/usr/bin/perl
# A hack to glue stunnel to a Web proxy for client connections.
# A hack to glue stunnel to a Web proxy for client connections.
use IO::Socket::INET;
use IO::Socket::INET;
my ($first, $second) = split(/,/, $ENV{SS
L_
VNC_PROXY});
my ($first, $second) = split(/,/, $ENV{SSVNC_PROXY});
my ($proxy_host, $proxy_port) = split(/:/, $first);
my ($proxy_host, $proxy_port) = split(/:/, $first);
my $connect = $ENV{SS
L_
VNC_DEST};
my $connect = $ENV{SSVNC_DEST};
print STDERR "\nperl script for web proxing:\n";
print STDERR "\nperl script for web proxing:\n";
print STDERR "proxy_host: $proxy_host\n";
print STDERR "proxy_host: $proxy_host\n";
...
@@ -419,11 +437,11 @@ print STDERR "proxy_port: $proxy_port\n";
...
@@ -419,11 +437,11 @@ print STDERR "proxy_port: $proxy_port\n";
print STDERR "proxy_connect: $connect\n";
print STDERR "proxy_connect: $connect\n";
my $listen_handle = "";
my $listen_handle = "";
if ($ENV{SS
L_
VNC_LISTEN} != "") {
if ($ENV{SSVNC_LISTEN} != "") {
my $listen_sock = IO::Socket::INET->new(
my $listen_sock = IO::Socket::INET->new(
Listen => 2,
Listen => 2,
LocalAddr => "localhost",
LocalAddr => "localhost",
LocalPort => $ENV{SS
L_
VNC_LISTEN},
LocalPort => $ENV{SSVNC_LISTEN},
Proto => "tcp");
Proto => "tcp");
if (! $listen_sock) {
if (! $listen_sock) {
die "perl proxy: $!\n";
die "perl proxy: $!\n";
...
@@ -550,7 +568,7 @@ sub xfer {
...
@@ -550,7 +568,7 @@ sub xfer {
ptmp
=
""
ptmp
=
""
if
[
"X
$proxy
"
!=
"X"
]
;
then
if
[
"X
$proxy
"
!=
"X"
]
;
then
ptmp
=
"/tmp/ss
l
_vncviewer
${
RANDOM
}
.
$$
.pl"
ptmp
=
"/tmp/ss_vncviewer
${
RANDOM
}
.
$$
.pl"
mytmp
"
$ptmp
"
mytmp
"
$ptmp
"
pcode
"
$ptmp
"
pcode
"
$ptmp
"
connect
=
"exec =
$ptmp
"
connect
=
"exec =
$ptmp
"
...
@@ -575,8 +593,8 @@ if [ "X$direct_connect" != "X" ]; then
...
@@ -575,8 +593,8 @@ if [ "X$direct_connect" != "X" ]; then
fi
fi
echo
""
echo
""
if
[
"X
$ptmp
"
!=
"X"
]
;
then
if
[
"X
$ptmp
"
!=
"X"
]
;
then
SS
L_
VNC_LISTEN
=
$use
SSVNC_LISTEN
=
$use
export
SS
L_
VNC_LISTEN
export
SSVNC_LISTEN
$ptmp
&
$ptmp
&
sleep
2
sleep
2
host
=
"localhost"
host
=
"localhost"
...
@@ -589,7 +607,7 @@ if [ "X$direct_connect" != "X" ]; then
...
@@ -589,7 +607,7 @@ if [ "X$direct_connect" != "X" ]; then
fi
fi
##debug = 7
##debug = 7
tmp
=
/tmp/ss
l
_vncviewer
${
RANDOM
}
.
$$
tmp
=
/tmp/ss_vncviewer
${
RANDOM
}
.
$$
mytmp
"
$tmp
"
mytmp
"
$tmp
"
cat
>
"
$tmp
"
<<
END
cat
>
"
$tmp
"
<<
END
...
...
classes/ssl/ssl_vncviewer
deleted
100755 → 0
View file @
0a6f75c6
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment