Skip to content

DOCSP-47271 Mention SOCKS5 Proxy Guide #645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions source/connection/connection-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,40 @@ parameters of the connection URI to specify the behavior of the client.

| **Default**: ``mongodb``

* - **proxyHost**
- string
- Specifies the SOCKS5 proxy IPv4 address, IPv6 address, or hostname.
You must provide this value to connect to a SOCKS5 proxy.

| To learn how to connect to a SOCKS5 proxy, see the :ref:`Connect to
MongoDB by Using a SOCKS5 Proxy <java-connect-socks>` guide.

| **Default**: ``null``

* - **proxyPort**
- non-negative integer
- Specifies the TCP port number of the SOCKS5 proxy server.

| **Default**: ``1080`` when you set ``proxyHost``

* - **proxyUsername**
- string
- Specifies the username for authentication to the SOCKS5 proxy server.
The driver ignores ``null`` and empty string values for this setting.
The driver requires that you pass values for both ``proxyUsername``
and ``proxyPassword`` or that you omit both values.

| **Default**: ``null``

* - **proxyPassword**
- string
- Specifies the password for authentication to the SOCKS5 proxy server.
The driver ignores ``null`` and empty string values for this setting.
The driver requires that you pass values for both ``proxyUsername``
and ``proxyPassword`` or that you omit both values.

| **Default**: ``null``

For a complete list of options, see the
`ConnectionString <{+api+}/apidocs/mongodb-driver-core/com/mongodb/ConnectionString.html>`__
API documentation.
7 changes: 7 additions & 0 deletions source/connection/mongoclientsettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,13 @@ to modify the driver's behavior:
|
| **Default**: The operating system default

.. note:: Connect to MongoDB by using a SOCKS5 Proxy

You can chain the ``applyToProxySettings()`` method to your socket settings to
connect to MongoDB by using a SOCKS5 proxy. To learn how to use a SOCKS5 proxy
and set proxy settings, see the :ref:`Connect to MongoDB by Using a SOCKS5 Proxy
<java-connect-socks>` guide.

.. _java-socketsettings-example:

Example
Expand Down
Loading