This helper function returns a dictionary of scheme to proxy server URL mappings. It scans the environment for variables named _proxy, in a case insensitive approach, for all operating systems first, and when it cannot find it, looks for proxy information from System Configuration for macOS and Windows Systems Registry for Windows. If both lowercase and uppercase environment variables exist (and disagree), lowercase is preferred.
urllib.request.getproxies()