ssvnc: sshvnc ssh-only, tsvnc Terminal Services modes.

Improvements to ss_vncviewer.  Automatically find X dpy and
          X login.  Reorganize menus a bit.  ~/.ssvncrc file.
pull/1/head
runge 17 years ago
parent 115e935f72
commit 660d66c1d9

@ -4,6 +4,9 @@
FD_XDM mode to find_display. -listdpy. Add enlightenment. FD_XDM mode to find_display. -listdpy. Add enlightenment.
Xvnc.redirect FINDDISPLAY-vnc_redirect. -xvnc, -xvnc_redirect, Xvnc.redirect FINDDISPLAY-vnc_redirect. -xvnc, -xvnc_redirect,
-svc_xvnc. AUTO_PORT. -svc_xvnc. AUTO_PORT.
* ssvnc: sshvnc ssh-only, tsvnc Terminal Services modes.
Improvements to ss_vncviewer. Automatically find X dpy and
X login. Reorganize menus a bit. ~/.ssvncrc file.
2007-09-04 Karl Runge <runge@karlrunge.com> 2007-09-04 Karl Runge <runge@karlrunge.com>
* x11vnc: Add -autoport and -finddpy utils. -xdummy creation. * x11vnc: Add -autoport and -finddpy utils. -xdummy creation.

