HoTTProxy Logo by Rax from CDMAForums.com

 HoTTProxy Technical Article

 Running HoTTProxy on Win32 (EXE version)

Most Win32 users will choose to run the compiled version of HoTTProxy because it eliminates the need to install a Perl interpeter and all of the Perl modules that HoTTProxy requires. The compiled version was created using PerlApp by ActiveState.

 Requirements

HoTTProxy was written and extensively tested on Microsoft Windows XP Profesional. That said, it should run fine on any MSWin32 operating system which would include (at a minimum):

  • Windows NT
  • Windows 2000
  • Windows XP
  • Windows 2003

Whether you are running the "server" or "workstation" versions of these operating systems should not matter. If you are running Windows 95, Windows 98, Windows ME, or anything older, I have no idea if it will work or not. Heck, give it a try and let us know!

In addition to running a proper operating system, a few more things are needed:

  • An Internet connection - preferably broadband (not dialup)
  • Port 9201 (or other chosen port) forwarding to the computer you run HoTTProxy on (if you are using a broadband router or other hardware firewall)
  • Port 9201 (or other chosen port) allowed to pass through your software firewall if you are using one (if you have Windows XP - you've got one whether you know it or not)
  • An Internet browser on the machine which will run HoTTProxy (to use the new Administration Console)
  • (Optional) DynDNS name pointing to your computer to make accessing your proxy easy

 Steps

The high level steps to running the EXE version of HoTTProxy are:

  • Download the .zip of the EXE version
  • Make a directory on your PC that you will run HoTTProxy from
  • Unzip HoTTProxy into that directory
  • Run the HoTTProxy_Admin daemon
  • Edit the HoTTProxy configuration file
  • Create user files
  • Execute HoTTProxy
  • Set up HoTTProxy as a pseudo-service (optional)
  • Testing your HoTTProxy install
  • Other Stuff

 Downloading

Visit the downloads page and download the "HoTTProxy Win32 Compiled Executable".

Save it someplace on your computer where you'll be able to find it again. If you're real clever, go ahead and create a directory called C:\HoTTProxy and save the .zip there and you'll save yourself a step.

 Make a directory to Run HoTTProxy from

To keep things simple, I'm going to recommend that you run HoTTproxy from C:\HoTTProxy. These instructions assume that is what you are going to do, so if you decide to put it somewhere else, adjust the instructions accordingly.

I was going to make a self-extracting archive that would automagically create the C:\HoTTProxy directory and unzip the files there, but for now I've decided that if your computer experience is at a level where creating directories and unzipping files is a problem, you probably aren't ready to do this anyway (no offense intended there).

  1. Click Start, Run, and then type 'C:\' (without the quotes) and press [ENTER]. (This should bring up the root of your C: drive in Windows Explorer.)
  2. Click File, New, Folder, and then type 'HoTTProxy' (without the quotes). The capitalization isn't really critical since Windows generally ignores case for file and directory names, but of course the only correct capitalization is HoTTProxy.

 Unzipping HoTTProxy

The exact process for this varies depending upon your zip program. While the author prefers WinRAR from RAR Labs, WinZip seems more common. If you're using Windows XP, unzip capability is built into the OS -- otherwise you need to download and install one of the above if you don't already have an unzipping utility.

If you saved the HoTTProxy zip file into C:\HoTTProxy when you downloaded it, you should just be able to right click on the .zip file in Microsoft Explorer and choose "Extract Here" (WinRAR) or whatever choice your zip utility offers.

If you saved the HoTTProxy zip file somewhere else, copy it to C:\HoTTProxy and then do the above.

 Run the HoTTProxy_Admin daemon

As of version 0.24.0.0 of HoTTProxy, user maintenance and basic configuration may be accomplished using the Administration console instead of manually editing the text files. You may of course still manually edit the text files if you wish.

The Administration Console is web based and has its own built in daemon. Before you may use it you must first first start the daemon (HoTTProxy_Admin).

To run HoTTProxy_Admin you can either:

  • Open a command prompt (Start, Run, type 'cmd.exe', press [ENTER])
  • cd c:\HoTTProxy [ENTER]
  • HoTTProxy_Admin [ENTER]

- or -

  • Go to C:\HoTTProxy in Windows Explorer (Start, Run, type 'C:\HoTTProxy', press [ENTER])
  • Double click on HoTTProxy_Admin.exe (if your OS isn't set to show 'file extensions' then you may not see the '.exe' part, but it will be the file with the little world icon).

Unless you get an error, you should get a screen that tells you the daemon is running and what port URL to use to access it (e.g. http://localhost:8085). If you need to change this port for some reason you'll need to edit HoTTProxy_Admin.conf with a text editor and change the port. Assuming the port is OK, open your Internet browser and enter the URL. You should receive the Administration Console main menu. Things should be intuitive from there. At a minimum you'll need to create at least one user account.

Legacy instructions for manually configuring user accounts and for editing the full range of configuration options appears in the sections which follow.

 Edit the HoTTProxy Configuration File

Note: You only need to do this if you want to change options that are not presented in the Administration console. The instructions below should be considered to be "for experts".

Now we get into some good stuff. While you can run HoTTProxy using the provided configuration file "as is", there wouldn't be much adventure in that.

The documentation that tells what each item in the configuration file does is in the supplied default configuration file, and I don't see much use in reproducing it here since it is bound to grow over time. Instead I'm going to cover the items that you'll probably want to change, and warn you about some items that I don't think you should change unless you have a good reason to.

It is important to note that the format of this file is fairly critical. If you mess it up you may get unpredicatable results. Things to be aware of:

  • Lines that begin with a pound sign ('#') are comments and are ignored by HoTTproxy
  • Blank lines are ignored by HoTTproxy
  • All other lines consist of a configuration parameter name, followed by a space, followed by an equal sign ('=') followed by a space, followed by one or more values. You must put the spaces around the equal sign. Yes, I could have programmed HoTTProxy to be more tolerant of formatting deviations, but I didn't.

    Examples:

    Parameter with a single value:

         ProxyPort = 9201

    Parameter with a list of values:

         TrustedDomains = yourdomain.com;mydomain.com;otherdomain.com

    Note that with the parameter having a list of values, the values are separated by semicolons (';') and the semicolons don't have spaces before or after them. If you put a space before or after the semicolon, the space will actually become part of the value it appears with. For example, the above line translates into 3 parameters: "yourdomain.com", "mydomain.com", and "otherdomain.com". If you instead typed the line this way:

         TrustedDomains = yourdomain.com; mydomain.com; otherdomain.com

    your values would be: "yourdomain.com", " mydomain.com", and " otherdomain.com". (Note the leading space in the second and third value which would likely cause a problem.)

Some parameters that you might want to change (and why):

  • DefaultHomePage - Requests for ".local" domains are redirected to work around cell phone carriers that lock the phone to a homepage like http://homepage. The redirect will be to either the user's personally configured home page, or to this default home page if they don't have a personal one configured.

    Whatever you set this to should be a page somewhat friendly to wireless devices. A good choice would be a page somewhere that has links to other wireless-friendly pages that you use a lot.

  • RealmString - Not particularly important, but if a personal computer based browser tries to use your HoTTProxy gateway, this is the string that will show as the "name" of the gateway. You could set it to something spiffy or just leave it 'as is' if you want to be boring.

  • ViaString - Similar in character to RealmString, ViaString is the name string that will show up in the HTTP "Via" header when someone using your gateway accesses a website. Most websites don't care about the Via header or do anything with it, but setting it to something spiffy is anti-boring.

  • ProxyPort - The port is set to 9201 in the default configuration file and if you don't have a reason to change it, you might as well leave it alone. Reasons to change it might be if for instance your wireless device is locked to only use another port like 8080 (I've heard some carriers or phones do this).

  • CookiePassthru - (Not yet implemented) This is set to zero by default and should probably stay that way. Changing this to a nonzero value would let cookies stored on the user's browser "pass through" the proxy server to the website being visited. If your device is a cell phone, this would probably be irrelevant as most phones don't support cookies on their own anyway and therefore won't have any cookies to send. However if the device is a personal computer then its browser probably does have stored cookies and if they are allowed to pass through, they may conflict with the cookies that HoTTProxy has stored or cause strange results. Basically, if you don't really understand how HoTTProxy's proxy cookies work, and how cookies in general work, leave this at zero.

  • SetCookiePassthru - (Not yet implemented) Same thing as CookiePassthru except the other direction. Setting this to a nonzero would allow cookies sent to the browser by a website to pass through the proxy to the browser. If the device is a phone or other device that doesn't understand cookies, no harm will come, the cookie headers just get ignored. However you are wasting bandwidth receiving cookies that your phone is just going to ignore anyway. As with CookiePassthru, if you don't really understand how HoTTProxy's proxy cookies work, and how cookies in general work, leave this at zero.

  • SessionCookieLife - A "session cookie" is one that is sent without an expiration date/time. Intuitively you'd think this means they never expire, but actually that's not correct. Cookies without an expiration date/time are supposed to be discarded when the "session" ends. On personal computers, this is when the user closes all instances of their browser. In the case of HoTTProxy and proxy cookie support, we don't have any idea when or if the user closes their browser -- we just see requests come through. Still, cookies are sent as session cookies for a reason, so we don't want them to last forever. As a compromise, the SessionCookieLife parameter is used to create an expiration date/time for cookies that don't have one. The value of SessionCookieLife is the number of minutes (from the time the session cookie was received) until the cookie should expire. The default value is 1440 which is 24 hours. You cannot set this value to zero (well you can, but if you do it will default to 1440). The shortest time you can set is 1 minute and I have no idea what the longest time is. If you wanted to go crazy and make session cookies last for a year, 525600 would be the approximate value (ignoring leap years). When messing with this value, remember that the website that sent you the session cookie is not expecting it to exist forever, so making it exist forever might be counterproductive unless you have a specific reason/purpose in mind.

Read the comments in the HoTTProxy.conf file to learn more about other parameters. Some would be of interest primarily only to developers who are messing with the code and need diagnostic information for debugging. As suggested in the comments at the top of the file, it is a good idea to keep a copy of the original file in case you mess it up.

 !!!LEGACY!!! - Deprecated - Creating User Files

Note: You really should not need nor want to do the below - these instructions are left in the documentation for purposes of reference, but the Administration Console is much preferred to doing it "by hand".

As written, HoTTProxy has no facility for running "open" and requires all users to authenticate. While it would be trivially simple to change this, it would be a bad idea since it would allow anyone who discovered that open port on your machine to use your proxy to do nefarious things semi-anonymously.

In order for a user to be able to authenticate, you have to create a password file for them. There are no password files in the distribution, so if you don't create any, then nobody will be able to use your proxy (including you).

Presently the password file is pretty simple. Some day I may regret not going with something more complicated, but we'll cross that bridge when we come to it.

Where to put them: The password files (which we'll tell you how to make in just a second) have to be put in the same directory where the HoTTProxy program is. We're assuming that is C:\HoTTProxy.

What to name them: The password files should be named 'username.password' (without the quotes). Note that the word 'username' appears in italics. You replace 'username' with the intended username for the user. For example, if you want the username to be "bob", you'd name the file "bob.password" (without the quotes).

What to put in the file: The file should be a simple text file that you can create with Notepad or any other text editor. The password only has one required entry. The first line of the file must contain the password for that user. Note that this password is case sensitive. Optionally the file can contain a second line which would be the user-specific home page URL. Remember in the configuration file section we talked about the default home page value and said that you can set a different home page for each user if you prefer? This is where you do it. The home page URL should be "fully qualified" which is to say it should include the 'http://' and all that jazz. As of this writing any lines after the second line would be ignored by HoTTProxy.

So, a sample password file (fictitiously named bob.password) might look like this:

mypassword
http://wap.google.com

Important note if you are using Notepad: The most common question I get is "I created myname.password, but I'm still getting an error on the HoTTProxy console that says that file doesn't exist". Of course the reason HoTTProxy is saying that is because it doesn't. Microsoft does a couple "helpful" things that lead you into this trap and prevent you from knowing you've been trapped. The first is that in Notepad, when you save a file, by default it will try to add .txt on to the end of the filename. The second is that Windows, by default, will "hide extensions of known file types" thereby making you think that your file really is named myname.password when in fact it is really myname.password.txt. Computers are quite literal in following instructions and having a file named myname.password.txt is utterly meaningless if the software is looking for myname.password. Fortunately the solution is simple. In Notepad, when you go to save the file, change the "Save as type" from "Text Documents (*.txt)" to "All Files". Then your file will be named as you named it, not as Microsoft assumed you wanted it named.

 Executing HoTTProxy

Finally! You probably thought we'd never get to this part. The HoTTProxy EXE is a "console" program which means it isn't a pretty GUI with buttons and stuff like you're probably used to. When you run it you're just going to get a DOS-looking screen with text in it.

To run HoTTProxy you can either:

  • Open a command prompt (Start, Run, type 'cmd.exe', press [ENTER])
  • cd c:\HoTTProxy [ENTER]
  • HoTTProxy [ENTER]

- or -

  • Go to C:\HoTTProxy in Windows Explorer (Start, Run, type 'C:\HoTTProxy', press [ENTER])
  • Double click on HoTTProxy.exe (if your OS isn't set to show 'file extensions' then you may not see the '.exe' part, but it will be the file with the little world icon).

Unless you get an error, you should get a screen that tells you HoTTProxy is running. If you haven't changed the ConsoleVerbosity option in the config file, you should see a list of operational parameters that tells you a bit about the settings HoTTProxy is using. It might be a good idea to look that list over and make sure everything is what you expected it to be.

At this point you should be able to configure your phone to use your new proxy gateway. There is (or will be) an article in the articles section explaining how to do this for the Motorola V710 and E815. If you have another phone and you've figured out how to change the proxy settings in it, please take the time to type up a guide for your phone and email it to us. We'll add it to our repository and someone else with your same phone will quietly thank you some day.

 Configuring HoTTProxy as a Pseudo-Service

If you're an experienced Windows user, right now you might be looking at the HoTTProxy console screen and thinking to yourself, "this is cool, but what about when I log off or reboot this machine - how do I run this as a service?". There are two ways to accomplish this. One is to use the Windows Resource Kit utility called "srvany.exe". If you want to do that, that's cool, but I'm not even going to try to tell you how because even seasoned technology professionals get tripped up by it. Instead I'm going to tell you how to run it as what I call a "pseudo-service". Using this method, HoTTProxy will run in the background (where you can't see it), and will start automatically when you start Windows without you even having to log on. It will also continue to run even if you log off.

Steps:

In the steps that follow we are going to create a Scheduled Task. The precise steps may vary slightly depending upon your operating system, and even based upon some of your display settings. The important thing is to pay attention to what we're setting and adapt it to how it is done on your OS.

These particular procedures are for Windows XP Professional - others should be similar.

  1. Click Start, Settings, Control Panel, Scheduled Tasks, Add Scheduled Task
  2. Click Next to begin the Wizard
  3. Instead of choosing a program from the list, click Browse
  4. Browse to C:\HoTTProxy (or wherever you put it) and choose HoTTProxy.exe
  5. The next window asks you to type a name for the task. Enter anything you like, but 'HoTTProxy' seems logical. Below the box for the name are some choices for when to perform the task. Choose "When my computer starts".
  6. The next window prompts for the user name and password to run as. For the user name, enter "NT AUTHORITY\SYSTEM" (without the quotes). Leave the password boxes blank.
  7. The next window tells you you've successfully created the task and gives you a checkbox option to "Open advanced properties for this task when I click Finish". Check that box and click Finish.
  8. In the advanced properties, go to the Settings tab and uncheck the "Stop this task if it runs for xx hours" box.
  9. Click OK to close the window.

To activate the new scheduled task you can Reboot, or do the following:

  1. Click Start, Settings, Control Panel, and then double-click the Scheduled Tasks item. If you do this correctly, a separate window of your scheduled tasks, and details about them, will open.
  2. Find your HoTTProxy task you created.
  3. Right-click the task and choose "Run". If everything is correct, the "Status" of the task will change to "Running" but you won't see a HoTTProxy window open (because it is running in the background).

Note that the same procedure may be used to run the Administration Console daemon as a pseudo-service if you want it to be available all the time.

 Testing your HoTTProxy installation

If you've got HoTTProxy installed and running, but you're having trouble getting your phone to connect through it, it is a good idea to isolate whether the problem is on the phone side or the proxy. One way is to reconfigure the browser on a personal computer to use your HoTTProxy. If the personal computer based browser can get to the Internet through your HoTTProxy, then you know the issue is on the phone side of things.

The most common problems encountered have to do with firewalls (hardware and software). Firewalls are designed to protect your computer from unwanted traffic from the Internet. By default, most firewalls assume that all unsolicited traffic from the Internet is unwanted. You'll need to tell your firewall(s) (you may have more than one) to let port 9201 (or whatever port you configured HoTTProxy to use) to come through, and in the case of a hardware firewall, tell the firewall to forward traffic on that port to your computer. The process for doing this is too varied to be covered by this article. General tips however follow.

Hardware firewalls - are typically found in broadband routers and wireless broadband routers that you may have purchased and installed to let multiple computers use your broadband Internet connection. Without exception these devices block incoming traffic by default. Check your manual for details on "port forwarding", "virtual server", or "service" definitions and rules to find out how to allow port 9201 in, and get it to go to your computer. Additionally, some DSL modems themselves (ActionTec for example) have a built in firewall. They too can be configured to pass port 9201 to your PC - see the manual.

Software firewalls - may be something that came with your OS or something you added on to it. If you're running Microsoft Windows XP, it has a built in software firewall that is enabled by default. You can either disable the XP firewall completely (might be appropriate if you already have a good hardware firewall), or configure it to allow only port 9201 through (if say you're directly connected to the Internet). Microsoft TechNet has a good article here on configuring the XP firewall. You might also have a 3rd party software firewall that you installed yourself. Good examples would be ZoneAlarm, BlackIce, etc. You'll have to follow the manufacturer's instructions to open a port in these firewalls.

 Other Stuff

If you're running HoTTProxy on a machine that has a dynamic IP address (the ISP changes the address periodically), then installing a dynamic DNS client on the machine and setting up a DynDNS.org domain name for it would be a good idea. If you don't do this, then every time your ISP changes your IP address, you'll have to: a) realize that it changed, and b) change it in your phone, and c) tell your buddies that also use your proxy server to change their phones. How to set up DynDNS will be the topic of a separate Technical Article.

Of course you're also going to want to set up your phone to use your shiny new proxy server. See the home page for a link to instructions on configuring the proxy settings for various phones.

Last but not least, if you are having trouble getting HoTTProxy running, be sure to go to the home page and click on the "Support/Discussion Forums" link. There you will be able to get help with your problem if you present your question in a concise manner and demonstrate that you've made a reasonable effort to solve your problem yourself.