Thursday, November 29, 2007

TransConnect Introduction

INTRO

As many users don't have the need for a proxy. Many applications are designed without considering the scenario that indirect connection may be needed, even NAT connections may be limited.

In the company I work for, it is a must to tunnel networked applications through a proxy server that supports CONNECT method.

The CONNECT method is a specially reserved method by HTTP, as you can see in RFC 2616. It's design was for TLS based HTTPS protocol to pass proxy servers correctly. However, it actually can be used by and is used by other protocols and applications.

If an application supports proxy server, congratulations, you can set it up and everything works happily. But if it happens to be hard to setup the proxy (like git), or the application I am about to use just don't have proxy support in it. What can I do?

Here comes transconnect.

It can be built and used without root privilege. This is nice when a certain application meets one of the two criterion:

  • Proxy setup is a nightmare
  • Doesn't support proxy at all
There are limitations, however.

  • The application has to be TCP based. (I guess, not verified.)
  • The application shall not be something like SIP, which is very bad designed for its dependency of an application layer protocol to its layer 3 address and layer 4 port number.
INSTALLATION

The download can be done within one nano-second. No configure needed. Just "make"
and "make install". It is installed in a user's home directory. "/usr//" installation is not needed and the default build works in this way, no "PREFIX" needed, either.

After it is installed, a shared object can be located "~/.tconn/tconn.so". Edit the "~/.tconn/tconn.conf" to provide transconnect the knowledge of your internal subnet setting and proxy server address .

To use it, just do the following:

LD_PRELOAD=~/.tconn/tconn.so git clone git://xxxx yyyyy

The LD_PRELOAD forces tconn.so be loaded and makes the application "git" to link its socket operations into tconn.so instead of standard socket library. "git" needs not be modified or proxy configured to be able to work from now on. Isn't it great?

CONCLUSION

Even applications support proxy, they will have to implement either refer to some environment variables for proxy setting or will have to implement a Preference to set and store it. That is one example of reinventing wheels. No matter how convenient the wheels can be made, struggles like Gnome and KDE still remain a burden for a regular user like me to be confused where to set up to make every thing moves like a charm.

Typically, I have to setup Firefox, Gnome, wget, ssh, git, svn, and so on, Synaptics Package manager just to get my Internet applications all working properly. Hope this will all end some day.

If the idea of transconnect can be adopted as part of the platform, my sleep can be tight and maybe nightmares won't come back.

3 comments:

Unknown said...

debug 一下

as many users DON'T have.....

怎麼會是doesn't.老師有講你有沒有在聽...丟筆

620 said...

感謝好的老師帶我上天堂

這個梗怎麼感覺咬不爛呢?!
原來是太老了呀

Austinsold said...

對啊,你太老牙齒不好所以咬不動咩...