Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Auto Proxy Discovery WPAD does not work

I have a proxy server/content filter in my network, that I am trying to get automatically detected by my MacBookPro11,2 running Yosemite 10.10.2 (14C109)


When I enable "Auto Proxy Discovery" my proxy server gets 2 requests for the wpad.dat file, provided below. Google Chrome picks up the wpad.dat file and starts sending the requests through my proxy server. But Safari and other system services(locationd, networkd, and any applications that rely on networkd to figure out the proxying) do not send requests through the proxy. There are "PAC evaluation" errors in the console. Please see diagnostic information below.



Relevant Console logs:

-------------------------------------------------------------------------------- ---------------

2/2/15 11:56:51.466 PM networkd[162]: -[NETClientConnection initWithParamters:state:client:endpointID:start:] Client Slack.1938 created connection 408:

connect-by hostname removed.slack.com:443

2/2/15 11:56:51.467 PM networkd[162]: -[NETProxyLookup pacLookupComplete:proxies:error:] PAC evaluation error: Error Domain=kCFErrorDomainCFNetwork Code=308 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 308.)"

2/2/15 11:56:51.467 PM networkd[162]: -[NETClientConnection decrementEvaluateOutstanding] notifying Slack.1938 connection 408 (connect-by hostname removed.slack.com:443)

new reachability hostname removed.slack.com:443: satisfied, interface: 0, predicted: en0, fallback: 0, dns service: 0, since: 0

2/2/15 11:56:51.531 PM networkd[162]: -[NETClientConnection handleConnectReport:] Slack.1938 connection 408 reporting:

parameters: connect-by hostname removed.slack.com:443

report: hostname removed.slack.com:443: 192.168.0.2:49540 <-> 107.20.202.163:443 via en0

2/2/15 11:56:51.532 PM networkd[162]: -[NETClientConnection decrementEvaluateOutstanding] notifying Slack.1938 connection 408 (connect-by hostname removed.slack.com:443)

new reachability hostname removed.slack.com:443: satisfied, is viable, better route: 0, predicted: 0

2/2/15 11:57:05.452 PM discoveryd[52]: Basic DNSResolver UDNSServer::ProcessEvent unknown event type: 7!







Relevant diagnostic info from Terminal:

-------------------------------------------------------------------------------- ----------

removed-macpro:tmp removed$ ping wpad

PING wpad (192.168.1.1): 56 data bytes

64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=1.231 ms

64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.005 ms

^C

--- wpad ping statistics ---

2 packets transmitted, 2 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 1.231/1.618/2.005/0.387 ms



removed-macpro:tmp removed$ ping wpad.local

PING wpad.local (192.168.1.1): 56 data bytes

64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=1.323 ms

^C

--- wpad.local ping statistics ---

1 packets transmitted, 1 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 1.323/1.323/1.323/0.000 ms



removed-macpro:tmp removed$ wget --save-headers 'http://wpad/wpad.dat' ; cat wpad.dat ; echo

--2015-02-02 23:56:13-- http://wpad/wpad.dat

Resolving wpad (wpad)... 192.168.1.1

Connecting to wpad (wpad)|192.168.1.1|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 506 [application/x-ns-proxy-autoconfig]

Saving to: ‘wpad.dat’



wpad.dat 100%[========================================================================== ========================================>] 506 --.-KB/s in 0s



2015-02-02 23:56:13 (37.1 MB/s) - ‘wpad.dat’ saved [506/506]



HTTP/1.1 200 OK

Date: Tue, 03 Feb 2015 04:56:10 GMT

Server: Apache/2.4.10 (Ubuntu)

Content-Length: 506

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Content-Type: application/x-ns-proxy-autoconfig



function FindProxyForURL(url, host) {

var lurl = url.toLowerCase();

var lhost = host.toLowerCase();

var rhost = dnsResolve(host);



if (isPlainHostName(lhost) || shExpMatch(lhost, "*.local") ||

isInNet(rhost, "10.0.0.0", "255.0.0.0") || isInNet(rhost, "172.16.0.0", "255.240.0.0") ||

isInNet(rhost, "192.168.0.0", "255.255.0.0") || isInNet(rhost, "127.0.0.0", "255.255.255.0")) {

return "DIRECT";

}


return "PROXY 192.168.1.1:3128; PROXY wpad:3128";

}

removed-macpro:tmp removed$



I have tried a very simple wpad.dat file as well with the same PAC errors in the console:

function FindProxyForURL(url, host) {return "DIRECT"}




What I see in the apache server logs regarding wpad.dat requests.

-------------------------------------------------------------------------------- ----------

root@wpad:~# grep -F 'wpad.dat' /var/log/apache2/other_vhosts_access.log

wpad:80 192.168.0.2 - - [02/Feb/2015:23:20:53 -0500] "GET /wpad.dat HTTP/1.1" 200 720 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"

wpad:80 192.168.0.2 - - [02/Feb/2015:23:20:53 -0500] "GET /wpad.dat HTTP/1.1" 200 720 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"

MacBook Pro (Retina, 15-inch, Late 2013), OS X Yosemite (10.10.2)

Posted on Feb 2, 2015 9:54 PM

Reply
2 replies

Apr 10, 2015 7:04 AM in response to mr_friend

I have discovered the same issue and reported to Apple using Feedback.app.


But last 3 month I get no reply.


So long I type the following to my users console/terminal from time to time.

sudo killall -9 networkd


I think I type this command up to 100 times a day 😠

When I slow down my standby time and monitor off time it's better - that's my impression 😕


So I decide to put this command as cronjob, but then for example active downloads are interrupted....



I tried with fresh/clean yosemite install as well as with upgraded mavericks. Both times same result on all our companies mac books.



strace/dtruss networkd seems not to help. No information :-(

Auto Proxy Discovery WPAD does not work

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.