For Gnome, we use gsettings list-recursively org.gnome.system.proxy
to get the proxy related configuration.
How to fetch the Proxy configuration of a KDE desktop with kwriteconfig.I believe kwriteconfig is only for setting the KDE configuration. Please let me know if we have any command which help us to get the proxysettings.