Since environment variable pointing to proxy may be case sensitive and exist not only for HTTP but HTTPS and FTP protocols, and there's as well the way to avoid usage of proxy server for some addresses or server names with NO_PROXY variable I believe the proper command should be a bit more complex:
Since environment variable pointing to proxy may be case sensitive and exist not only for HTTP but HTTPS and FTP protocols, and there's as well the way to avoid usage of proxy server for some addresses or server names with NO_PROXY variable I believe the proper command should be a bit more complex:
which will produce an output like
To output the proxy of the current session: