<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Script Sharp 1 &#8211; Scripting Internet Explorer proxy configuration</title>
	<atom:link href="http://sharpreflections.wordpress.com/2007/03/12/scripting-ie-proxy-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://sharpreflections.wordpress.com/2007/03/12/scripting-ie-proxy-configuration/</link>
	<description>Thoughts about .Net, programming and other more important stuffs.</description>
	<lastBuildDate>Mon, 28 Sep 2009 20:33:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matteo</title>
		<link>http://sharpreflections.wordpress.com/2007/03/12/scripting-ie-proxy-configuration/#comment-358</link>
		<dc:creator>Matteo</dc:creator>
		<pubDate>Fri, 30 Mar 2007 10:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://sharpreflections.wordpress.com/2007/03/12/script-sharp-1-scripting-ie-proxy-configuration/#comment-358</guid>
		<description>Wonderful! the final solution.</description>
		<content:encoded><![CDATA[<p>Wonderful! the final solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pietro Toniolo</title>
		<link>http://sharpreflections.wordpress.com/2007/03/12/scripting-ie-proxy-configuration/#comment-346</link>
		<dc:creator>Pietro Toniolo</dc:creator>
		<pubDate>Thu, 29 Mar 2007 10:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://sharpreflections.wordpress.com/2007/03/12/script-sharp-1-scripting-ie-proxy-configuration/#comment-346</guid>
		<description>But why don&#039;t you use a &lt;a href=&quot;http://en.wikipedia.org/wiki/Proxy_auto-config&quot; rel=&quot;nofollow&quot;&gt;proxy.pac&lt;/a&gt;?

I have one on my pc, that automatically switches proxy depending on the IP of my primary network adapter. Thus, the choice of the correct proxy is somewhat automatic. The file I use is similar to this one:
&lt;code&gt;
function FindProxyForURL(url,host) {
	if(isPlainHostName(host))
		return &quot;DIRECT&quot;;
	else if(isInNet(host,&quot;127.0.0.0&quot;,&quot;255.0.0.0&quot;))
		return &quot;DIRECT&quot;;
	else if(isInNet(host,&quot;192.168.0.0&quot;,&quot;255.255.0.0&quot;)) // VMWare &amp; Wi-Fi
		return &quot;DIRECT&quot;;
	else if(isInNet(myIpAddress(),&quot;172.16.0.0&quot;,&quot;255.255.0.0&quot;)) // BF
		return &quot;PROXY 172.16.0.170:8080;DIRECT&quot;;
	else
		return &quot;DIRECT&quot;;
	}
&lt;/code&gt;

I even found that you do not need an http service (i.e. a local IIS or Apache) to give back the .pac file: you can simply use a URL syntax with the &quot;file:&quot; prefix, like:
	file:///drive/path/proxy.pac

This is the configuration for Firefox, I think that with IE you must use only two slashes after the &quot;file:&quot;. I think that if you have any http service on your pc, it is better to specify an &quot;http://localhost/...&quot; path to reach your proxy.pac file, because some other tools that use the IE proxy can get confused by the &quot;file:&quot; syntax...</description>
		<content:encoded><![CDATA[<p>But why don&#8217;t you use a <a href="http://en.wikipedia.org/wiki/Proxy_auto-config" rel="nofollow">proxy.pac</a>?</p>
<p>I have one on my pc, that automatically switches proxy depending on the IP of my primary network adapter. Thus, the choice of the correct proxy is somewhat automatic. The file I use is similar to this one:<br />
<code><br />
function FindProxyForURL(url,host) {<br />
	if(isPlainHostName(host))<br />
		return "DIRECT";<br />
	else if(isInNet(host,"127.0.0.0","255.0.0.0"))<br />
		return "DIRECT";<br />
	else if(isInNet(host,"192.168.0.0","255.255.0.0")) // VMWare &amp; Wi-Fi<br />
		return "DIRECT";<br />
	else if(isInNet(myIpAddress(),"172.16.0.0","255.255.0.0")) // BF<br />
		return "PROXY 172.16.0.170:8080;DIRECT";<br />
	else<br />
		return "DIRECT";<br />
	}<br />
</code></p>
<p>I even found that you do not need an http service (i.e. a local IIS or Apache) to give back the .pac file: you can simply use a URL syntax with the &#8220;file:&#8221; prefix, like:<br />
	file:///drive/path/proxy.pac</p>
<p>This is the configuration for Firefox, I think that with IE you must use only two slashes after the &#8220;file:&#8221;. I think that if you have any http service on your pc, it is better to specify an &#8220;http://localhost/&#8230;&#8221; path to reach your proxy.pac file, because some other tools that use the IE proxy can get confused by the &#8220;file:&#8221; syntax&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
