-
Notifications
You must be signed in to change notification settings - Fork 728
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
https connection doesn't work behind a socks5 proxy #843
Comments
Hello! Thank you for reporting! Can you provide a full example to reproduce the issue? |
This example is enough to show/reproduce the issue:
If you console.log the request: (Connection.js)
Even without having elasticsearch running or the proxy you will get:
This doesn't work but if I unset the following:
I get:
|
I will try to provide a repo example |
Hello! Thank you for investigating! You can see how Node.js core is handling the URL here. Thank you again for reporting and investigating! |
🐛 Bug Report
The feature added to replace createNodeAgent doesnt work as expected
#810
When proxying the requests over socks5 through an ssh tunnel the library fails to find the host
After some debugging I found where the issue is but I don't have enough understanding of the library to apply it.
On the connection pool
urlToHost
new URL will transform https://myelastic:443 and remove the port, since it is the https protocolWhen running the request the host is:
If I do the following the request is done successfully:
If
requestParams.port = ''
, https.request host port will default to 80To Reproduce
Version 6.X
Expected behavior
Version 16.X
or the same as in the reproduce with:
Your Environment
@elastic/elasticsearch
version: >=6.4.3The text was updated successfully, but these errors were encountered: