As easy as Seed


It has been around for a while, but only today I decided to try SeedKit. I told myself, let’s write something, and this is what came up.

Toward an improved GLib network stack

I recently started looking into GLib TLS implementation written by Dan Winship. As a reflex, I tried to merge it into my proxy branch. Things did not go so well, not because the branches are wrong, but because they both need similar features inside GIO. This is a good lesson for me, I should have been more careful to what Dan was doing.

So I decided to restart my analyses with both features together (Proxy and TLS).  I’m far from being done but I’d like to share my findings so far. Let’s start with a simplified representation of a “normal” network connection.

Glib Network Connection Timeline

The goal with that little timeline was to prove myself that both features fits well together. Some may notice that this is exactly what would happen if you connect through SOCKSv5 to an XMPP server doing TLS auto-negotiation. This use case is important for me since I would like to remove TLS code from Wocky (Telepathy Gabble XMPP stack) and use GLib in the future.

That’s all very interesting but where’s the problem ? Well the thing is that both proxy and TLS handshake requires information about the original destination address. For proxy handshake, we have to send the original hostname and port to the proxy server. For proxy protocol like HTTP, you need to know the destination protocol in order to decide if you leave the connection as-is (e.g HTTP, Gopher and FTP) or if you have to use HTTP Connect method. For TLS handshake, you need to check server certificate against the original destination address (not against the proxy server address). You also need to take in consideration the scheme if an URI was used to connect.

On proxy side, the implementation is using the GProxyAddress (a subclass of GSocketAddress). It is used to memorize the destination hostname and port. On TLS side a method get_name() was added to GSocketConnectable interface. The first thing I told myself when I started writing this was: Why a program can’t just remember that information ? Well the answer is that in both cases this information might be acquired dynamically during the address enumeration. As an example, if you use GNetworkService class, you will never know what hostname was really used since the returned GSocketAddress does not contain it.

Basically, this is what I need to work on to pursue my way trough a more complete network stack in GLib (and get Proxy/TLS support from GLib in Telepathy Gabble ;)).

Transparent proxy for GLib applications

The biggest problem with socket based proxies are their simplicity.  It’s a bigger pain to write them once for all applications than to implement them for a single application.  But that is if you don’t consider system wide and automatic configuration. So far, the result on Linux is that most desktop environments have global settings. Except the browsers, none of the applications use them.

Continue reading

Mail Notification in Meego

With Meego for Notebooks 1.0 users of Google and MSN can now monitor and open their online e-mails account with a single mouse click in the MyZone panel. Thanks to Intel for hiring Collabora to implement this feature. The GUI shows the number of unread messages for each of your accounts in real-time. Clicking the button will open the online mailbox in your favourite browser. Have a look at the bottom left of the following screen:

Meego for Notebook 1.0 presenting Google Mail Notification

The feature is as been made possible by Telepathy draft API for mail notification. Meego provides the premiere integration of this API in a user interface. It fills a long standing gap in the Telepathy framework.

Got a blog

First let me introduce myself. I’m Nicolas Dufresne also known has stormer on IRC. I’m currently occupied at adding proxy support into GLib Network IO API.  From now own, I will be posting about my current and previous work, or simply giving my ideas about Open Sources softwares in general.

Enjoy!