Documentation

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

 

I - Quick description

 

This program has been written for people having a limited access at work (http access), and who want

to use some network services like ftp, irc, telnet, ...

 

II - Prerequisites

 

- This program is intended to use network services where normally you cannot because of firewalls and proxies.

As a consequence, you must know what a firewall and a proxy are, and how to use a traditionnal socks server.

- Socks via HTTP is 100% Java, so you'd better know what Java is (or at least you need to know how to read man pages).

- You need a "firewalled" computer (lets say the computer you use at work). This computer must have at least access

to WWW. (if you full access, why the hell are you reading this documentation ?).

- You need a server located outside the firewalled area(lets say your computer with permanent connection at home,

thanks cable or xDSL). This server must have FULL ACCESS to the Internet.

 

III - How it works

 

1 - This is how a direct connection works:

 

  (1)                          (3)

Program        real

(IRC,     <------------>  IRC Server

Telnet)     connection    or Telnet Server

 

 

2 - This is how a connection using socks works:

 

  (1)                    (2)                          (3)

Program     socks                       real

(IRC,     <------->  Socks Server  <------------>  IRC Server

Telnet)      v4                      connection    or Telnet Server

 

 

 

3 - This is how a connection using Socks via HTTP works:

 

  (1)                   (2a)                                (2b)                          (3)

Program     socks    Socks via     ------------------    Socks via         real

(IRC,     <------->    HTTP            HTTP tunnel          HTTP      <------------>  IRC Server

Telnet)      v4     client part    ------------------    server part    connection    or Telnet Server

 

 

As you can see, the socks server is now "splitted" in two distinct parts, called 2a and 2b.

The Socks via HTTP client part, named 2a, acts as a socks server, and must be running on the localhost.

You have to configure you program (ie mIRC, CRT or whatever) to use a socks server running on

127.0.0.1 port 1080.

The part 2a communicates with the part 2b using HTTP (and then bypasses firewalls and proxies), and the part

2b establishes the real connection to the final server.

As you can guess, the part 2b must be running on a computer having full access to the Internet (understand not firewalled).

On the schema, the firewalled area is located on the left of the HTTP Tunnel.

The part 2b is actually a java servlet (for now).

Don't forget that the part 2b must be accessed by part 2a via HTTP, so you have to install this part 2b on

a server that have a static ip, or use a service like dynip (windows), or dyndns (linux).

 

As the program is 100% Java, you can use any OS combinaison you want:

- Server part 2b on Linux, Client part 2a on Windows,

- Both Server part and client part on Linux,

- Both Server part and client part on Windows,

- Server part 2b on Windows, Client part 2a on Linux.

 

(I used Linux as an example but you can use any java capable OS you want).

 

IV - Advanced description:

 

1 - Client part

 

The client part of Socks via HTTP acts as a socks server. Your program (IRC, Telnet or whatever) connects to this

socks server, thinking it is speaking with a real socks server.

The socks via HTTP client communicates the socks via HTTP server using HTTP protocol. The HTTP packets are zipped

on the fly to speed up network transfer.

 

2 - Server part

 

The server parts manages the real connections.

As you know, HTTP is a disconnected protocol, ie you create a request, send it, and you got a response.

There is no connection context (I suppose here that the proxy you have to bypass does not support keepalive).

As a consequence, the context handling is the job of the Socks via HTTP server part.

The server part manages a HashTable containing all the opened connections. Each connection has an unique id.

This id is sended by the Socks via HTTP client part for each request.

 

 

V - Example

 

I have a permanent connection at home (xDSL or cable), with Socks via HTTP Server part installed and configured.

I have a computer at work, with only HTTP access.

It is 11:00AM, I'm working hard at work, and suddenly I need to download a program, but this program is

located on a FTP site, and I have no FTP access...

Without Socks via HTTP, I'll have to wait to be back home to download the program.

But with Socks via HTTP, all I have to do is to download the client part from the official Web Site

(http://cqs.dyndns.org/socks), and launch it. Then I configure my ftp client (for example CuteFTP) to use a

socks server on 127.0.0.1 on port 1080. Now I can download all the files I need :)