tkluck / pac4cli

Proxy-auto-discovery for command-line applications
25 stars 9 forks source link

Use the NetworkManager dbus interface to monitor for network changes #31

Closed tkluck closed 6 years ago

tkluck commented 6 years ago

We're already using it for getting domains and wpad configuration, so it's actually simpler to also rely on that for getting updates about network status changes.

We do still listen for the SIGHUP signal (and reload the configuration) because that may be useful on other platforms, but when NetworkManager is available, we don't rely on SIGHUP anymore.

The wpad module is not a nice place for the new install_network_state_changed_callback function. However, there's no better place, and there's an outstanding pull request changing the module layout. I don't want to refactor before that gets merged.