Building Stone (v.2.1a)

The technique described here is used with minor modifications when building most *nix programs, so it's worth doing just for the experience. Additionally Stone can redirect TCP/UDP connections and even act as an http proxy by itself (amongst other things).

The following should work on real shell accounts (and on most free shells also, provided you have permission for some functions).

A basic knowledge of DOS will help with the Unix commands we need to use; I will assume that you have this when we get to the Unix stuff below, so watch carefully.

DOS commands you are used to first and their equivalent in Unix:

cd\ = cd ~
dir/w = ls
dir = ls -l
dir/ah (hidden) = ls -al
rename = mv
attrib = chmod
md = mkdir
rd = rmdir
del = rm
copy = cp
pkunzip = tar

 

REMEMBER: Unix is case sensitive, so if I use lower case here, you must also; if I use a space you must also. DOS will let you get away with a lot of things but Unix will not!

Login to your shell. Note the prompt may be different for you.

Make sure you are in your home directory:

[username@servername]$ cd ~

Now make a directory called 'stone':

[username@servername]$ mkdir stone

Change directory to stone:

[username@servername]$ cd stone

[username@servername stone]$

So now we are in the stone directory.

Get Stone from wayne's download page:

[username@servername stone]$ lynx https://www.angelfire.com/wy/1waynes/stone-2.1a.tar.gz
and follow the instructions to save it to disk.

To make sure you got it:

[username@servername stone]$ ls -al

you will see something like:

total 468
drwxr-xr-x 2 username public 512 Aug 25 11:32 .
drwxr-xr-x 3 username public 512 Aug 22 13:14 ..
-rw-r--r-- 1 username public 225280 Aug 25 11:32 stone-2.1a.tar.gz

So, there it is. Now we have to unarchive it (unzip):

[username@servername stone]$ tar zxvf stone-2.1a.tar.gz

On some systems (nether.net, for example), the 'z' option is not available so you may need to decompress first using:
[username@servername stone]$ gunzip stone-2.1a.tar.gz
and then:
[username@servername stone]$ tar xvf stone-2.1a.tar

You should eventually see something like this:

stone-2.1a/
stone-2.1a/README.en.txt
stone-2.1a/stone.1
stone-2.1a/README.txt
stone-2.1a/stone.1.ja
stone-2.1a/stone.c
stone-2.1a/Makefile
stone-2.1a/GPL.txt

For some 'tar' distribution packages, this creates a new subdirectory (as here), for others it may not; if your tar does this, you need to 'cd' into the new directory (where the Makefile is).

[username@servername stone]$ cd stone-2.1a

Next we have to build it. In the general case, look in the Makefile (just 'cat' it) to see what 'targets' are available. On a linux system, you want to see 'linux' as a target. You can always see what kind of OS it is by:
[username@servername stone]$ uname -a

(Note: On SunOS and Solaris systems, both of these targets may need to be tried - try them both and see which one works. On nether.net the 'solaris' target is what you want (even though uname -a says sunOS!).

We assume you're on a linux system:

[username@servername stone]$ make linux

That's it. There should be no errors and now there should be a stone executable file in this directory (it's just a file named stone with no extension). Check with ls -al:

[username@servername stone]$ ls -al

total 418
drwx------ 3 username 1024 Aug 25 11:53 ./
drwx------ 5 username 1024 Aug 22 13:31 ../
-rw------- 1 username 21562 Apr 26 1993 GPL.txt
-rw------- 1 username 3191 Jan 4 2000 Makefile
-rw------- 1 username 6414 Oct 16 1999 README.en.txt
-rw------- 1 username 7275 Oct 16 1999 README.txt
-rwx------ 1 username 60841 Aug 16 14:16 stone
-rw------- 1 username 225280 Aug 16 13:38 stone-2.1a.tar
-rw------- 1 username 5644 Aug 22 1999 stone.1.ja
-rw------- 1 username 85865 Oct 16 1999 stone.c

Now, as we said before, you can run stone as a redirector to a public proxy, or as a proxy by it self. To make it run as redirector and make it listening for your connection on 10000 (pick a different port if you get an error message after you run it, the port might be used by some other process). Note that you do *not* need to pick a proxy on an unblocked port, but 10000 (or whatever you choose) must be unblocked. You'd better pick a fast proxy too. For this example we will use sp-5.sto.telegate.se:8000 as a public proxy (but the standard proxies on 8080, 80, 3128 etc. are ok as well).

OK, lets run stone:

[username@servername stone]$ ./stone sp-5.sto.telegate.se:8000 10000

you will see something like:

Aug 27 08:51:26 start (2.1) [30409]
Aug 27 08:51:26 stone 3: sp-5.sto.telegate.se:junkbuster <- 10000

Note the [30409], this is the process ID (PID) number. Better note it down and we'll come back to it later. Now you can go back to your browser and configure the proxy as servername.com, port 10000 and surf away. 

To run stone as a proxy by itself (on port 10000) do the following:

[username@servername stone]$ ./stone proxy 10000

Simple, right? And again configure your browser proxy as above if you didn't before. Note that stone as a proxy is not bug free and supports only HTTP/1.0, so your browser should be set to use only HTTP/1.0 (for IE users, it's under the advanced settings).

When you're finished, stop Stone by typing ctrl-c.

OK, do you remember the PID number? Yes, this number is unique. Every time you run stone a PID number is generated by the host. You may need the PID to 'kill' stone when you finish, especially if you lost the connection while surfing. Some servers will 'kill' the process automatically when you disconnect from their server. Others may not! Of course leaving it running unnecessarily is an extra load (but not much) on the server, and owners might dislike to see it running without a user. It is better you close it when you finish.

So, supposing you lost the connection before you get a chance to close it, then when you connect back to the shell and want to 'kill' it you will need to know the PID, unless you are a Unix wizard (hint: ps may show it to you), then you know how to close it in other ways.
Otherwise kill stone this way:

[username@servername]$ kill 30409

There is a way to run stone in the background, if you want to continue playing with the shell. Just add <space>& at the end of the command line when you run it. So it will look like this:

[username@servername stone]$ ./stone sp-5.sto.telegate.se:8000 10000 &

If you do this, you need to kill it when you're finished:

[username@servername stone]$ kill <process id>

 

If you have any questions, please post your inquiry here: http://www.egroups.co m/group/proxy-elites/ or contact wayne.
Authors: Wayne (concept) and Hat (scripting director)
Sunday, August 27, 2000