I am using Ubuntu 11.10. In System Settings -> Network I can add a Socks proxy but it doesn't work with my UDP application or even Firefox (it just connects using my real IP). What do I need to do to send my UDP program's data through a proxy ?
'System Settings -> Network' doesn't enforce a proxy. It merely recommends applications to use a proxy. (System Settings are Gnome settings and Gnome apps (and some others) use them. I believe, Firefox should also default to using Gnome settings, but I may be mistaken.)
The only way to enforce using a proxy, is a firewall that blocks all other traffic.
While SOCKSv5 supports UDP, SOCKS is more commonly used for TCP.
If you want a particular application to use a proxy, this application must support proxies.
If you want to tunnel all traffic (hide your real IP), consider using a VPN instead.