网络拦截器

网络拦截器

阻止不需要的网络连接

工具

Network Blocker

概述

Network Blocker 是一个实用模组,允许你阻止不需要的网络连接。

默认情况下,仅允许连接到 Minecraft 服务,这些连接是身份验证等所必需的。IP 连接也被允许,但可以在配置文件中更改。通过观察日志,你可以了解哪些连接被阻止。

该模组目前处于测试阶段。可能存在它无法检测和阻止的连接,因此不应将其视为针对恶意模组的全面安全措施。

配置

你可以在 config/networkblocker/config.toml 中找到主配置文件:

#When enabled, connections that are permitted will be logged
logPermitted = false
#When enabled, connections that are blocked will be logged
logBlocked = true
#When enabled, stacktrace will be logged
logStacktrace = false
#When enabled, direct IP connections will be allowed even if they are not in the whitelist
allowIP = true
#Set to true to add some useful domains to the whitelist. The current defaults are:
#
#minecraft.net
#minecraftservices.com
#minecraft-services.net
#mojang.com
#
#You can add additional domains to the whitelist using the file in the config folder.
useDefaultWhitelist = true
#Specifies the method used to block network connection. Valid values:
#REDIRECT: redirect addresses to 0.0.0.0
#THROW: throw an exception
blockMethod = "REDIRECT"

你可以在 config/networkblocker/whitelist.txt 中将域名添加到白名单:

# Add additional domains to whitelist in this file, one per line
# Lines starting with # will be ignored.
#
# Example:
minecraft.net