Is there an upgrade guide for the Perl script?

Simple, Free, Open Source UltraVNC Wrapper Supporting Windows and Mac OSX.

Is there an upgrade guide for the Perl script?

Postby rcooke » 2011-09-07 13:14

I'm using the Perl script repeater bundled in ChunkVNC 3.2.

Is there an upgrade guide for switching to the Rat's latest and greatest?

Actually, a best or recommended practices guide would be great. I got my SYSADMIN to add the current one to the server's startup script. He will want to know all the details about the new one's behaviour before he agrees to run it.

And he is also wanting some security on its use. So, maybe its better to run it through a CGI interface, so we can use Apache to control access?
Regards,
Richard Cooke
User avatar
rcooke
40
40
 
Posts: 96
Joined: 2011-02-19 13:06
Location: Toronto, Canada

Re: Is there an upgrade guide for the Perl script?

Postby supercoe » 2011-09-07 14:14

He will want to know all the details about the new one's behaviour before he agrees to run it.

It's a Perl script, if he wants to know how it works he simply needs to open in in a text editor... :surprise:


As far as security goes my recommendation is to restrict access to the viewer port.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Is there an upgrade guide for the Perl script?

Postby rcooke » 2011-09-07 14:56

supercoe wrote:It's a Perl script, if he wants to know how it works he simply needs to open in in a text editor... :surprise:


:twisted: :wink:

Hahaha Getting him to READ anything is like pulling teeth. He will try and make me do it. And I'm a Python programmer, PERL just gives me a headache.....

:tomato:
Regards,
Richard Cooke
User avatar
rcooke
40
40
 
Posts: 96
Joined: 2011-02-19 13:06
Location: Toronto, Canada

Re: Is there an upgrade guide for the Perl script?

Postby supercoe » 2011-09-07 15:27

I don't really understand what he wants to know about the new repeater? It does the exact same thing as the old repeater...

This is all you need to read in the Perl script:
my $usage = '
ultravnc_repeater.pl:
perl script implementing the ultravnc repeater
proxy protocol.

protocol: Listen on one port for vnc clients (default 5900.)
Listen on one port for vnc servers (default 5500.)
Read 250 bytes from connecting vnc client or server.
Accept ID:<string> from clients and servers, connect them
together once both are present.

The string "RFB 000.000\n" is sent to the client (the client
must understand this means send ID:... or host:port.)
Also accept <host>:<port> from clients and make the
connection to the vnc server immediately.

Note there is no authentication or security WRT ID names or
identities; it is up to the client and server to completely
manage that aspect and whether to encrypt the session, etc.

usage: ultravnc_repeater.pl [-r] [client_port [server_port]]

Use -r to refuse new server/client connections when there is an existing
server/client ID. The default is to close the previous one.

To write to a log file set the env. var ULTRAVNC_REPEATER_LOGFILE.

To run in a loop restarting the server if it exits set the env. var.
ULTRAVNC_REPEATER_LOOP=1 or ULTRAVNC_REPEATER_LOOP=BG, the latter
forks into the background. Set ULTRAVNC_REPEATER_PIDFILE to a file
to store the master pid in.

Set ULTRAVNC_REPEATER_NO_RFB=1 to disable sending "RFB 000.000" to
the client. Then this program acts as general TCP rendezvous tool.

Examples:

ultravnc_repeater.pl
ultravnc_repeater.pl -r
ultravnc_repeater.pl 5901
ultravnc_repeater.pl 5901 5501

env ULTRAVNC_REPEATER_LOOP=BG ULTRAVNC_REPEATER_LOGFILE=/tmp/u.log ultravnc_repeater.pl ...

';


PERL just gives me a headache.....

I hear you there.
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Is there an upgrade guide for the Perl script?

Postby rcooke » 2011-09-07 15:36

You and I see a short blurb, and we read it in a few seconds with near 100% retention.

My SysAdmin sees "War and Peace"......

<sigh> I guess I will have to explain it to him - its the fastest way.

First question is if we can just drop it in without changing our command line. If the new features have sane defaults, then we can start there.
Regards,
Richard Cooke
User avatar
rcooke
40
40
 
Posts: 96
Joined: 2011-02-19 13:06
Location: Toronto, Canada

Re: Is there an upgrade guide for the Perl script?

Postby supercoe » 2011-09-07 15:47

Hmm, I don't quite know if it gets any more simple than that for explaining what the Perl repeater does...

Wait here we go:
1) Start Repeater.
2) Connect Server and Viewer to Repeater.
3) ????
4) Profit?


Sounds like you need a new sysadmin. :P
http://www.chunkvnc.com - ChunkVNC - Free PC Remote control with the Open Source UltraVNC wrapper InstantSupport!
User avatar
supercoe
Super-Mod
Super-Mod
 
Posts: 1735
Joined: 2009-07-20 21:27
Location: Walker, MN

Re: Is there an upgrade guide for the Perl script?

Postby rcooke » 2011-09-07 15:53

supercoe wrote:Hmm, I don't quite know if it gets any more simple than that for explaining what the Perl repeater does...

Wait here we go:
1) Start Repeater.
2) Connect Server and Viewer to Repeater.
3) ????
4) Profit?


Hey, I'm talking about running the perl repeater. Coonecting to it is the simple part. And the notes you posted are for the OLDER repeater. I'm asking about switching to the new one, notes below. It seems to have an awful lot more command line options.

