msgbartop
Adam Palmer MBCS CITP, Linux, PHP Programmer, MySQL Developer, Embedded Hardware, Security Consultant
Did my blog help you? Please link to me!
  dns test
 
RSS Feed
msgbarbottom

28 Jul 09 Multithreaded TCP Proxy Tunnel

Sometime back I posted a guide in the HOWTO section on load balancing across multiple ISP connections. This is great in certain instances but certainly doesn’t replace line bonding.

With torrent traffic for example, it works great. The various peer connections should be established equally over the various ISPs and you really can utilize the bandwidth of multiple uplinks. A single connection however can only ever be established over one ISP, and this is the biggest limitation for the following reasons:

1) A single HTTP, POP3, SMTP, FTP, etc connection for example will only be established over one ISP whilst the other remains idle.
2) Incoming connections can only come in over one ISP depending on the IP accessed.

I’m sure there are further situations that might suffer limitations due to the setup.

The best way around this that i could think of was creating a multithreaded tcp proxy. The software consists of a proxy client and proxy server. I would run the proxy client on the local end, and the server on some remote machine. The client and the server will create a number of TCP connections between them which should hopefully be split across the ISPs equally, and reassembled by the proxy server at the other end.

The limitations of this though are that the entire session will be limited to the speed of the slowest link, and any of the links failing will cause the tunnel to become corrupted and fail.

C code and an update to come shortly.

Tags: , , ,