There are a few tools which alleviate this well.
Firefox:
Use Proxy Button to toggle the proxy in one click from the Firefox toolbar.
Internet Explorer:
Use ProxyPal to toggle proxy from the IE toolbar.
Use
Command Line:
toggle_IE_proxy.exe enable
toggle_IE_proxy.exe disable
Ant:
<antcall target="proxyon"/>
<antcall target="proxyoff"/>
<target name="proxyon">
<exec executable="tools/toggle_IE_proxy.exe">
<arg value="enable"/>
</exec>
</target>
<target name="proxyoff">
<exec executable="tools/toggle_IE_proxy.exe">
<arg value="disable"/>
</exec>
</target>
Full ant file