Jump to content

Recommended Posts

Posted

Hello all,

 

Does anyone have a step by step guide how to get this working? I have literally wasted days and am losing patience. It just doesn't work and I've followed this guide closely.

 

The only difference is I am using port 8080 as WSUS is already using port 80. Many thanks.

Posted

lol sods law, as soon as I post on Edugeek, I get it working.

 

On steps 3 and 6 I needed to click the 'Connect as' button, specify an admin username/password and now it works correctly.

Posted

I just added a pac file to my blog How to setup a PAC file

 

I did a lot of hunting around for a working pac file and this is the only one I managed to get working.

 

----------Pac File content----------

 

function FindProxyForURL(url, host)

{

// variable strings to return

var proxy_yes = "PROXY IP:Port";

var proxy_no = "DIRECT";

if (shExpMatch(url, "https://mdm.domain.com*")) { return proxy_no; }

if (shExpMatch(url, "http://files.domain.com*")) { return proxy_no; }

// Proxy anything else

return proxy_yes;

}

 

----- Pac File End------------

 

Ross

Posted
Here is a copy of ours.
function FindProxyForURL(url, host)

{

//Declare proxy strings as variables

var capitaproxy = "PROXY 10.112.5.193:80";

// IP not to use proxy

if (shExpMatch(url, "*172.*")) { return "DIRECT"; }
if (shExpMatch(url, "*10.*")) { return "DIRECT"; }
if (shExpMatch(url, "*192.*")) { return "DIRECT"; }
if (shExpMatch(url, "*127.0.0.1*")) { return "DIRECT"; }
if (isPlainHostName(host)) { return "DIRECT"; }

// URLS not to use proxy server

if (shExpMatch(url, "*webmail.school.com*")) { return "DIRECT"; }


// Slect Proxy Server

if (isInNet(myIpAddress(), "172.16.4.0", "255.255.252.0")) { return capitaproxy; }
if (isInNet(myIpAddress(), "172.16.128.0", "255.255.252.0")) { return capitaproxy; }
if (isInNet(myIpAddress(), "172.16.140.0", "255.255.255.0")) { return capitaproxy; }
if (isInNet(myIpAddress(), "172.16.141.0", "255.255.255.0")) { return capitaproxy; }

else

return "DIRECT";

}

Posted

Yours looks better heh :)

 

Here is a copy of ours.
function FindProxyForURL(url, host)

{

//Declare proxy strings as variables

var capitaproxy = "PROXY 10.112.5.193:80";

// IP not to use proxy

if (shExpMatch(url, "*172.*")) { return "DIRECT"; }
if (shExpMatch(url, "*10.*")) { return "DIRECT"; }
if (shExpMatch(url, "*192.*")) { return "DIRECT"; }
if (shExpMatch(url, "*127.0.0.1*")) { return "DIRECT"; }
if (isPlainHostName(host)) { return "DIRECT"; }

// URLS not to use proxy server

if (shExpMatch(url, "*webmail.school.com*")) { return "DIRECT"; }


// Slect Proxy Server

if (isInNet(myIpAddress(), "172.16.4.0", "255.255.252.0")) { return capitaproxy; }
if (isInNet(myIpAddress(), "172.16.128.0", "255.255.252.0")) { return capitaproxy; }
if (isInNet(myIpAddress(), "172.16.140.0", "255.255.255.0")) { return capitaproxy; }
if (isInNet(myIpAddress(), "172.16.141.0", "255.255.255.0")) { return capitaproxy; }

else

return "DIRECT";

}

Posted
Yours looks better heh :)

 

I know ;) ha ha

 

Yours will do the job just fine. With mine if you have 2 sites and 2 proxies they can be specified and any internal IP will be set as an exception by default :) But if you dont need those features yours would be the best way to go.

Posted
I know ;) ha ha

 

Yours will do the job just fine. With mine if you have 2 sites and 2 proxies they can be specified and any internal IP will be set as an exception by default :) But if you dont need those features yours would be the best way to go.

 

I did setup a similar one to you but learning the hard way I did not know that I had to use the proxy IP instead of DNS. By then I had a tone down version.

Posted

Here's where I'm at :)

 

I've created a new website at:

 

http://SERVERNAME:8082/proxy.pac

 

Created a MIME Type:

 

.pac
application/x-ns-proxy-autoconfig

 

For the time being I'm testing this with IE9. If I enter the above URL, IE9 asks if I wish to download the file (so all appears OK).

 

From a workstation - Internet Settings > Connections > LAN Settings

 

Tick 'Use automatic configuration script' copy/paste the above URL, then untick 'Use a proxy'.

 

When I open up IE9, I see the IIS7 as my homepage and I'm not sure why. When I hit refresh, the proper homepage comes up and I can see external sites without any problems. I've tried flushing the DNS cache, but this makes no difference. Any suggestions?

Posted
Trying using the IP address instead of server name when connecting to the pac file.

 

Ross

 

Thanks for the suggestion, but it gives exactly the same results.

 

In the end, I ended up resetting IE to defaults and now it works fine with both:

 

http://SERVERNAME:8082/proxy.pac

http://192.168.1.5:8082/proxy.pac

 

I'll be testing this out on an iPad later this week :) Lucky me!

Posted

I've tested my setup on an iPad and all is well :) Here's how to do it:

 

On the iPad, navigate to Settings > Network > WIRELESS NAME. Click the blue arrow next to 'WIRELESS NAME'. At the bottom you'll see proxy information. Change this to 'Auto' then enter:

 

http://SERVERNAME:8082/proxy.pac

 

Now open up Safari and the internet works again, even with WebDav enabled. Job done :)

  • 1 year later...
Posted
On steps 3 and 6 I needed to click the 'Connect as' button, specify an admin username/password and now it works correctly.

Are you sure this isn't just giving all webdav users admin access to all folders?

 

I don't know, I'm just playing with this myself, but my cautious mind is thinking that when the alternative is to pass-through the credentials provided by the user (ie their own access rights) that you are giving everyone the access of the user you've used to 'Connect as'?

 

Peter

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...