Date: Fri, 21 Feb 92 10:52:53 GMT+0100 From: timbl (Tim Berners-Lee) Message-Id: <9202210952.AA28042@ nxoc01.cern.ch > To: brennan@hal.com (Dave Brennan) Subject: Making an http gateway Cc: www-talk@nxoc01.cern.ch Dave, > In our network environment there is only one machine that has direct access > to the Internet for security reasons. Is there a way to run the client on > some other system in our net and have it use the "gateway" machine? I am > very interested in learning more about the WWW and similar projects. It's > kind of annoying that the setup here makes this difficult. > > Thanks, > > Dave Brennan That's a very good question, as lots of companies have this restriction. Fortunately, the browser is set up so that you can pass requests (according to protocol in the document id) to a gateway. You can on the client node setenv WWW_http_GATEWAY and WWW_wais_GATEWAY etc to point gateway addresses. At that address you need to set up a server to access the remote whateveritis and send the results back as hypertext. HTTP gateway: I've just tried this and it seems to work fine. You use the www client as a server. On your gateway machine, 1. Put a new service (htgate, 8002 say) into /etc/services or whatever you use instead. 2. Set up inetd.conf to run /usr/local/bin/htgate when a tcp connection to htgate comes in. You have to kill -HUP the inetd process to get it to take the change into account. 3. Use this htgate script which reads the command line and then calls www with its second parameter and sends the source to the caller: #! /bin/sh read get docid /usr/local/bin/www -source -n -na -p "$docid" That will handle anything where the source is HTML. It won't handle internet news, gopher, etc. (For that we need an option on the browser -html which generates HTML from news, etc, which we haven't done yet -- but you're not the first to ask) I suggest you run the wais gateway separately, but you could change the shell script to check the protocol on the doc-id and run www or WAISGate as appropriate. That means you set separately on the client setenv WWW_http_GATEWAY http://gate.hal.com:8002/ setenv WWW_wais_GATEWAY http://gate.hal.com:8001/ For the wais gateway, you get the sources from info.cern.ch /pub/www/stcWWWDaemon_v.vv.tar.Z and compile it. The documentation is http://info.cern.ch/hypertext/WWW/Daemon/User/Guide.html and linked documents. I hope this solves the problem and opens up the web for the organsiation. If you need the option for news or gopher, we'll have to put the -html option in. Let me (and the list) know how you get on... Tim