mongodb / mongo-rust-driver

The official MongoDB Rust Driver
https://mongodb.github.io/mongo-rust-driver/manual
Apache License 2.0
1.4k stars 154 forks source link

SOCKS5 support #1007

Open mjgarton opened 5 months ago

mjgarton commented 5 months ago

As far as I can tell, there's no way to connect to a mongodb server via a SOCKS5 proxy.

Are you interested in such a feature?

I can see at least a couple of possible ways to support this:

1) Add explict SOCKS5 support (as an optional feature), which would likely introduce a (optional) dependency on some external socks client implementation.

2) Add support for providing a custom tcp "connect" function in some form in the options. This would not add any dependency, but would still allow users to easily hook in a SOCKS5 proxy, and probably other things too.

If you are interested, I am happy to have a go at implementing one of the above.

abr-egn commented 3 months ago

Hi! Sorry for the long delay.

We do have a backlogged ticket for implementing this in the Rust driver, and an associated specification. Unfortunately, implementing this isn't in our current roadmap - we'd welcome a contributed implementation! As I understand it, this would look like option 1 from your proposal, with a feature flag gating support and any dependencies it needs.