@ -88,6 +88,14 @@ The enhanced TightVNC viewer features are:
ssh's builtin SOCKS proxy, -D) for servers like x11vnc that ssh's builtin SOCKS proxy, -D) for servers like x11vnc that
print out PORT= at startup. print out PORT= at startup.
- Unix Username and Password entry for use with "x11vnc -unixpw"
type login dialogs.
- Simplified mode launched by command "sshvnc" that is SSH Only.
- Simplified mode launched by command "tsvnc" that provides a VNC
"Terminal Services" mode (uses x11vnc on the remote side).
(the following features only apply to the bundled Unix tightvnc viewer) (the following features only apply to the bundled Unix tightvnc viewer)
@ -104,6 +112,10 @@ The enhanced TightVNC viewer features are:
terminal UI). Both UltraVNC and x11vnc servers support these terminal UI). Both UltraVNC and x11vnc servers support these
extensions 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 - Extremely low color modes: 64 and 8 colors in 8bpp
(-use64/-bgr222, -use8/-bgr111) (-use64/-bgr222, -use8/-bgr111)
@ -163,7 +175,7 @@ Unix and Mac OS X:
Unpack the archive: Unpack the archive:
% gzip -dc ssvnc-1.0.18.tar.gz | tar xvf - % gzip -dc ssvnc-1.0.19.tar.gz | tar xvf -
Run the GUI: Run the GUI:
@ -171,13 +183,10 @@ Unix and Mac OS X:
% ./ssvnc/MacOSX/ssvnc (for Mac OS X) % ./ssvnc/MacOSX/ssvnc (for Mac OS X)
On MacOSX you could also click on the SSVNC app in the Finder. The smaller file "ssvnc_no_windows-1.0.19.tar.gz"
The smaller file "ssvnc_no_windows-1.0.18.tar.gz"
could have been used as well. could have been used as well.
On MacOSX there is also a SSVNC.app directory icon you can click on On MacOSX you could also click on the SSVNC app icon in the Finder.
in Finder to start the application.
On MacOSX if you don't like the Chicken of the VNC (e.g. no local On MacOSX if you don't like the Chicken of the VNC (e.g. no local
cursors, no screen size rescaling, and no password prompting), and you cursors, no screen size rescaling, and no password prompting), and you
@ -186,11 +195,42 @@ Unix and Mac OS X:
enhanced TightVNC viewer will be used instead of COTVNC. enhanced TightVNC viewer will be used instead of COTVNC.
If you want a SSH-only tool (without the distractions of SSL) run
the command:
sshvnc
instead of "ssvnc". Or click "SSH-Only Mode" under Options.
Control-h will toggle between the two modes.
If you want a simple VNC Terminal Services only mode (requires x11vnc
on the remote server) run the command:
tsvnc
instead of "ssvnc". Or click "Terminal Services" under Options.
Control-t will toggle between the two modes.
"tsvnc profile-name" and "tsvnc user@hostname" work too.
Unix/MacOSX Install:
There is no standard install, but you can make symlinks like so:
cd /a/directory/in/PATH
ln -s /path/to/ssvnc/bin/{s,t}* .
Or put /path/to/ssvnc/bin, /path/to/ssvnc/Unix, or /path/to/ssvnc/MacOSX
in your PATH.
Windows: Windows:
Unzip, using WinZip or a similar utility, the zip file: Unzip, using WinZip or a similar utility, the zip file:
ssvnc-1.0.18.zip ssvnc-1.0.19.zip
Run the GUI, e.g.: Run the GUI, e.g.:
@ -202,7 +242,7 @@ Windows:
select Open, and then OK to launch it. select Open, and then OK to launch it.
The smaller file "ssvnc_windows_only-1.0.18.zip" The smaller file "ssvnc_windows_only-1.0.19.zip"
could have been used as well. could have been used as well.
You can make a Windows shortcut to this program if you want to. You can make a Windows shortcut to this program if you want to.
@ -210,6 +250,24 @@ Windows:
See the Windows/README.txt for more info. See the Windows/README.txt for more info.
If you want a SSH-only tool (without the distractions of SSL) run
the command:
sshvnc.bat
Or click "SSH-Only Mode" under Options.
If you want a simple VNC Terminal Services only mode (requires x11vnc
on the remote server) run the command:
tsvnc.bat
Or click "Terminal Services" under Options. Control-t will toggle
between the two modes. "tsvnc profile-name" and "tsvnc user@hostname"
work too.
Important Note for Windows Vista: One user reports that on Windows Vista Important Note for Windows Vista: One user reports that on Windows Vista
if you move or extract the "ssvnc" folder down to the "Program Files" if you move or extract the "ssvnc" folder down to the "Program Files"
@ -228,6 +286,21 @@ cd \ssvnc\Windows
ssvnc.exe ssvnc.exe
SSH-ONLY Mode:
--------------
If you don't care for SSL and the distractions it provides in the GUI,
run "sshvnc" (unix/macosx) or "sshvnc.bat" (windows) to run an SSH only
version of the GUI.
Terminal Services Mode
----------------------
There is an even simpler mode that uses x11vnc on the remote side for the
session finding and management. Run "tsvnc" (unix/macosx) or "tsvnc.bat"
(windows) to run the Terminal Services version of the GUI.
Bundle Info: Bundle Info:
------------ ------------
@ -338,6 +411,10 @@ you can run this instead:
./bin/ssvnc ./bin/ssvnc
this is the same GUI that is run on Windows (the ssvnc.exe). this is the same GUI that is run on Windows (the ssvnc.exe).
There are also:
./bin/sshvnc (SSH-Only)
./bin/tsvnc (Terminal Services Mode)
For convenience, you can make symlinks from a directory in your PATH to For convenience, you can make symlinks from a directory in your PATH to
any of the 3 programs above you wish to run. That is all you usually any of the 3 programs above you wish to run. That is all you usually
@ -348,13 +425,17 @@ assuming $HOME/bin is in your $PATH:
ln -s /path/to/ssvnc/bin/{s,t}* . ln -s /path/to/ssvnc/bin/{s,t}* .
(note the "." at the end). The above commands is basically the way to (note the "." at the end). The above commands is basically the way to
"install" this on Unix. "install" this on Unix or MacOS X.
Also symlinks to the GUI launcher script are provided in: Also links to the GUI launcher script are provided in:
MacOSX/ssvnc MacOSX/ssvnc
Unix/ssvnc Unix/ssvnc
and sshvnc and tsvnc. You could also put the Unix or MacOSX directory
in your PATH.
On Windows unpack your archive and run: On Windows unpack your archive and run:
Windows/ssvnc.exe Windows/ssvnc.exe

@ -10,6 +10,9 @@ Just click on the program "ssvnc.exe", and then enter the remote
VNC Server and click "Connect". Click on "Help" for more information VNC Server and click "Connect". Click on "Help" for more information
information. You can also set some simple options under "Options ..." information. You can also set some simple options under "Options ..."
If you want that application to run in "SSH-ONLY" mode, click on
the "sshvnc.bat" wrapper instead. Or enter SSH_ONLY.
Note that on Windows when the TightVNC viewer disconnects you may need to Note that on Windows when the TightVNC viewer disconnects you may need to
terminate the STUNNEL program manually. To do this: Click on the STUNNEL terminate the STUNNEL program manually. To do this: Click on the STUNNEL
icon (dark green) on the System Tray and then click "Exit". Before that, icon (dark green) on the System Tray and then click "Exit". Before that,

