Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
connect to MongoDB by using a SOCKS5 Proxy. To learn how to use a SOCKS5 proxy
connect to MongoDB by using a SOCKS5 proxy. To learn how to use a SOCKS5 proxy

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NathanQingyangXu thanks! If all looks good, can you approve the PR?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

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