class AlpineHttpProxySelector extends ProxySelector {

    private final ProxyConfig proxyConfig;

    public AlpineHttpProxySelector(final ProxyConfig proxyConfig) {
        this.proxyConfig = proxyConfig;
    }

    @Override
    public List<Proxy> select(final URI uri) {<FILL_FUNCTION_BODY>}

    @Override
    public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
    }

}

        if (!"http".equals(uri.getScheme()) && !"https".equals(uri.getScheme())) {
            return List.of(Proxy.NO_PROXY);
        }

        if (proxyConfig == null) {
            return List.of(Proxy.NO_PROXY);
        }

        final URL url;
        try {
            url = uri.toURL();
        } catch (MalformedURLException e) {
            throw new RuntimeException("Failed to construct URL from %s".formatted(uri), e);
        }

        if (!proxyConfig.shouldProxy(url)) {
            return List.of(Proxy.NO_PROXY);
        }

        return List.of(proxyConfig.getProxy());
    
<methods>public void <init>() ,public abstract void connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException) ,public static java.net.ProxySelector getDefault() ,public static java.net.ProxySelector of(java.net.InetSocketAddress) ,public abstract List<java.net.Proxy> select(java.net.URI) ,public static void setDefault(java.net.ProxySelector) <variables>private static volatile java.net.ProxySelector theProxySelector