-
Notifications
You must be signed in to change notification settings - Fork 182
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
[BUG] Connection fail when using behing a corporate proxy (request to https://rhda.rhcloud.com/api/v4/analysis failed, reason: read ECONNRESET) #712
Comments
Hi @pgcalixto, |
@IlonaShishov, I tried to set the |
Hi @pgcalixto telnet rhda.rhcloud.com 443 |
Closing this issue due to no further comments. |
Hi! Sorry for the delay. I just upgraded the extension to v0.9.5, and it still produces the same error: I was able to connect to the rhda.rhcloud.com domain, as @zvigrinberg asked: @IlonaShishov, I tried to reopen the issue but wasn't able to. |
But now I was able to dig in closer. I tried to analyze the extension code and found out that it uses a "Red-Hat Dependency Analytics Exhort JavaScript API" dependency to call the RHDA API. By inspecting this part of the Exhort JS API code in the link below, I noticed that it uses Node's Undici fetch API to make the request: Undici I extracted the analysis function from the link above to a local code snippet and used axios to make the same request, but with a proxy set, and it worked! From what I'm searching, Undici has recently developed the proxy funcionality:
Would there be any interest in the extension supporting this? A lot of companies have their networks behind a corporate proxy. I believe the code would have to be changed not in this repo, but in the linked Export JS API function. |
Hi @pgcalixto , Thanks for digging into this and finding a workaround! What you’ve pointed out about the Undici fetch API and proxy support is very interesting. We’ll look into this and see if we can prioritize it for future updates. |
Describe the bug
I'm behing a corporate proxy and the RHDA plugin in VSCode always fails to connect to Red Hat server, with the following message:
I tried setting the proxy with all of the common procedures, such as:
http_proxy
andhttps_proxy
environment variableshttp.proxy
option"http.proxySupport": "on"
optionhttp.proxyAuthorization
optionNone of them worked. Other plugins that need an Internet connection work with any of these settings.
To Reproduce
Steps to reproduce the behavior:
Files:
src/main/java/HelloWorld.java:
pom.xml:
Expected behavior
RHDA plugin is expected to use the environment variables and/or VSCode settings to connect successfully through a corporate proxy, or to provide settings that can be customized to allow this connection.
Screenshots
Logs
If applicable, attach logs.
VSCode(please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: