Enabling/disabling the global proxy settings is not quite as easy, however. You have to manage everything through a secondary tab in the Network preference pane. So I wrote ToggleProxy (874KB download) to speed up the process. It will toggle the SOCKS proxy on and off automatically (make sure the server and port are already set in the Network preference pane), and display the status with a Growl notification if you have the growlnotify tool installed, or in a native dialog box otherwise.
Make sure to read the ReadMe file, as you may have to make a change to use the tool for Ethernet as opposed to Airport. For those of you who want to expand the tool to implement manual proxy settings or using other proxies, I recommend you look up the networksetup command-line tool. I also use scutil to discover my proxy settings, but that is also possible through networksetup.
Note: I use 10.5.2, and I don't know if networksetup is available in previous versions of OS X. If you do not have networksetup, then ToggleProxy will not function.
[robg adds: I haven't tested this one. If you'd like to see (or change) what it does, you can first view its bundled AppleScript and bash scripts. You can see the script sources by digging into the package -- Control-click on the app icon and pick Show Package Contents from the pop-up menu, then navigate into Contents » Resources » Scripts folder. The networksetup application is available on pre-10.5 systems, as described in this hint, but you'll probably want to copy/link it somewhere else to use it regularly.]

