Thursday, April 26, 2007

Stunned by STUN

Sigh, is there no end to Stun?

Finally implemented a (buggy and nubby) STUN server. Had to rework the entire message passing side as I was just using nubby strings to pass messages. Now it's passing data via serialised objects. However, once I was done, I came to the rude realisation that it doesn't work on my Mac. Sigh, on hindsight, maybe should have realised it sooner ._.

Iptables, the firewall used by OSX, is symmetric, and therefore is unable to be STUNned. Therefore, my intranet client connection code cannot work if the initiatee is iptabled. Also found out that my server won't be able to send that client any messages. It's fine on a non iptabled machine, but not for OSX. Gah.

Sigh, now it's back to the drawing board. Not sure how to do it now, was thinking of a strategy where the clients connect to the server via TCP, then connect with each other via UDP.

Naturally, that won't fix the iptable problem, but if in the event the clients aren't able to connect to each other, at least I still have a TCP pipe connected to the server which will enable the server to do message relaying. Mai hiam bei pai?

Sigh having a headache now.. think too much liao. If Skype can do it .. but no .. Skype probably had networking engineers banging their heads against the problem.. there's only me here, and only a month max. Did a short peek at msn using my firewall, it's not true p2p. Cop out! It all goes through the server.

Sigh.

No comments:

Post a Comment