Docs Home / Compass / Customize

Block Outgoing Network Connections阻止传出网络连接

You can configure MongoDB Compass to not perform outgoing network operations other than those to the database. This lets you configure any edition of Compass to restrict outgoing connections in the same way Compass Isolated Edition restricts connections.您可以将MongoDB Compass配置为不执行除数据库外的传出网络操作。这允许您配置任何版本的Compass,以限制传出连接,就像Compass隔离版限制连接一样。

Warning

When you block outgoing network connections, Compass can't use third-party mapping services in schema visualizations.当您阻止传出的网络连接时,Compass无法在模式可视化中使用第三方映射服务。

Procedure过程

To block outgoing network operations, disable the networkTraffic configuration option. You can set configuration options in either a command line option or configuration file option.要阻止传出网络操作,请禁用networkTraffic配置选项。您可以在命令行选项或配置文件选项中设置配置选项。

Command Line Example命令行示例

The following command starts MongoDB Compass from the command line and sets the --no-networkTraffic option:以下命令从命令行启动MongoDB Compass并设置--no-networkTraffic选项:

<path-to-Compass-executable> --no-networkTraffic

Note

The name and filepath of the Compass executable depend on your operating system.Compass可执行文件的名称和文件路径取决于您的操作系统。

Configuration File Example配置文件示例

You can specify the Compass configuration file in either EJSON or YAML format. The following configurations set the networkTraffic option to false:您可以以EJSON或YAML格式指定Compass配置文件。以下配置将networkTraffic选项设置为false

EJSON

{ "networkTraffic": false }

YAML

networkTraffic: false

Learn More了解更多

To learn more about the MongoDB Compass configuration file, see Configuration File Settings.要了解有关MongoDB Compass配置文件的更多信息,请参阅配置文件设置