HOSTNAME CATCHER
Hostname Catcher 是一款轻量级的 Fabric 模组,专为专用服务器设计。通过该模组,你可以设置一个允许使用的域名列表,用于玩家加入服务器时的验证。
此模组非常适合希望确保玩家使用正确的域名连接至你的服务器、并防止陌生人通过服务器扫描器随机加入的服务器管理员。
当白名单为空时,服务器仍会记录玩家群体在加入时使用的是什么类型的域名或服务器 IP 地址。
依赖项
本模组仅依赖 Fabric API。
安装方法
- 停止你的服务器
- 下载模组并将其与 Fabric API 一同放入
mods 文件夹中。
- 启动服务器以生成默认配置文件。
- 编辑该文件后重启服务器。
默认配置文件(config.yml)
# 列出的域名允许连接,其他请求将被阻止。
# 如果白名单为空,则允许任何连接。
# 支持通配符。
allowed-domains:
- localhost
- 127.0.0.1
- *.example.com
工作原理
情况 1:白名单中的主机名/域名
当你的配置文件如下所示时:
allowed-domains:
- mc.server.com
- server.com
若 Player_A 使用上述任一主机名加入,他们将成功加入。若 Player_B 尝试使用你的服务器 IP 地址(如 "192.168.5.64")而非白名单中的主机名加入,他们将被断开连接。
情况 2:空白的白名单
当 allowed-domains 为空时,任何用户都可以使用任意主机名或 IP 地址加入,但服务器会显示玩家实际使用的主机名。
HOSTNAME CATCHER
Hostname Catcher is a lightweight Fabric Mod for Dedicated Servers. In this mod you can set a list of allowed hostnames to use when joining your server.
This mod is perfect for any server owner that wants to ensure players joins using the right hostname to their server and avoid random people joining via server scanners.
When such whitelist is empty, your server will still log what kind of hostnames or even your server IP address is used by your player base to join.
Dependencies
This mod only depends on the Fabric API
Installation
- Stop your server
- Download the mod and place it in your
mods folder along side with Fabric API.
- Start your server to generate the default config file.
- Edit the file and restart your server.
Default Configuration File (config.yml )
# Listed domains are allowed to connect, other requests will be blocked.
# If the whitelist is empty, then any connection will be allowed.
# Wildcard supported.
allowed-domains:
- localhost
- 127.0.0.1
- *.example.com
How it works
Case 1: Whitelisted hostnames/domains
When your config file looks like this:
allowed-domains:
- mc.server.com
- server.com
When Player_A joins using any of those hostnames, they will join. When Player_B tries to join using your server IP address like "192.168.5.64" instead of such whitelisted hostnames, they will get disconnected.
Case 2: Empty whitelist
When allowed-domains is empty, any user will be able to join using any hostname or the ip address, but the server will show what hostname used a player.
评论 0
登录后参与评分
还没有评论,来抢沙发吧