TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
872 stars 229 forks source link

[agent-base] Allow for never relying on stack trace #170

Closed TooTallNate closed 1 year ago

TooTallNate commented 1 year ago

During an HTTP request, if opts.protocol is set, then use that to determine the secureEndpoint value. Coupling that with an explicitly set agent.protocol in the instance (essentially "locking" it for use with either http or https module), then the agent will never rely on the stack trace. By default it will still rely on the stack trace to allow for agent instances to be used with either http or https modules.

Also moved the internal props to an object using a symbol, instead of relying on underscore props.

Fixes #158.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: b2df98cc78d9bbfb16482c04c02bafc488253858

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------- | ----- | | agent-base | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview May 15, 2023 9:09pm