I tested setting up a proxy.pac file via a web server:
networksetup -setautoproxyurl "Wi-Fi" "http://localhost/proxy.pac"
and via a file directly:
networksetup -setautoproxyurl "Wi-Fi" "file:///Users/username/Library/proxy.pac"
The web server method works (provided I arrange that the proxy.pac is served by a webserver). The file server doesn't work.
What's the problem, fundamentally?
Motivation for the question is, I'd like to simplify and prefer to not have to run an http server.