title: How do I create a command line application that will force the use of proxies for certain other applications?
body: <p>What I'm basically trying to do is create a command line alternative to <a href="http://widecap.ru" rel="nofollow">widecap</a>. How I imagine this thing to work:</p>
  
  <ol>
  <li>External application calls my command line tool and passes the proxy as an argument</li>
  <li>The command line tool launches and redirects all web traffic for the application that called it through the proxy that was passed as an argument</li>
  <li>External application closes the command line tool after it's done</li>
  </ol>
  
  <p>The reason why I don't want to implement the proxy support directly into the external application's code is that I will not always be writing the external applications. I want it to be a separate tool that can be used by anyone.</p>
  
  <p>Any directions/feedback/suggestions/links/ideas that you could give me will be greatly appreciated.</p>
  
  <p>Edit: Just to be more clear, I would like to see a code example in C# that demonstrates how I can "hook" on a running process and tunnel all its web traffic through a proxy.</p>