Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info.

HX - Hotline for UNIX

From Higher Intellect Wiki
Jump to navigation Jump to search
Latest version of this document and files (hx) - http://www.kagi.com/tjriley/hotline.html



It's Hotline, but not as we know it! hx - hotline for Unix

 I wrote this guide a while ago when I had the time ( and the facilities )
 to set this server and run it for a while. If you a Mac user and are into
 unix then you'll probably find this fun to mess around with :-)

 Ê

 hx is a client/server system written by Ryan Nielsen <[email protected]>. I
 found the archive in 1998 but have found little more info on it - the
 docs that came with the archive and fairly minimal and the links that
 were in the docs don't seem to be valid now - so I have written this
 guide for anyone who's interested. The complete archive contains:

    * hx - the client
    * hxd - the server!
    * hxacct - hxd account editor
    * hxtrackd - tracker server
    * tclient - tracker client
    * tbot - hx bot

 Okay, so on its own it's probably of use to few people, but, the great
 thing about hx is that it's compatible with Hotline! That means you can
 download things from other hotline servers using your fast shell account
 connection, you can set up your own hotline tracker or server on your
 unix account.

                    -------------------------------------

 What do I need to set up hxd?

 A UNIX shell account

 If you don't currently have an account you can get one at a fairly cheap
 price. Shop around as prices can vary quite dramatically. You need an
 account that...

 ...lets you run at least one background process (preferable two so that
 you can run the additional tracker registration program)

 ...has a fast connection to the rest of the internet. This means at least
 a T1 connection, preferably T3 or even faster. The fast the connection;
 the faster your server or tracker will be. There's nothing worse than
 having to limit your simultaneous downloads to something silly or having
 users slagging off your perfectly well run server for being so slooow.

 ...is known for having reasonable admins. Some admins are suspicious of
 everything and will kill your server if it guzzles up too much bandwidth.
 This is another reason to find a provider with a nice and speedy
 connection.

 ...is preferably running one of the operating systems listed in the
 supported systems in the hx archive. This is by no means absolutely
 necessary and don't put it above the other factors listed as hx will
 compile on most reputable OSs.

 ...gives you full access to compilers. Common UNIX C compilers are gcc
 and cc. If your don't have access to these you will not be able to
 compile any of the programs! The program Make is also fairly essential
 but if there are compilers present, Make should also be there.

 ...gives you a fair amount of disk space. If you can try to find a
 provider who gives unlimited disk space - this will allow you to let
 guests on your server upload without worrying about filling your disk
 quota. Having said this, try to keep the number of files on your server
 to a minimum - filling up the entire hard disk of the box you are hosted
 on probably won't impress the admins and they may decide to stop you
 running your hotline server!

 Some experience in C may help if you run into problems compiling the
 system. This is not essential. Contact me if you run into problems and
 I'll see what I can do to help.

 Companies who provide good UNIX shell accounts:

    * Grid9 - based in Britain. Good connection - 10 Meg quota set. Vanity
      domain - yourname.grid9.net
    * -- more to come --

                    -------------------------------------

 How do I install hxd/hxtrackd?

 1. Upload the hx tar'd and zipped archive to your home directory via FTP.
 I use Fetch on the Mac and CuteFTP on the PC.

 2. Unzip and untar the archive by telneting into your account (Better
 Telnet on the Mac, Hyper Terminal on the PC?). Issues the commands:

      gunzip hx-0.5.29.tar.gz
      tar xvf hx-0.5.29.tar

 If it says something like: gunzip: Command not found ...then it is likely
 that your system will have a different program for unzipping files. Ask
 the support people what command to use to unzip a file. The tar command
 should be the same on all systems. Again, ask support if you run into
 problems.

 Now you should have a directory called hx.

      cd hx
      mv hxd_example server
      cd src/include/config
      pico hxd.h

 Issue the commands above. They just rename the example server root
 directory to 'server' as we'll use it as the base for our server. Then
 you start pico so that you can edit the hxd configuration header file.
 Start looking down the lines editing the definitions you want to edit.
 Most are self explanatory or aren't crucial to getting the server running
 until you get to this part:

      #ifndef CHAT_ONLY
      #define FILE_TYPE "????"
      #define FILE_CREATOR "????"
      #define HTXFD_BINARY_PATH "/home/you/hx/src/hxd/htxfd"
      #define HTXFD_LOG "/home/you/hx/server/logs/htxfdlog"
      #endif

      #define SHELL_PATH "/bin/bash"
      #define CHDIR_DIR "/" /* chdir() to this at startup */
      #define ACCOUNTS_DIR "/home/you/hx/server/accounts"
      #define FILES_DIR "/home/you/hx/server/files"
      #define SCRIPTS_DIR "/home/you/hx/server/scripts"
      #define AGREEMENT_FILE "/home/you/hx/server/agreement"
      #define NEWS_FILE "/home/you/hx/server/news"
      #define NEWS_FILE_TMP "/home/you/hx/server/news.tmp"
      #define BAN_IP_FILE "/home/you/hx/server/banlist"
      #define BAN_IP_TMP "/home/you/hx/server/banlist.tmp"
      #define HELP_FILE "/home/you/hx/server/help"
      #define HXD_LOG "/home/you/hx/server/logs/hxdlog"

 Ê

 If you uncomment the CHAT_ONLY definition line near the top of the file
 (remove the /* and */ from /* #undef CHAT_ONLY */ ) the server will try
 to go into chatonly mode and the first block of definitions above will be
 ignored. I suggest you do not make the server chat only as I have had
 trouble compiling in this form - if you don't want file transfers to take
 place just make sure that guest cannot upload or download via the user
 permission (discussed later). The second block of definitions are vital.
 SHELL_PATH should be correct - if you are not sure, go back into your
 shell and issue the command:

      /bin/bash

 If you don't get an error - just another $ prompt or something then that
 definition is fine. It is just the location on the system where a shell
 can be found. Other options may be /bin/ksh , /bin/sh , /usr/bin/sh or
 something similar. Make sure CHDIR_DIR is set to "/". This makes the rest
 of the variables a bit easier to cope with, they are merely full paths to
 the different directories or files within that "server" directory which
 we created from the example server directory earlier. If you are unsure
 of these paths just issues the commands:

      cd ~/
      pwd

 The results will be the path to your home directory (the one that the hx
 directory is in). In the example configuration lines above, replace the
 /home/you/ with the path to your home directory (which you just got).

 I recommend changing the FILE_TYPE and FILE_CREATOR to those ????'s
 because it will then count file's uploaded without file endings as plain
 documents rather than mp3's.

 Now quit pico and save your work (command X). Issue:

      cd ~/hx/src/hxd
      make

 This should compile hxd and you should be left with 2 programs - hxd and
 htxfd. Type:

      hxd
      or
      hxd

 ...to start the server - you can check to see if it is running by typing
 'ps aux' and looking for hxd and htxfd in that list of processes. Log
 into your server with your hotline client - available from hotlinesw.com
 - and test out file uploading etc (log in as user: admin and password:
 admin).

                    -------------------------------------

 Creating and editing accounts

 Go to directory hx/src/hxacct/ and type 'make' to compile the account
 editor. You should be left with the program hxacct. Here are some example
 commands for hxacct:

      hxacct admin pass - lets you set a new password for user admin
      hxacct admin print - prints out user, admins current
      permissions...
      ...which can be used as a reference for the command...
      hxacct admin +3 +4 -6 - changes user, admin's access privileges

 You can create new accounts by substituting 'admin' for the name of the
 desired account.

                    -------------------------------------

 How do I run the tracker server?

 The tracker that comes with the hx distribution is called hxtrackd and
 its source is in hx/src/hxtrackd/. Go there and type 'make' as before to
 compile the program. Now type hxtrackd to start the tracker. Look in the
 process list ('ps aux') to see if it is running. If it is try the tracker
 out with your hotline client. Of course you won't see much because there
 are no server subscribed to your tracker. Go to
 http://www.stack.nl/~macron/ to register your tracker on the only
 tracker-tracker.

                    -------------------------------------

 Treg

 Treg as far as I know is the only way that you can register an hxd server
 with trackers without having root on the machine. You will need a
 separate copy running for each tracker you subscribe to and treg must be
 running on the same domain (machine) as the server. Compile Treg:

      gcc -O2 -o treg treg.c

 edit the file called options which must be in the same directory as treg:

      t=trackeraddress.com
      p=serverport (default is 5500)
      d=Descriptions of server
      n=Server name

 Run Treg with the command:

      treg &

 The & sign means that it will run in the background.

                    -------------------------------------

 hx, bots...

 I have mainly concentrated on hxd which is the server side of the
 distribution. The client (hx/src/hx/) can be compiled and run in the same
 way. The file you need to edit to configure it is
 hx/src/include/config/hx.h. Just change the two paths for htxful and
 htxfdl to point to the hx source directory. The client may work fine
 without these set correctly.

 In the bots directory there is a simple hotline bot. Edit the tbot.c file
 to configure it then type 'make' to compile the tbot.

      tbot &

 ...will run the bot in the background.

                                      Ê

                                      Ê

                                      Ê

                 Files                    Description

               http://www.kagi.com/tjriley/hotline.html  				The full hx
                                          distribution.

                                         
                http://www.kagi.com/tjriley/hotline.html          Tracker registration
                                          program

      NOTE: I did not write this software and therefore can answer few
      questions and take no responsibility for what you do with it. For
         information on the creator see the documentation included.