ultravnc_repeater.pl: (version 2.2)
perl script implementing the ultravnc repeater
proxy protocol.

protocol: Listen on one port for vnc clients (default 5900.)
Listen on one port for vnc servers (default 5500.)
Read 250 bytes from connecting vnc client or server.
Accept ID:<string> from clients and servers, connect them
together once both are present.

The string "RFB 000.000\n" is sent to the client (the client
must understand this means send ID:... or host:port.)

Also accept <host>:<port> from clients and make the
connection to the vnc server immediately.

Note there is no authentication or security WRT ID names or
identities; it is up to the client and server to completely
manage that aspect and whether to encrypt the subsequent VNC
session, etc.

Usage: ultravnc_repeater.pl [-h] [-r] [-C 0|1] [-R 0|1] [-L 1|BG] [-b repeater_buffer_size] [-c client_port] [-s server_port] [-l ULTRAVNC_REPEATER_LOGFILE] [-p ULTRAVNC_REPEATER_PIDFILE]

Set "-h" to view this help documentation.

Use -r or set the env. var. ULTRAVNC_REPEATER_REFUSE to refuse new server/client connections when there is an existing server/client ID.
The default is to close the previous one.

Use -C or set the env. var. ULTRAVNC_REPEATER_CLEAN to specify whether to have the script periodically check for and close initial connections that have gone away before the partner connects (currently only works on Linux.)

Use -R or set the env. var. ULTRAVNC_REPEATER_NO_RFB to disable sending "RFB 000.000" to the client.
Then this program acts as general TCP rendezvous tool.
The default is to send.

Use -L or set the env. var. ULTRAVNC_REPEATER_LOOP to run an outer loop restarting the server if it exits.
The -L BG mode forks into the background, (i.e. running as a daemon).
This is undefined by default, (i.e. no looping).

Use "-b" or set the env. var. ULTRAVNC_REPEATER_BUFSIZE to modify the ultravnc proxy handshake buffer size for your own special application.
Default Value = 250 (bytes).

Use "-c" or set the env. var. ULTRAVNC_REPEATER_CLIENT_PORT to set the Client Port.
The default is 5901.

Use "-s" or set the env. var. ULTRAVNC_REPEATER_SERVER_PORT to set the Server Port.
The default is 5501.

Use -l to set the logfile (or set the ULTRAVNC_REPEATER_LOGFILE env. var.)
e.g. "-l repeater.log"

Use -p to set a file to store the master pid in for your own tracking (same as ULTRAVNC_REPEATER_PIDFILE).
For example, a cronjob may supply a -p pidfile and check if the process id stored in the file is still running before deciding to run this script.

Examples:
---------
env ULTRAVNC_REPEATER_LOOP=BG ULTRAVNC_REPEATER_LOGFILE=u.log ultravnc_repeater.pl ...
ultravnc_repeater.pl -L BG -l u.log ...

ultravnc_repeater.pl
ultravnc_repeater.pl -r
ultravnc_repeater.pl -C 1
ultravnc_repeater.pl -R 1
ultravnc_repeater.pl -L 1
ultravnc_repeater.pl -L BG
ultravnc_repeater.pl -b 250
ultravnc_repeater.pl -c 5901
ultravnc_repeater.pl -s 5501
ultravnc_repeater.pl -c 5901 -s 5501
ultravnc_repeater.pl -l repeater.log
ultravnc_repeater.pl -p pid.log
ultravnc_repeater.pl -l repeater.log -p pid.log
ultravnc_repeater.pl -l repeater.log -p pid.log -r -c 5901 -s 5500 -L BG -R 1
ultravnc_repeater.pl -r -C -R 1 -L BG -b 250 -c 5901 -s 5501 -l repeater.log -p repeater.pid

Note: The corresponding environment variables will be set from the command-line arguments and also from the default values.
';
Regards,
Richard Cooke
User avatar
rcooke
40
40
 
Posts: 96
Joined: 2011-02-19 13:06
Location: Toronto, Canada

Re: Is there an upgrade guide for the Perl script?

Postby rcooke » 2011-09-12 14:25

ok, so I shall attempt to answer my own question.

If your running the old script on a server as a daemon then you likely want to keep your existing command line arguments for port assignments (if any) and add these options:

-L BG (enable an outer loop to restart the repeater if it exits, and switch to daemon mode)
-C (kill orphaned connections)
-p pid.log (record the process id for easy external monitoring of its health)

You could use "-l repeater.log" to get a logfile, which is essential for debugging. However, this file will grow forever. Instead we pipe all messages to the system log.
Regards,
Richard Cooke
User avatar
rcooke
40
40
 
Posts: 96
Joined: 2011-02-19 13:06
Location: Toronto, Canada

Re: Is there an upgrade guide for the Perl script?

Postby B » 2011-09-12 14:31

Good work, rcooke -- thanks. I hope Rat is able to confirm and/or expand on this interpretation.
B
Super-Mod
Super-Mod
 
Posts: 2347
Joined: 2009-09-09 14:05

Re: Is there an upgrade guide for the Perl script?

Postby rcooke » 2011-09-12 14:34

yeah, I posted this BEFORE I tested on my server.


Sooooo I may be making some changes later.....
Regards,
Richard Cooke
User avatar
rcooke
40
40
 
Posts: 96
Joined: 2011-02-19 13:06
Location: Toronto, Canada


Return to ChunkVNC

Who is online

Users browsing this forum: No registered users and 2 guests

cron