Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

VNC tunnel over Rugby

 [1/4] from: maarten:koopmans:surfnet:nl at: 24-Apr-2002 16:02


Hey all, Just finishing every adminstrator's nightmare: a Rugby (aka http based) TCP tunnel. So you can export anything - From a network that allows you to browse (for example the VNC server on your corporate desktop) - To a machine that can act a a HTTP server (for example the VNC client at home) The VNC sample works, now a bit polishing for performance... Anybody interested? --Maarten

 [2/4] from: greggirwin:mindspring at: 24-Apr-2002 9:46


hi Maarten, << Just finishing every adminstrator's nightmare: a Rugby (aka http based) TCP tunnel. So you can export anything >> Oooohhhhh. So I wouldn't have to fire up terminal services that sometimes leaves a console session hanging around and confuses things to no end because the startup loads a Rugby script and if TS gets funky our Rugby script is listening in the background where we can't see it (except via TS manager) and...yeah, I might be interested. :) --Gregg

 [3/4] from: robert::muench::robertmuench::de at: 24-Apr-2002 21:35


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
<<quoted lines omitted: 4>>
> Just finishing every adminstrator's nightmare: a Rugby (aka http based) TCP > tunnel. So you can export anything...
:-)) That's why I never understood why people often think with a firewall system all problems are gone. Only a few people understand that security must be implemented as a base like it is in IOS :-)). Robert

 [4/4] from: maarten:koopmans:surfnet:nl at: 24-Apr-2002 21:22


OK, here it goes, albeit a rough version.... Here' what to do: - Put the latest rugby.r and vnc-tunnel.r in one directory on client and server. - Start a vnc server on your desktop inside your corporate network. - Start the vnc-tunnel.r in your rebol console on the viewing side. Type vnc-client <enter> - Start the vnc-tunnel script on the server side. Type vnc-server and enter the ip-address with port 8002 and the http protocol when asked. Aka http:/your-ip:8002 - Connect the vnc-viewer to the local port 5902. And no it is not fast on the WAN althoug with tightvnc (www.tightvnc.com) it may be better. With a bit of luck I'll turn this in to a generic TCP-over-HTTP tunnel. The point this proves it the limited usefullness of firewalls. ;-) --Maarten -- Attached file included as plaintext by Listar -- -- File: vnc-tunnel.r REBOL [] do %rugby.r configure-rugby [ use compression set max-threads 1 ] vnc-tunnel: context [ server-port: none inpoint: none outpoint: none inbuffer: copy {} outbuffer: copy {} rugby-url: none accept-inpoint: func [ {Sets the inpoint (i.e. the server port on the application client} i [integer!] {The port number to listen on} ] [ vnc-tunnel/server-port: open/no-wait/binary/direct join tcp://: i ] inpoint?: func [] [ if not none? wait [ vnc-tunnel/server-port 0.002] [ vnc-tunnel/inpoint: first server-port close vnc-tunnel/server-port if not empty? vnc-tunnel/inbuffer [ insert vnc-tunnel/inpoint vnc-tunnel/inbuffer vnc-tunnel/inbuffer: copy {} ] ] ] initialize-outpoint: func [ {Sets the outpoint (the application server port that the client connects to} u [url!] {The outpoint url} ] [ vnc-tunnel/outpoint: open/no-wait/binary/direct u ] set-rugby-url: func [ u [url!] {The rugby url to connect to} ] [ vnc-tunnel/rugby-url: u ] exchange: func [ s [binary!] {The sent data} ] [ if none? vnc-tunnel/inpoint [ inpoint? ] if not empty? s [ either none? vnc-tunnel/inpoint [ append vnc-tunnel/inbuffer s] [ insert vnc-tunnel/inpoint s ] ] ;Do we have a client connection? either none? vnc-tunnel/inpoint [ return {} ] [ return copy vnc-tunnel/inpoint ] ] send-vnc-data: func [ {Sends the data from the outpoint to the inpoint} /local _rez ] [ if not none? vnc-tunnel/outpoint [ _rez: rexec/with compose [ exchange (copy/part vnc-tunnel/outpoint 512000) ] vnc-tunnel/rugby-url if not empty? _rez [ insert vnc-tunnel/outpoint _rez ] ] ] ] set/any 'exchange get/any in vnc-tunnel 'exchange vnc-server: does [ vnc-tunnel/initialize-outpoint tcp://localhost:5901 vnc-tunnel/set-rugby-url to-url ask {What's your Rugby url: } forever [vnc-tunnel/send-vnc-data ] ] vnc-client: does [ vnc-tunnel/accept-inpoint 5902 serve [exchange] ]

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted