Closed smckee-r7 closed 1 month ago
Hmm, yes that definitely seems broken, and it does look like somehow this doesn't have any existing tests either. Would you be interested in opening a PR? I expect the actual fix isn't too difficult (relevant code is here: https://github.com/httptoolkit/mockttp/blob/main/src/rules/http-agents.ts) and most of the test code we'll need is already in the example above.
Fixed in #181
Hey, So I've been trying to get
proxyUrl
to work with an external pac file but it doesn't seem to be working. Running the following script with the curl request shows the pac file is never fetched from the local server and mockttp fails to forward the request to the 2nd proxy with the log message,Failed to handle request: buildProxyAgent is not a function
:Curl Request: curl -k -x "http://127.0.0.1:8095/" "https://www.bbc.com/" -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0"
It looks like
buildProxyAgent
is an object containing a class rather than a function. This might be related to changes in pac-proxy-agent potentially?