Missing Proxy Connection Settings in Java Drivers

Hi MongoDB Community,

I would be grateful for any help in clarifying why the MongoDB connection settings to connect via a Socks5 Proxy (“proxyHost” and “proxyPort”) are seemingly not available in the MongoDB java drivers. Also if there may be any known plans to add these settings?

The according connection settings can be found here:

But the settings are missing in the latest java drivers:

  • Connection Options — Java Sync
    (hyperlink removed because of the limit of 3 per post of new users)

This would be required to connect to a MongoDB ReplicaSet behind a Firewall, that can only be accessed through a tunneling service that acts as Socks5 proxy.

Thank you in advance and kr,
Jan

FYI I got the following answer from MongoDB support:

No; unfortunately, the options are not yet available in the Java driver.

Yes, there are plans to implement the options in the Java driver, but at this moment there is no estimated data we may provide. Once the feature is available, you would be able to see the details in the Java driver documentation page. Additionally, you may follow any public progress details looking at the ticket JAVA-4347.

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

Hi all,

Just to provide an update on this, now you can connect to MongoDB by using a SOCKS5 proxy. (SOCKS5 is a standardized protocol for communicating with network services through a proxy server).

Please see the following guide for Java Sync driver:

See also Blog post: Connection to MongoDB With Java And SOCKS5 Proxy for more information

Regards,
Wan

1 Like