NetworkManager CONNECTION_ID Is a Profile Name, Not the SSID
Use the NetworkManager dispatcher’s documented connection metadata when selecting a proxy after a network change.
If a proxy rule compares the office SSID with CONNECTION_ID, renaming a saved profile can break it. NetworkManager defines CONNECTION_ID as the profile's name. A default name that happens to match the SSID hides the difference.
Choose the input according to the rule:
- For a policy attached to a managed connection profile, use its documented connection UUID as a more stable key.
- For a policy that truly depends on wireless information, obtain that information through the supported interface instead of treating a profile name as an SSID.
A familiar name or SSID does not authenticate a network. Keep the approved network identity and proxy reachability conditions in the decision.
Next identify the application receiving the selected setting. A dispatcher runs in its own context: exporting a variable there does not replace the environment of already running desktop applications. Use the participating client's configuration interface in the correct user or service scope. For a PAC policy stored on the profile, choose between a PAC URL and an imported script.
Define which active connection owns the decision when Wi-Fi and Ethernet coexist, and what to do on disconnect or an unknown profile. Without those cases, a later event from one interface can undo a valid route selected for another. Keep the triggering event, profile identity and affected consumer together when diagnosing the rule.