NetworkManager’s proxy.pac-url holds a location from which a PAC file can be obtained. proxy.pac-script holds the UTF-8 JavaScript itself. They are separate configuration properties.

For an existing profile using a remotely maintained PAC:

nmcli connection modify "office" proxy.method auto \
  proxy.pac-script "" \
  proxy.pac-url "https://config.example.net/proxy.pac"

Alternatively, current nmcli can read a local file when setting pac-script:

nmcli connection modify "office" proxy.method auto \
  proxy.pac-url "" \
  proxy.pac-script "file:///home/alex/proxy.pac"

In the second form, nmcli reads the file and saves its contents as the script. It does not store a live reference that automatically follows later edits to that file. Repeat the configuration import when the stored script needs updating.

The script must define FindProxyForURL. Apply the modified profile through the connection’s normal activation lifecycle and check the participating client’s actual route. Evaluate the PAC result for the requested destination. Saving NetworkManager proxy metadata does not force arbitrary socket applications to use it.

Artiglyn mynjee