The “nmcli” CLI program gives access to current network parameters. For example, to get current DNS server:
nmcli dev show | grep DNS
This returns something like:
IP4.DNS: 22.214.171.124 IP6.DNS: 2606:4700:4700::1111
NMCLI output is made for machine parsing.
An example of
nmcli Python parsing is our
that allows locating via nearby WiFi APs alone, using Mozilla Location Service.