There are some projects that do protocol examining.
As Mega Man X it is a difficult thing to do and it depends on the protocol.
Some protocols are easy to find, some are not.
The most active projects are:
Layer 7 packet classifier (
http://l7-filter.sourceforge.net/)
IP2P project (
http://netfilter.org/patch-o-matic/p...om-extra-ipp2p)
The pages mention which protocols are supported and which are not.
Both have simple iptables match syntax and work ok.
It works ok for me, but i have a small network and the only traffic is eMule, so i don't know how well it works.
But, if you want to do simple bandwidth shaping i guess it should work.
Also, about the thing you said ("You could setup a firewall blocking all incoming communication so the client app can't upload, but still should be able to download.")
You need an incoming connection to download also.
I hope i helped.