I've seen that it is possible to configure a proxy with the WLAN settings in the iPhone. But I'm wondering whether it is also possible to configure a proxy for the mobile data connection.
Yes, you can set a Global HTTP Proxy on iOS devices, which routes all network traffic, regardless of connection, through your proxy server.
The simplest way is to use Apple Configurator, available free on a Mac using the Mac App Store. You will need to enroll your device via USB cable into "Supervised" mode. This will wipe your device. After this you can install a profile with a Global HTTP Proxy setting included.
If you don't have a Mac and don't want to pay any money, you can also custom write your own XML-based profile, although I think it's safe to say you're beyond my comfort-level in directing you here.
mobileconfig using a tool such as http://iphone.flexserve.net. Load the mobileconfig by opening it in the iOS mail client. Remove it from
Device Configuration when you're finished testing.
This method neither requires a Mac OS X computer, nor a jailbroken iPhone.
Not 100% sure about proxy but as a last resort, you can set up VPN for your iPhone which would also affect your 3G connection by going to Settings > General VPN > Add VPN Configuraion.