From ModMyiFone - Wiki
Intro
SRELAY is a SOCKS proxy server. You may ask who cares? Well with this running on your phone, yes, even you can tether - - use your iphone's edge connection to act as a internet connection for your computer. Great for us always on the move! Thanks to the #iphone-dev team it is now possible to install srelay on your iphone.
Installing srelay for the iphone is incredibly simple. Originally I was going to write up a bit more difficult guide that included enabling ssh with dropbear among other things but nate true created a kit for windows that makes the entire process painless. Note this is for windows only. The OSX build is not yet working.
Step One
If you have not yet gone through the jail break process read here and come back once you have. If you have broken out of jail on windows please continue.
Step Two
Download and extract nate true's iphone tethering kit from here or here.
Step Three
Make sure you phone is plugged in and run the tetherify-windows.bat from the tethering kit. You will see something that looks like the following screen. NOTE: if you see fileref: 0 instead of fileref: 1 this did not work. Make sure you have all your basic iphone modding proper.
Step Four
Follow the on screen directions and restart your phone twice then once it is booted up the second time press any key (I told you this is incredibly easy).
My command prompt closed out when it was done but what was shown on screen was:
--------PHASE 4: Restoring original update configuration---------
1 file(s) copied.
1 file(s) copied.
iPhoneInterface v0.3.1 built on Jul 14 2007
Waiting for phone... established.
iPhone state: Activated
type "help" for help
iPhone:/# fileref: 1
iPhone:/# fileref: 1
iPhone:/# ---------DONE!--------
Done
Yes! srelay is installed and now you can tether!!!
--Cash7c3 21:13, July 25, 2007 (GMT+6)