Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking other plugins with your Proxy setting #2209

Open
abharku opened this issue Jan 13, 2023 · 0 comments
Open

Breaking other plugins with your Proxy setting #2209

abharku opened this issue Jan 13, 2023 · 0 comments

Comments

@abharku
Copy link

abharku commented Jan 13, 2023

azure-functions-maven-plugin:1.22.0

We had issue with https://github.com/SonarSource/sonar-scanner-maven plugin where what we thought that its ignoring nonProxyHosts settings on maven and trying to connect to our local instance via our proxy

Turns out in your plugin code https://github.com/microsoft/azure-maven-plugins/blob/develop/azure-toolkit-libs/azure-toolkit-common-lib/src/main/java/com/microsoft/azure/toolkit/lib/common/proxy/ProxyManager.java

You are setting ProxySelector with only host and port and ignoring nonProxyHosts. And have also forgot to reset so other plugins after this is not impacted by this plugin.

I had to recompile sonar-scanner-maven plugin with following bit of code to make it work:

`ProxySelector.setDefault(new ProxySelector() {
@OverRide
public List select(URI uri) {
return Collections.singletonList(java.net.Proxy.NO_PROXY);
}

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

`
Now we are forced to use our own compiled plugin for sonar. Please can you update your plugin so either you reset ProxySelector or you do ProxySelector with nonProxyHosts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant