Block Outgoing Network Connections阻止传出网络连接
On this page本页内容
You can configure MongoDB Compass to not perform outgoing network operations other than those to the database. 您可以将MongoDB Compass配置为不执行对数据库以外的传出网络操作。This lets you configure any edition of Compass to restrict outgoing connections in the same way Compass Isolated Edition restricts connections.这使您可以将任何版本的Compass配置为限制传出连接,就像Compass独立版限制连接一样。
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. networkTraffic
配置选项。You can set configuration options in either a command line option or configuration file option.您可以在命令行选项或配置文件选项中设置配置选项。
Command Line Example命令行示例
The following command starts MongoDB Compass from the command line and sets the 以下命令从命令行启动MongoDB Compass,并设置--no-networkTraffic
option:--no-networkTraffic
选项:
<path-to-Compass-executable> --no-networkTraffic
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. 您可以以EJSON或YAML格式指定Compass配置文件。The following configurations set the 以下配置将networkTraffic
option to false
: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配置文件的更多信息,请参阅配置文件设置。