iPhone 4 was recently jailbroken and now it is unlocked too, thanks to the Dev Team. It cannot be easier, no PC/Mac required, only the internets!
All you need are the following :
A Jailbroken iPhone 4 / 3GS,3G (it should be activated, that is a pre-req for online jailbreak)
A WiFi connection
That is pretty much it!
Step by step (best practices) :
Launch Cydia and search for ultrasn0w [if not found, then add repo : repo666.ultrasn0w.com in Cydia]
Install ultrasn0w and reboot your iPhone 4 when prompted. Turn 3G off (Settings -> Network -> Enable …