• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • zoom-plugin
    • None

      Currently the plugin doesn't seem to take proxy settings into account and direct connects.

      Plugin version: 1.1

          [JENKINS-58753] Add proxy support for the zoom plugin

          chao qian added a comment -

           

          I also met this problem, my Jenkins environment is in internal network, it need use proxy to connect internet.  

          Now I can't use zoom plugin to push notifications. 

          chao qian added a comment -   I also met this problem, my Jenkins environment is in internal network, it need use proxy to connect internet.   Now I can't use zoom plugin to push notifications. 

          Jorge Yanes added a comment - - edited

          I also have this problem.

          2020-03-27 18:34:06.404+0000 [id=159] INFO i.j.p.zoom.ZoomNotifyClient#notify: Send notification to https://applications.zoom.us/addon/v2/jenkins/webhooks/xxxxxxxxxxxxxx_xxxxxxx, message: null
          
          2020-03-27 18:34:27.464+0000 [id=159] SEVERE i.j.p.zoom.ZoomNotifyClient#notify: Error posting to Zoom, url: https://applications.zoom.us/addon/v2/jenkins/webhooks/xxxxxxxxxxxxxx_xxxxxxx, message: null

           

          At first I thought it was just ignoring the proxy settings on the advanced tab of the plugins management page, and that setting the following java opts could work

          -Dhttp.proxyHost="proxy.xxxxxx.com" -Dhttp.proxyPort=3128 -Dhttps.proxyHost="proxy.xxxxxx.com" -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts="localhost|aaaa|aaaa.xxxxxx.com|bbbb|bbbb.xxxxxx.com"
          

          but it did not.

           

          I can access the URL both with Chrome and with the following in the Jenkins script console

          ProxyConfiguration.open(new java.net.URL("https://applications.zoom.us/addon/v2/jenkins/webhooks/")).content
          

          I get a 401 error, but that's ok, because this test is not providing the API token.

           So it is not a connectivity issue. It is clearly a code problem.

           

          I found the plugin's code [here](https://github.com/jenkinsci/zoom-plugin/blob/master/src/main/java/io/jenkins/plugins/zoom/ZoomNotifyClient.java)

          And it's using the Apache HTTP client to post to the API URL, but it never takes any proxy into account.

           

          Something like this example must be implemented: [Example](https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientExecuteProxy.java)

          There's another explanation here: [Tutorial](https://www.tutorialspoint.com/apache_httpclient/apache_httpclient_using_proxy.htm)

           

          If I have time this weekend I might open a pull request. This doesn't seem difficult to do at all.

          Jorge Yanes added a comment - - edited I also have this problem. 2020-03-27 18:34:06.404+0000 [id=159] INFO i.j.p.zoom.ZoomNotifyClient#notify: Send notification to https: //applications.zoom.us/addon/v2/jenkins/webhooks/xxxxxxxxxxxxxx_xxxxxxx, message: null 2020-03-27 18:34:27.464+0000 [id=159] SEVERE i.j.p.zoom.ZoomNotifyClient#notify: Error posting to Zoom, url: https: //applications.zoom.us/addon/v2/jenkins/webhooks/xxxxxxxxxxxxxx_xxxxxxx, message: null   At first I thought it was just ignoring the proxy settings on the advanced tab of the plugins management page, and that setting the following java opts could work -Dhttp.proxyHost= "proxy.xxxxxx.com" -Dhttp.proxyPort=3128 -Dhttps.proxyHost= "proxy.xxxxxx.com" -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts= "localhost|aaaa|aaaa.xxxxxx.com|bbbb|bbbb.xxxxxx.com" but it did not.   I can access the URL both with Chrome and with the following in the Jenkins script console ProxyConfiguration.open( new java.net.URL( "https: //applications.zoom.us/addon/v2/jenkins/webhooks/" )).content I get a 401 error, but that's ok, because this test is not providing the API token.  So it is not a connectivity issue. It is clearly a code problem.   I found the plugin's code [here] ( https://github.com/jenkinsci/zoom-plugin/blob/master/src/main/java/io/jenkins/plugins/zoom/ZoomNotifyClient.java) And it's using the Apache HTTP client to post to the API URL, but it never takes any proxy into account.   Something like this example must be implemented: [Example] ( https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/examples/org/apache/http/examples/client/ClientExecuteProxy.java) There's another explanation here: [Tutorial] ( https://www.tutorialspoint.com/apache_httpclient/apache_httpclient_using_proxy.htm)   If I have time this weekend I might open a pull request. This doesn't seem difficult to do at all.

          Jorge Yanes added a comment - - edited

          Done! https://github.com/jenkinsci/zoom-plugin/pull/4

          It is working for me, I hope they merge it

          Jorge Yanes added a comment - - edited Done!  https://github.com/jenkinsci/zoom-plugin/pull/4 It is working for me, I hope they merge it

            zoom_us zoom us
            pierrebtz Pierre Beitz
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: