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

Pass socket connection options in Agent #79

Open
gagni opened this issue Aug 27, 2021 · 3 comments
Open

Pass socket connection options in Agent #79

gagni opened this issue Aug 27, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gagni
Copy link

gagni commented Aug 27, 2021

Hello,

I don't know if it's a bug, but I would like to pass a cipher, the version of the tls protocol,... in the agent but it doesn't work. I haven't found anything on the lib about this, so I don't know if this feature is functional or not. I checked with wireshark, but I still see the default list of nodejs configurations and not the configuration I gave as an option to the agent.
When creating the agent I pass all the parameters in the options with the same property name as for the tls.createSecureContext: 'secureProtocol', 'maxVersion', minVersion', ciphers', dhparam'.

Is it in the options that you have to give it to the agent creation? Do you have an example that works?

Thank you in advance.

@szmarczak
Copy link
Owner

Is it in the options that you have to give it to the agent creation?

Agent accepts only SETTINGS from the connection options. Other connection options such as the TLS one are accepted via http2.request or http2.auto. From the docs:

Note: this is not compatible with the classic http.Agent.

@szmarczak szmarczak added enhancement New feature or request help wanted Extra attention is needed labels Aug 27, 2021
@szmarczak szmarczak changed the title Options createSecureContext (ciphers,....) Pass socket connection options in Agent Aug 27, 2021
@gagni
Copy link
Author

gagni commented Aug 27, 2021

So if we want to make an http2 request with a proxy is it possible ? and if it's possible, do you have an example how to do it?

@szmarczak
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants