Network Blocker
概述
Network Blocker 是一款实用模组,允许你阻止不需要的网络连接。
默认情况下,该模组允许由原版 Minecraft 发起的连接,这些连接对于身份验证等功能是必要的。由模组发起的网络连接在默认情况下会被阻止。
虽然默认策略是阻止所有非原版的连接,但该模组也支持黑名单模式。当你只想阻止特定的连接(按域名或尝试连接的模组进行过滤)时,这种模式非常有用。
配置
你可以在 config/networkblocker/config.toml 中找到主配置文件:
#当启用时,允许的连接将被记录日志
logPermitted = false
#当启用时,被阻止的连接将被记录日志
logBlocked = true
#当启用时,将记录堆栈跟踪信息
logStacktrace = false
#当启用时,即使直接 IP 连接不在白名单中,也将允许其通过
allowIP = true
#当启用时,将白名单视为黑名单。这意味着所有连接默认都是允许的,只有连接到指定域名或由指定模组尝试的连接才会被阻止。
#当你只想阻止导致问题的特定连接时,这非常有用。
blacklistMode = false
#指定用于阻止网络连接的方法。有效值:
#DEFAULT: 使用默认的阻止方法 (THROW)
#REDIRECT: 将地址重定向到 0.0.0.0
#THROW: 抛出异常
blockingMethod = "DEFAULT"
你可以在 config/networkblocker/whitelist.txt 中添加域名或模组到白名单:
# 在此文件中添加额外的域名/模组到白名单,每行一个
# 以 # 开头的行将被忽略。(可用作注释!)
# 以 = 开头的行被视为模组 ID。
# 其他行被视为域名。
# 以下默认设置允许任何模组连接 *.minecraft.net,以及原版游戏发起的任何连接。
minecraft.net
=minecraft
当启用 logPermitted 或 logBlocked 时,会记录详细信息,这有助于监控网络连接并告诉你每个连接是由哪个模组尝试的:
[Network Blocker/]: Blocked connection to example.com:443, attempted by mod some_awesome_mod
[Network Blocker/]: Permitted connection to api.minecraftservices.com:443, attempted by mod minecraft
服务端要求
该模组没有严格的服务端要求。这意味着可以在客户端安装该模组,而专用服务器上无需安装,反之亦然。网络阻止功能将在安装了该模组的服务端上生效。
Network Blocker
Overview
Network Blocker is a utility mod that allows you to block unwanted network connection.
By default, this mod permits connections made by vanilla Minecraft, which are necessary for authentication, etc. Network connections made by mods are blocked by default.
While the default is to block all non-vanilla connections, there is also a blacklist mode. This is useful when you want to block only specific connections, filtering by either domain name or the mod that attempted the connection.
Configuration
You can find the main configuration file in 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
#When enabled, treat the whitelist as blacklist. This means all connections are allowed by default, and only connections to the specified domains or attempted by specified mods will be blocked.
#This is useful when you want to only block specific connections that are causing issues.
blacklistMode = false
#Specifies the method used to block network connection. Valid values:
#DEFAULT: use the default blocking method (THROW)
#REDIRECT: redirect addresses to 0.0.0.0
#THROW: throw an exception
blockingMethod = "DEFAULT"
You can add domains or mods to the whitelist in config/networkblocker/whitelist.txt:
# Add additional domains/mods to the whitelist in this file, one per line
# Lines starting with # are ignored. (use them as comments!)
# Lines starting with = are treated as modid's.
# Other lines are treated as domain names.
# The following default allows connection by any mod to *.minecraft.net, as well as any connection made by vanilla game.
minecraft.net
=minecraft
When logPermitted or logBlocked is enabled, detailed information is logged, which helps monitor network connection and tells you the mod that attempted each connection:
[Network Blocker/]: Blocked connection to example.com:443, attempted by mod some_awesome_mod
[Network Blocker/]: Permitted connection to api.minecraftservices.com:443, attempted by mod minecraft
Side Requirement
This mod does not have strict side requirements. This means it is possible to install the mod on the client-side without it being present on the dedicated server, and vice versa. Network blocking will work on the side(s) with the mod installed.
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Network Blocker
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
这是 Network Blocker 的一次重大更新,带来了大量增强功能。现在可以通过黑名单模式阻止特定连接,支持按主机名或发起连接的模组进行过滤。
如果您曾修改过配置文件,建议删除旧配置文件,或在白名单中手动添加 =minecraft,以确保游戏能够发起必要的网络请求。
- 新增按模组 ID(modid)过滤网络请求的功能
- 新增黑名单模式
- 移除
useDefaultWhitelist选项(新的默认白名单文件已允许原版游戏发起的连接)- 此为破坏性更改:若使用白名单模式,请确保在白名单中添加
=minecraft,以保证游戏仍能正常发起网络请求
- 此为破坏性更改:若使用白名单模式,请确保在白名单中添加
- 实现
EarlyBootstrapper以兼容 26.3-neoforge - 新增
bannerFile和iconFile以兼容 NeoForge 新版本 - 修复
blockingMethod的默认值 - 将
allowIP的默认值更改为false - 更新内置依赖
- 修复了在 Forge 上 JiJ 的兼容性问题(懒加载兼容性)
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