!!!Setup

Go to the server preferences, and select tunnels.

Create a new tunnel, using the HTTP(S) Tunnel type.  Enable Auto start, and Use Chunked Encoding.  The name is not important, but something simple will do.

The local client port must be 55555.  That is five fives.

The destination host must be 127.0.0.1, and the destination port can be anything as it will be ignored for this configuration.

Set the in Channels, and out Channels to be an appropriate multiplier for the speed gain you are looking for.  You want to use the smallest value possible that still gives you the performance you need.  I usually suggest something around 10 to 20.  The min should be 1, and the max should be between 10 and 20.  Enable the Auto checkbox on both as well.

[attachments|prefs_tunnel.png]

Ports

Next, go to the IP / Servers tab in the server preferences.  Add two new server port items.  The first on 55521 (FTP), and the other on 55580 (HTTP).  Both should have their IP set to 127.0.0.1, and have the User Connection Group set to the same value as your main server's HTTPS ports value.

These ports, their protocol, and IPs must be set as defined.  They will be used internally as part of the tunnel process.  They must be FTP and HTTP respectively.  They will be tunneled over the secure HTTPS tunnel.

Users

Open the user manager, and select your user you want to allow to use the accelerated tunnel.

At this point, you can login and use the WebInterface and start getting the accelerated speeds.

FTP

The FTP protocol can also be sent over the HTTPS encrypted tunnel and get the same speed gains as the WebInterface's automatic Java applet handling.  To do this, we use a java web start application that can start and stop the tunnel for a local FTP client to connect through.

We make a dummy user named "tunnel" that has no access to anything, other than the ability to login, and startup a secure tunnel.

Now you can use a URL like this in your web browser to download and start the tunnel for the FTP client.

https://www.domain.com/?u=tunnel&p=tunnel&path=/WebInterface/CrushTunnel.jnlp

When this launches, it will ask you for the tunnel username.  This will be "tunnel" that you configured above.  You can also hard code this if you make a copy of this jnlp file so the user doesn't need to enter in this information ever time.  Add in these two lines to the properties:

		<property name="crushtunnel.remote.user" value="tunnel"/>
		<property name="crushtunnel.remote.pass" value="tunnel"/>


Once the tunnel has been started, you can use any FTP client on the same machine, and go to:

ftp://user:pass@127.0.0.1:55555/