def collect_pac_urls(from_os_settings=True, from_dns=True, **kwargs):
    """
    Get all the URLs that potentially yield a PAC file.

    :param bool from_os_settings: Look for a PAC URL from the OS settings.
        If a value is found and is a URL, it comes first in the returned list.
        Doesn't do anything on non-Windows or non-macOS/OSX platforms.
    :param bool from_dns: Assemble a list of PAC URL candidates using the WPAD protocol.
    :return: A list of URLs that should be tried in order.
    :rtype: list[str]
    """
    # Deprecated in 0.8.2
    from_registry = kwargs.get('from_registry')
    if from_registry is not None:
        import warnings
        warnings.warn('from_registry is deprecated, use from_os_settings instead.')
        from_os_settings = from_registry

    pac_urls = []
    if from_os_settings:
        if ON_WINDOWS:
            url_or_path = autoconfig_url_from_registry()
        elif ON_DARWIN:
            url_or_path = autoconfig_url_from_preferences()
        else:
            url_or_path = None

        if url_or_path and (url_or_path.lower().startswith('http://') or url_or_path.lower().startswith('https://')):
            pac_urls.append(url_or_path)
    if from_dns:
        pac_urls.extend(proxy_urls_from_dns())
    return pac_urls
Get all the URLs that potentially yield a PAC file.

    :param bool from_os_settings: Look for a PAC URL from the OS settings.
        If a value is found and is a URL, it comes first in the returned list.
        Doesn't do anything on non-Windows or non-macOS/OSX platforms.
    :param bool from_dns: Assemble a list of PAC URL candidates using the WPAD protocol.
    :return: A list of URLs that should be tried in order.
    :rtype: list[str]