Why are Proxy Options not enabled for Mongodb-Shell?

I noticed that the options for using a SOCKS proxy that exist in “node-mongodb-native”, which the CLI-Repl seems to use under the hood, are not enabled in the cli argument mapping (see packages/cli-repl/src/arg-mapper.ts).

I was curious what the reason for this is and if you intend to enable theese in the future?

Hi @Jan_Schwalbe!

We’re not currently planning to add support for every driver option in the form of a CLI argument. mongosh’s CLI options generally fall into these categories:

  • Options that cannot be represented in a MongoDB connection string
  • Options that are required for compatibility with legacy shell versions
  • Options that are used frequently with mongosh

In particular, the proxy options can be represented with a MongoDB connection string (i.e. mongosh "mongodb://localhost:12345/?proxyHost=localhost&proxyPort=1080" works), and we don’t expect users to make frequent use of them in combination with mongosh, since as a command-line tool mongosh can also be run on the proxy server itself (which we assume would cover the most common use cases).

If you do feel strongly about this, feel free to bring this up in our feature request tracker: MongoDB Shell: Top (16 ideas) – MongoDB Feedback Engine


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.