-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support got agent option #39
base: main
Are you sure you want to change the base?
Conversation
I'm interested in taking this. Can you please write a test for this? Please add yourself to the contributors section in |
pkg/dohdec/lib/doh.js
Outdated
@@ -55,6 +55,8 @@ export class DNSoverHTTPS extends DNSutils { | |||
* @param {Writable} [opts.verboseStream=process.stderr] Where to write | |||
* verbose output. | |||
* @param {boolean} [opts.http2=false] Use http/2 if it is available. | |||
* GOT Agent objects | |||
* @param {object} [opts.agent=Agent] Pass down got agent option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param {object} [opts.agent=Agent] Pass down got agent option | |
* @param {object} [opts.agent=Agents] Pass down got agent option |
just to match the real type name
Hello, |
8c216fc
to
69171f7
Compare
69171f7
to
ab665d2
Compare
@@ -55,6 +55,8 @@ export class DNSoverHTTPS extends DNSutils { | |||
* @param {Writable} [opts.verboseStream=process.stderr] Where to write | |||
* verbose output. | |||
* @param {boolean} [opts.http2=false] Use http/2 if it is available. | |||
* GOT Agent objects | |||
* @param {object} [opts.agent=Agents] Pass down got agent option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be @param {got.Agents|false} [opts.agent=false]
?
I don't think we need an end-to-end proxy test. It would be enough to do a simple pass-through Agent like: class TestAgent extends http.Agent {
constructor(options) {
super(options)
this.called = 0
}
createConnection(options, listener) {
this.called++
super.createConnection(options, listener)
}
} then assert that called has the correct value. |
It seems that i can't just pass the agent, my guess is that |
Hey, @hildjj can you help with the tests? Indeed it seems that Probably using Thanks! |
I'm not going to take this for the release I'm working on right now. After I get the release out, we can rebase this and see if we can figure out a way to test it. Dropping got in favor of the built-in fetch implementation is probably correct, but that moves us to requiring node 20+, which I'm not quite ready to do. |
ok, if you'd be willing to rebase this without adding anything else, I'm ready to work on getting it tested. |
Hello,
We want to be able to use a proxy so it will be nice to be able to pass the Agent option of GOT.