Archive

Archive for March, 2011

Kalkun: Inbox multipart support

March 21, 2011 11 comments

There are some user complaining with Kalkun behavior with multipart/long messages in the inbox, the message is split up and it’s quite hard to read it.

I quite believe gammu-smsd already handle it, since the TextDecoded field on inbox table become text, not varchar(160). But, somehow it’s not running as expected. The multipart/long message record split up each other, have different ID, but the key is on the UDH. This is how we managed to merge the message and it’s implemented on commit #1204938

But, it’s not highly tested, you can download the latest code via snapshot or directly on github and help with the test.

Cheers.

Categories: kalkun Tags: ,

Koneksi SSH melalui SOCKS Proxy

Misalkan Anda mempunyai sebuah server di internet, katakanlah Host A, yang menjalankan servis SSH server pada port standar 22. Pada kondisi normal, Anda bisa bebas melakukan koneksi SSH ke Host A, tapi suatu ketika Anda sampai pada suatu keadaan dimana koneksi SSH tidak diperbolehkan dalam suatu jaringan tertentu (katakanlah di kampus), sang admin hanya memperbolehkan koneksi melalui HTTP Proxy dan beberapa servis lain (seperti SMTP, POP3, dan IMAP). Tapi disini saya tidak akan membahas koneksi SSH melalui HTTP Proxy (sudah banyak artikel yang membahas hal ini).

Sebelumnya saya sudah mencoba koneksi SSH melalui HTTP Proxy, tapi sepertinya sang admin tidak memperbolehkan method CONNECT yang dibutuhkan untuk membuat koneksi TCP. Kejam sekali adminnya, tapi saya belum menyerah :D

Yang akan kita bahas adalah bagaimana melakukan koneksi SSH melalui SOCKS Proxy. Tapi sebelumnya apa itu SOCKS Proxy?

Dari Wikipedia:

SOCKS is an Internet protocol that facilitates the routing of network packets between client–server applications via a proxy server. SOCKS performs at Layer 5 of the OSI model—the session layer (an intermediate layer between the presentation layer and the transport layer). Port 1080 is the registered port designated for the SOCKS server.

Disitu juga diberikan contoh kasus:

Bill wishes to communicate with Jane over the internet, but a firewall exists on his network between them and Bill is not authorized to communicate through it himself. Therefore, he connects to the SOCKS proxy on his network and sends to it information about the connection he wishes to make to Jane. The SOCKS proxy opens a connection through the firewall and facilitates the communication between Bill and Jane. For more information on the technical specifics of the SOCKS protocol, see the sections below.

Yang kurang lebih maksudnya adalah kita menggunakan perantara untuk melakukan koneksi, karena koneksi langsung tidak diperbolehkan. Misal: A dan B sebagai host client dan server yang ingin melakukan koneksi, dan C adalah SOCKS proxy. Tapi koneksi dari A ke B tidak diperbolehkan, sedangkan koneksi C ke B diperbolehkan. Nah, kita bisa menumpang koneksi dari C ke B, sehingga A bisa terhubung ke B.

OK, langsung saja kita praktekkan. Pertama-tama kita melakukan koneksi dari A ke C, dalam hal ini kita akan membuat SOCKS proxy menggunakan openSSH.

$ ssh -p993 -D localhost:4321 -l user hostC

Dalam hai ini saya melakukan SSH ke Host C melalui port 993, bukan port standar 22 karena memang di blok oleh admin, port 993 sebenarnya adalah servis IMAP, yang diperbolehkan oleh admin, jadi sebelumnya pastikan SSH server di Host C berjalan di port 993 atau bisa dual port 22 dan 993. Sebenarnya ini hanya akal-akalan saya untuk mengelabui admin saja :D

Sekarang kita mempunyai SOCKS Proxy di localhost port 4321. Tapi tunggu dulu, kenapa localhost? Bukankah SOCKS Proxy adalah Host C? Ya, lagi-lagi ini adalah akal-akalan saya, Anda tentu saja bisa menggunakan koneksi langsung ke Host C, tanpa melakukan binding/tunnel SSH terlebih dahulu, tapi yang menjadi masalah disini adalah saya juga tidak bisa melakukan koneksi SOCKS dari A ke C, lihat di atas, SOCKS Proxy menggunakan port 1080, yang tentu saja di blok oleh admin.

Selanjutnya tinggal menggunakan SOCKS Proxy tersebut untuk melakukan koneksi ke Host B. Tapi, untuk melakukan koneksi SSH melalui SOCKS Proxy kita membutuhkan bantuan program lain. Dalam hal ini yang sudah saya cobakan adalah nc dan connect, alternatif lain adalah connect-proxy, corkscrew tidak bisa digunakan karena belum/tidak mendukung SOCKS Proxy, hanya HTTP(s) Proxy.

$ ssh -o “ProxyCommand /usr/bin/nc -x localhost:4321 %h %p” -l user hostB

atau jika menggunakan program connect:

$ ssh -o “ProxyCommand /usr/bin/connect -S localhost:4321 %h %p” -l user hostB

Selamat ber-SSH ria :D

.

Referensi:

Kalkun: New demo server and contribute page

After a long time looking for hosting provider that support git, finally there is some help by idforge (part of id-x project), kudos for them, especially Mr. Akhmat Safruddin for the quick response.

Now, the demo consist of 2 part, the latest released version and latest development version. The latest released version is the stable version that have been released to public. And the latest development version is contain code from git repository and it’s updated every midnight, so it contains latest code that we working on.

For more information about the demo you can visit Kalkun demo page.

I’ve also made the server to make code snapshot, which run every midnight that contain latest code from git repository. User who don’t have git on their system can easily use this snapshot to test the latest code.

Last, i’ve add Contribute Page on Kalkun homepage to get more feedback from more user/developer.

Categories: kalkun Tags:
Follow

Get every new post delivered to your Inbox.