GSTorrent -- The Server

Still not much to see here. The main purpose of this section will be the documentation of the GSTorrent server / GSTorrent client protocol. But this is still to incomplete to be documented.


Nothing much to say about usage. Just start the server: GSTorrent.
However, by default the server listens at address at port 2255. If another address for the server to listen on is desired: GSTorrent -h <addr>

Starting with version 0003 the server takes another mandatory parameter: -s <external address>
I don't like this, but I found no portable way to determine my own external IP number. And though this server currently runs only on Linux, I'd like to keep the option open to port it to other systems as well.

And a third option: -d <destination folder>. This is the where the downloaded files will be written. If no -d option was provided ever, the default folder /tmp/GSTorrent/Torrents is taken. The <destination folder> must exists. If it does not exist, the default folder is taken. The server remembers the last destination folder, so if the folder always remains the same, the -d option must only given once.

Word of warning: Don't let the server listen on a public address!
Currently there is no client authorisation at all. Everybody could access your GSTorrent server and start, stop, delete or just see your torrents. I am planning to offer client connections via ssl, but until then: Intranet only!


Currently I am in a situation, where it is necessary for me to connect to my server from a remote host. Of course, I heed my own warning and don't let my server listen on a public address. Since I don't have the time to implement the long overdue ssl connection, I had to find other ways. A very fine and very secure method is to build an ssh tunnel. I suppose everybody who can install a GSTorrent server on a machine, can also install an ssh server. So, suppose the GSTorrent server expects its client connections on the local address This is totally secure from GSTorrent's point of view. If a hacker can exploit this, you are already hacked anyway. So how to connect to this internal address from an external machine? Easy, "build" an ssh tunnel. Furthermore let's suppose the GSTorrent server listens on the port 2255. On your local host, which will run the GSTorrent client, enter:

ssh -L 2255: <address> -N

<address> = address of the remote machine, which runs the GSTorrent server.

The ssh server will ask for a login and a password, if the authorised_keys feature is not used. After a successful authorisation a tunnel from your localhost's port 2255 with the GSTorrent client to the remote host's local 2255 port with the GSTorrent server is built.
Now connect your client to port 2255 on your local machine. The ssh server will forward the connection and you have a remote connection between GSTorrent server and client, which is as secure as a ssh connection can be.


ssl connection
partial downloads Logo