剛查了一下,原來PAC(proxy auto-config)檔一般是用來給瀏覽器使用的,因為其檔案內容通常是一個JavaScript函式FindProxyForURL(url, host),一般的程式通常無法執行JavaScript,所以對於非瀏覽器的應用程式遇到需要設定proxy時,只能乖乖設定IP:port這種格式。
參考資料:
https://en.wikipedia.org/wiki/Proxy_auto-config
A proxy auto-config (PAC) file defines how web browsers and other user agents can automatically choose the appropriate proxy server (access method) for fetching a given URL.
A PAC file contains a JavaScript function "FindProxyForURL(url, host)". This function returns a string with one or more access method specifications. These specifications cause the user agent to use a particular proxy server or to connect directly.