typegoose / typegoose/mongodb-memory-server

Add support for no_proxy / NO_PROXY

Open
#737 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature help wanted
Dominant language
TypeScript
Stars
2.8k
Forks
191
Avg merge
4h 25m
Merged PRs (30d)
10

Description

I am currently blocked from using this package due to the lack of support for NO_PROXY.

Here is my scenario:

  • I am working behind a corporate proxy and have HTTP_PROXY set as proxy.company-subdomain.com:8080
  • I am required to download mongodb from an internal mirror at https://mirror.company-subdomain.com/mongodb-linux[...]
  • Internal URLs should not be called through the proxy, so I have NO_PROXY set to .company-subdomain,localhost
  • Calling internal URLs through the proxy will always result in a BAD_GATEWAY error

I'd like to see support for NO_PROXY in this package. It looks like it would involve updating MongoBinaryDownload#download such that it resolves the proxy similar to request's getProxyFromUri, which returns null if the URL is included in the NO_PROXY variable.

Let me know if you are willing to support this and I would be happy to open a pull request.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts at MongoBinaryDownload#download, then compare the referenced request getProxyFromUri implementation. Verify how proxy settings are resolved, and consider the issue complete when URLs matching NO_PROXY bypass the configured proxy while other downloads still use it.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.