Mongosh connection string thourgh proxy
Greetings,
I need to create a proxy host in my environment so that ALL traffic between client <->Mongo Atlas goes through ONE single host.
Problem is that if I use mongodb+srv://server.example.com/
It returns me one of 50 endpoints to my Atlas cluster.
I need something like: connect to this cluster, BUT use this proxy hop server.
1
vote
Tomasz
shared this idea
-
AdminMassimiliano (Admin, MongoDB) commented
This should work in mongosh 1.1.8+, which uses the Node.js driver 4.3.0 that includes support for connecting through SOCKS5 proxies (https://github.com/mongodb/node-mongodb-native/releases/tag/v4.3.0 ).
The SOCKS5 options can be configured via the `proxyHost`, `proxyPort`, `proxyPassword` and `proxyUsername` options in the connection string.
(Edited by admin)