After digesting the manual, I come up with the following command.
ipfw add 1000 fwd my_proxy_address,3128 tcp from any to any 80
I can observe my packets went through my proxy server. But, this command will crash the system whenever I test some flash games on facebook. Did I do anything wrong in this command?
However, if I setup the proxy server manually in the system pref, I wouldn't encounter any crash at all, which indicates my proxy server functions properly. This is quite strange to me since ipfw should forward every raw packet to my proxy server.
So, what's wrong behind all this? I'll appreciate it much if you can either help me fix ipfw or provide a better solution.