@ -128,7 +128,7 @@ if [ "X$STUNNEL" = "X" ]; then
fi fi
help() { help() {
tail +2 "$0" | sed -e '/^$/ q' tail -n +2 "$0" | sed -e '/^$/ q'
} }
gotalpha="" gotalpha=""
@ -160,7 +160,7 @@ if [ "X$1" = "X-viewerflavor" ]; then
echo "ultravnc" echo "ultravnc"
exit 0 exit 0
fi fi
str=`$VNCVIEWERCMD -h 2>&1 | head -5` str=`$VNCVIEWERCMD -h 2>&1 | head -n 5`
if echo "$str" | grep -i 'TightVNC.viewer' > /dev/null; then if echo "$str" | grep -i 'TightVNC.viewer' > /dev/null; then
echo "tightvnc" echo "tightvnc"
elif echo "$str" | grep -i 'RealVNC.Ltd' > /dev/null; then elif echo "$str" | grep -i 'RealVNC.Ltd' > /dev/null; then
@ -291,6 +291,18 @@ if [ "X$reverse" != "X" -a "X$direct_connect" = "X" ]; then
export VNCVIEWER_LISTEN_LOCALHOST export VNCVIEWER_LISTEN_LOCALHOST
fi fi
rsh=""
if echo "$orig" | grep '^rsh://' > /dev/null; then
use_ssh=1
rsh=1
orig=`echo "$orig" | sed -e 's,rsh://,,'`
elif echo "$orig" | grep '^rsh:' > /dev/null; then
use_ssh=1
rsh=1
orig=`echo "$orig" | sed -e 's,rsh:,,'`
fi
# play around with host:display port: # play around with host:display port:
if echo "$orig" | grep ':' > /dev/null; then if echo "$orig" | grep ':' > /dev/null; then
: :
@ -402,6 +414,9 @@ final() {
kill -KILL "$stunnel_pid" 2>/dev/null kill -KILL "$stunnel_pid" 2>/dev/null
stunnel_pid="" stunnel_pid=""
fi fi
if [ "X$tail_pid" != "X" ]; then
kill -TERM $tail_pid
fi
} }
if [ "X$reverse" = "X" ]; then if [ "X$reverse" = "X" ]; then
@ -450,6 +465,32 @@ mytmp() {
rchk rchk
} }
rsh_setup() {
if echo "$ssh_host" | grep '@' > /dev/null; then
ul=`echo "$ssh_host" | awk -F@ '{print $1}'`
ul="-l $ul"
ssh_host=`echo "$ssh_host" | awk -F@ '{print $2}'`
else
ul=""
fi
ssh_cmd=`echo "$ssh_cmd" | sed -e 's/ -localhost/ /g'`
}
rsh_viewer() {
trap "final" 0 2 15
if [ "X$PORT" = "X" ]; then
exit 1
elif [ $PORT -ge 5900 ]; then
vdpy=`expr $PORT - 5900`
else
vdpy=":$PORT"
fi
stty sane
echo "$VNCVIEWERCMD" "$@" $ssh_host:$vdpy
echo ""
$VNCVIEWERCMD "$@" $ssh_host:$vdpy
}
if [ "X$use_ssh" = "X1" ]; then if [ "X$use_ssh" = "X1" ]; then
ssh_port="22" ssh_port="22"
ssh_host="$host" ssh_host="$host"
@ -462,8 +503,8 @@ if [ "X$use_ssh" = "X1" ]; then
# user1@gw1.com:port1,user2@ws2:port2 # user1@gw1.com:port1,user2@ws2:port2
ssh_host1=`echo "$proxy1" | awk -F: '{print $1}'` ssh_host1=`echo "$proxy1" | awk -F: '{print $1}'`
ssh_port1=`echo "$proxy1" | awk -F: '{print $2}'` ssh_port1=`echo "$proxy1" | awk -F: '{print $2}'`
if [ "X$ssh_port1" = "X" ]; then if [ "X$ssh_port1" != "X" ]; then
ssh_port1="22" ssh_port1="-p 22"
fi fi
ssh_host2=`echo "$proxy2" | awk -F: '{print $1}'` ssh_host2=`echo "$proxy2" | awk -F: '{print $1}'`
ssh_user2=`echo "$ssh_host2" | awk -F@ '{print $1}'` ssh_user2=`echo "$ssh_host2" | awk -F@ '{print $1}'`
@ -481,8 +522,8 @@ if [ "X$use_ssh" = "X1" ]; then
proxport=`findfree 3500` proxport=`findfree 3500`
echo echo
echo "Running 1st ssh proxy:" echo "Running 1st ssh proxy:"
echo "$ssh -f -x -p $ssh_port1 $targ -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 \"sleep 30\"" echo "$ssh -f -x $ssh_port1 $targ -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 \"sleep 30\""
$ssh -f -x -p $ssh_port1 $targ -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 "sleep 30" $ssh -f -x $ssh_port1 $targ -e none -L $proxport:$ssh_host2:$ssh_port2 $ssh_host1 "sleep 30"
ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes" ssh_args="$ssh_args -o NoHostAuthenticationForLocalhost=yes"
sleep 1 sleep 1
stty sane stty sane
@ -500,7 +541,7 @@ if [ "X$use_ssh" = "X1" ]; then
echo "" echo ""
echo "Running ssh:" echo "Running ssh:"
sz=`echo "$ssh_cmd" | wc -c` sz=`echo "$ssh_cmd" | wc -c`
if [ "$sz" -gt 200 ]; then if [ "$sz" -gt 300 ]; then
info="..." info="..."
else else
info="$ssh_cmd" info="$ssh_cmd"
@ -512,8 +553,13 @@ if [ "X$use_ssh" = "X1" ]; then
fi fi
getport="" getport=""
teeport=""
if echo "$ssh_cmd" | egrep "^(PORT=|P=)" > /dev/null; then if echo "$ssh_cmd" | egrep "^(PORT=|P=)" > /dev/null; then
getport=1 getport=1
if echo "$ssh_cmd" | egrep "^P=" > /dev/null; then
teeport=1
fi
PORT="" 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 SSVNC_NO_ENC_WARN=1
@ -531,27 +577,54 @@ if [ "X$use_ssh" = "X1" ]; then
pmark=`sh -c 'echo $$'` pmark=`sh -c 'echo $$'`
# the -t option actually speeds up typing response via VNC!! # the -t option actually speeds up typing response via VNC!!
if [ "X$ssh_port" = "X22" ]; then
ssh_port=""
else
ssh_port="-p $ssh_port"
fi
if [ "X$SS_VNCVIEWER_SSH_ONLY" != "X" ]; then if [ "X$SS_VNCVIEWER_SSH_ONLY" != "X" ]; then
echo "$ssh -x -p $ssh_port $targ $C $ssh_args $ssh_host \"$info\"" echo "$ssh -x $ssh_port $targ $C $ssh_args $ssh_host \"$info\""
echo "" echo ""
$ssh -x -p $ssh_port $targ $C $ssh_args $ssh_host "$ssh_cmd" $ssh -x $ssh_port $targ $C $ssh_args $ssh_host "$ssh_cmd"
exit $? exit $?
elif [ "X$SS_VNCVIEWER_NO_F" != "X" ]; then elif [ "X$SS_VNCVIEWER_NO_F" != "X" ]; then
echo "$ssh -x -p $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host \"$info\"" echo "$ssh -x $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host \"$info\""
echo "" echo ""
$ssh -x -p $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host "$ssh_cmd" $ssh -x $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host "$ssh_cmd"
rc=$? rc=$?
elif [ "X$getport" != "X" ]; then elif [ "X$getport" != "X" ]; then
echo "$ssh -x -f -p $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host \"$info\""
echo ""
tport=/tmp/tport${RANDOM}.$$ tport=/tmp/tport${RANDOM}.$$
mytmp $tport mytmp $tport
$ssh -x -f -p $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host "$ssh_cmd" > $tport
if [ "X$rsh" != "X1" ]; then
if echo "$ssh_cmd" | grep -w sudo > /dev/null; then
echo ""
echo "Initial ssh with 'sudo id' to prime sudo so hopefully the next one"
echo "will require no password..."
echo ""
targ="-t"
$ssh -x $ssh_port $targ $ssh_args $ssh_host "sudo id; tty"
echo ""
fi
echo "$ssh -x -f $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host \"$info\""
echo ""
$ssh -x -f $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host "$ssh_cmd" > $tport
if [ "X$teeport" = "X1" ]; then
tail -f $tport 1>&2 &
tail_pid=$!
fi
rc=$? rc=$?
else
rsh_setup
echo "rsh $ul $ssh_host \"$ssh_cmd\""
echo ""
rsh $ul $ssh_host "$ssh_cmd" > $tport &
sleep 1
rc=0
fi
if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then if [ "X$SSVNC_EXTRA_SLEEP" != "X" ]; then
sleep $SSVNC_EXTRA_SLEEP sleep $SSVNC_EXTRA_SLEEP
@ -561,11 +634,11 @@ if [ "X$use_ssh" = "X1" ]; then
i=0 i=0
while [ $i -lt 10 ]; do while [ $i -lt 10 ]; do
sleep 1 sleep 1
PORT=`grep "^PORT=" $tport | head -1 | sed -e 's/PORT=//' -e 's/\r//g'` PORT=`grep "^PORT=" $tport | head -n 1 | sed -e 's/PORT=//' -e 's/\r//g'`
if echo "$PORT" | grep '^[0-9][0-9]*$' > /dev/null; then if echo "$PORT" | grep '^[0-9][0-9]*$' > /dev/null; then
break break
fi fi
vnss=`sed -e 's/\r//g' $tport | egrep -i '^(New.* desktop is|A VNC server is already running).*:[0-9[0-9]*$' | head -1 | awk '{print $NF}'` vnss=`sed -e 's/\r//g' $tport | egrep -i '^(New.* desktop is|A VNC server is already running).*:[0-9[0-9]*$' | head -n 1 | awk '{print $NF}'`
if [ "X$vnss" != "X" ]; then if [ "X$vnss" != "X" ]; then
PORT=`echo "$vnss" | awk -F: '{print $2}'` PORT=`echo "$vnss" | awk -F: '{print $2}'`
if echo "$PORT" | grep '^[0-9][0-9]*$' > /dev/null; then if echo "$PORT" | grep '^[0-9][0-9]*$' > /dev/null; then
@ -581,18 +654,33 @@ if [ "X$use_ssh" = "X1" ]; then
done done
echo "PORT=$PORT" 1>&2 echo "PORT=$PORT" 1>&2
rm -f $tport
if [ "X$rsh" = "X1" ]; then
rsh_viewer "$@"
exit $?
fi
PPROXY_SOCKS=1 PPROXY_SOCKS=1
export PPROXY_SOCKS export PPROXY_SOCKS
host="localhost" host="localhost"
port="$PORT" port="$PORT"
proxy="localhost:$use" proxy="localhost:$use"
rm -f $tport
else else
echo "$ssh -x -f -p $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host \"$info\"" if [ "X$rsh" != "X1" ]; then
echo "$ssh -x -f $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host \"$info\""
echo "" echo ""
$ssh -x -f -p $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host "$ssh_cmd" $ssh -x -f $ssh_port $targ $C $ssh_redir $ssh_args $ssh_host "$ssh_cmd"
rc=$? rc=$?
else
rsh_setup
echo "rsh $ul $ssh_host \"$ssh_cmd\""
echo ""
rsh $ul $ssh_host "$ssh_cmd" &
sleep 1
PORT=$port
rsh_viewer "$@"
exit $?
fi
fi fi
if [ "$rc" != "0" ]; then if [ "$rc" != "0" ]; then
@ -691,10 +779,12 @@ my ($first, $second) = split(/,/, $ENV{PPROXY_PROXY});
my ($proxy_host, $proxy_port) = split(/:/, $first); my ($proxy_host, $proxy_port) = split(/:/, $first);
my $connect = $ENV{PPROXY_DEST}; my $connect = $ENV{PPROXY_DEST};
print STDERR "\nPPROXY v0.0: a tool for Web proxies and SOCKS connections.\n"; print STDERR "PPROXY v0.1: a tool for Web proxies and SOCKS connections.\n";
print STDERR "proxy_host: $proxy_host\n"; print STDERR "proxy_host: $proxy_host\n";
print STDERR "proxy_port: $proxy_port\n"; print STDERR "proxy_port: $proxy_port\n";
print STDERR "proxy_connect: $connect\n"; print STDERR "proxy_connect: $connect\n";
print STDERR "pproxy_listen: $ENV{PPROXY_LISTEN}\n";
print STDERR "\n";
my $listen_handle = ""; my $listen_handle = "";
if ($ENV{PPROXY_LISTEN} != "") { if ($ENV{PPROXY_LISTEN} != "") {
@ -705,12 +795,12 @@ if ($ENV{PPROXY_LISTEN} != "") {
Proto => "tcp" Proto => "tcp"
); );
if (! $listen_sock) { if (! $listen_sock) {
die "perl proxy: $!\n"; die "pproxy: $!\n";
} }
my $ip; my $ip;
($listen_handle, $ip) = $listen_sock->accept(); ($listen_handle, $ip) = $listen_sock->accept();
if (! $listen_handle) { if (! $listen_handle) {
die "perl proxy: $!\n"; die "pproxy: $!\n";
} }
} }
@ -722,7 +812,7 @@ my $sock = IO::Socket::INET->new(
if (! $sock) { if (! $sock) {
unlink($0); unlink($0);
die "perl proxy: $!\n"; die "pproxy: $!\n";
} }
my $con = ""; my $con = "";
@ -772,7 +862,7 @@ if ($ENV{PPROXY_SOCKS} ne "") {
$con0 = $con; $con0 = $con;
} }
print STDERR "proxy_request1:\n$con0"; print STDERR "proxy_request1: $con0";
print $sock $con; print $sock $con;
unlink($0); unlink($0);
@ -805,7 +895,7 @@ if ($rep !~ m,HTTP/.* 200,) {
if ($second ne "") { if ($second ne "") {
$con = "CONNECT $connect HTTP/1.1\r\n"; $con = "CONNECT $connect HTTP/1.1\r\n";
$con .= "Host: $connect\r\n\r\n"; $con .= "Host: $connect\r\n\r\n";
print STDERR "proxy_request2:\n$con"; print STDERR "proxy_request2: $con";
print $sock $con; print $sock $con;
@ -822,14 +912,14 @@ if ($second ne "") {
} }
if (fork) { if (fork) {
print STDERR "parent\[$$] STDIN -> socket\n\n"; print STDERR "pproxy parent\[$$] STDIN -> socket\n";
if ($listen_handle) { if ($listen_handle) {
xfer($listen_handle, $sock); xfer($listen_handle, $sock);
} else { } else {
xfer(STDIN, $sock); xfer(STDIN, $sock);
} }
} else { } else {
print STDERR "child \[$$] socket -> STDOUT\n\n"; print STDERR "pproxy child \[$$] socket -> STDOUT\n";
if ($listen_handle) { if ($listen_handle) {
xfer($sock, $listen_handle); xfer($sock, $listen_handle);
} else { } else {
@ -854,10 +944,10 @@ sub xfer {
my $len = sysread($in, $buf, 8192); my $len = sysread($in, $buf, 8192);
if (! defined($len)) { if (! defined($len)) {
next if $! =~ /^Interrupted/; next if $! =~ /^Interrupted/;
print STDERR "perl proxy\[$$]: $!\n"; print STDERR "pproxy\[$$]: $!\n";
last; last;
} elsif ($len == 0) { } elsif ($len == 0) {
print STDERR "perl proxy\[$$]: Input is EOF.\n"; print STDERR "pproxy\[$$]: Input is EOF.\n";
last; last;
} }
my $offset = 0; my $offset = 0;
@ -865,7 +955,7 @@ sub xfer {
while ($len) { while ($len) {
my $written = syswrite($out, $buf, $len, $offset); my $written = syswrite($out, $buf, $len, $offset);
if (! defined $written) { if (! defined $written) {
print STDERR "perl proxy\[$$]: Output is EOF. $!\n"; print STDERR "pproxy\[$$]: Output is EOF. $!\n";
$quit = 1; $quit = 1;
last; last;
} }

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save