IPLogin
IPLogin 是一个插件,允许服务器管理员根据 IP 地址限制对服务器的访问。此插件适用于 PaperMC 及其分支版本,但不支持 Spigot 或 CraftBukkit。你为什么要用它们呢?
重要提示
-
如果你正在升级到 IPLogin 2.7,你需要手动将数据从 name-to-ip-map.txt 迁移到 name-to-ip.yml。为此,必须在 : 和 IP 地址之间添加一个空格。
-
如果你是从 2.7 升级到 IPLogin 2.8,在启动带有该插件的服务器之前,你需要删除 config.yml 文件。
-
如果你是从任何早于 2.7 的版本升级到 IPLogin 2.8,你需要同时执行步骤 2 和步骤 1。
示例:
将 Player:127.0.0.1 改为 Player: 127.0.0.1
功能
- 基于 IP 地址或用户名限制服务器访问
- 允许特定 IP 地址绕过限制
- 易于设置和配置
- 自定义玩家日志
快速开始
要使用 IPLogin,只需下载并安装与你 PaperMC 服务器版本对应的 IPLogin 版本。建议安装最新版本的 IPLogin。
当玩家首次加入服务器时,其 IP 将与他们的用户名关联。此后,插件将检查所有使用该玩家用户名的用户,看其是否与存储的 IP 匹配。
默认情况下,IPLogin 会踢出所有在 name-to-ip.yml 文件中没有匹配 IP 地址的玩家。你可以在玩家名称旁边添加 * 以允许他们通过任意 IP 访问服务器。这对于拥有动态 IP 或经常从其他地点登录的用户非常有用。
示例:
Player: *
Player: 127.0.0.1
命令
/allowalts 显示 allow-alts 的值
/allowalts <true/false> 更改 allow-alts 的值,需要操作员权限
/setip <newip> 更改你的 IP,发送者必须是玩家
/setip <player> <newip> 更改某人的 IP,需要操作员权限
我可能不会为配置中的每个选项都制作命令,但如果你希望有这个功能,请告诉我!
配置
安装插件后,你可以通过编辑位于 plugins/IPLogin 中的 config.yml 文件来进行配置。文件内容应如下所示:
logger:
basic: true
custom: true
name-filter:
enabled: false
ban: false
message: Your name is not allowed on this server.
mode: 1
filter:
- example
exceptions:
- example2
allow-alts: false
ban-alts: false
alts-message: Alts are not allowed.
ban-impersonators: false
impersonators-message: Impersonators are not allowed.
welcome-back-message: 'Welcome back, '
welcome-message: 'Welcome, '
在这里你可以更改关于小号和冒充者的消息,你可以让插件踢出或封禁冒充者,或者踢出或封禁小号,甚至允许小号存在。
用户名过滤器有 2 种模式:第一种模式会在用户名包含确切过滤词时踢出/封禁玩家;第二种模式会在小写后的用户名与过滤词匹配时踢出/封禁他们。你可以将特定的用户名添加到例外列表中。
示例
模式:1
过滤词:example1, example2
例外列表:myexample1, myexample2
被踢出/封禁的玩家:Notexample1, Theexample2, example12, myexample1, myexample2
未被踢出/封禁的玩家:Example1, Example2, exAmple21
模式:2
过滤词:example1, example2
例外列表:MyExample1, MyExample2
被踢出/封禁的玩家:Notexample1, Theexample2, example12, Example1, Example2, exAmple21, MyExample1, MyExample2
未被踢出/封禁的玩家:3xample1, Ex4mple2, exAmpl321
基本记录器会在聊天中宣布封禁/踢出信息,而自定义记录器会将它们保存到 log.yml 中,其中存储了用户名、时间、IP、原因、类型以及如果是小号则该 IP 的所有者。
示例
example:
23/06/1940 12:00:00:
IP: 127.0.0.1
Reason: Impersonator
Type: Kick
example2:
23/06/1940 12:00:00:
IP: 127.0.0.1
Reason: Username filter
Type: Kick
example3:
23/06/1940 12:00:00:
IP: 127.0.0.1
Reason: Alt
Type: Kick
Owner(s):
- example0
安全性
IPLogin 提供了一种简单有效的方法来根据 IP 地址限制服务器访问。但是,请记住 IP 地址很容易被更改。例如,有人可以使用 免费 VPN 将他们的 IP 更改为随机 IP。因此,不应将 IPLogin 作为保护服务器的唯一手段,你还应该配备版主(Moderators)。
支持
如果你对 IPLogin 有任何问题或疑问,可以使用 GitHub 上的 问题追踪器。
致谢
IPLogin 由 TheOnlySD12 开发,并根据 MIT 许可证 授权。特别感谢以下人员对项目做出的贡献:
- Me (代码审查)
- Myself (创意)
- I (测试)
我希望你喜欢使用 IPLogin!如有任何反馈或建议,请随时使用 问题追踪器。
IPLogin
IPLogin is plugin that allows server owners to restrict access to their servers based on IP address. This plugin will work with PaperMC and PaperMC forks, but won't work with Spigot or CraftBukkit. Why are you using them anyway?
Important Notice
-
If you are updating to IPLogin 2.7 you will need to manually transfer the data from name-to-ip-map.txt to name-to-ip.yml. To do this you must add a space between the : and the IP.
-
If you are updating to IPLogin 2.8 from 2.7 you will need to delete the config.yml file before starting the server with the plugin.
-
If you are updating to IPLogin 2.8 from any version older than 2.7 you will need to do both steps 2 and 1.
Example:
Turn Player:127.0.0.1 into Player: 127.0.0.1
Features
- Restrict server access based on IP address or username
- Ban/Kick alts or impersonators or users with a certain username
- Option to allow specific IP addresses to bypass the restriction
- Players with a dynamic IP
- Players that often login from other locations
- Easy setup and configuration
- Custom player log
Getting Started
To use IPLogin, simply download and install the version of IPLogin for your PaperMC server's version. It is recommended to install the latest version of IPLogin.
When a player first joins the server, their IP will be associated with their username. From now on, the plugin will check anyone with that player's username to see if they match the stored IP.
By default, IPLogin will kick all players who do not have a matching IP address in the name-to-ip.yml file. You can add an * next to a player's name to allow them to access the server with any IP. This is useful when someone has a dynamic IP or often logs in from other locations.
Example:
Player: *
Player: 127.0.0.1
Commands
/allowalts prints a message with the value of allow-alts
/allowalts <true/false> to change the value of allow-alts, needs operator
/setip <newip> to change your IP, sender needs to be a player
/setip <player> <newip> to change someone's IP, needs operator
I probably won't make a command for every option in the config, but be sure to let me know if you would like that feature!
Configuration
Once you've installed the plugin, you can configure it by editing the config.yml file, which is located in plugins/IPLogin. The file should look like this:
logger:
basic: true
custom: true
name-filter:
enabled: false
ban: false
message: Your name is not allowed on this server.
mode: 1
filter:
- example
exceptions:
- example2
allow-alts: false
ban-alts: false
alts-message: Alts are not allowed.
ban-impersonators: false
impersonators-message: Impersonators are not allowed.
welcome-back-message: 'Welcome back, '
welcome-message: 'Welcome, '
Here you can change the messages for alts and impersonators, you can make the plugin kick or ban impersonators or kick or ban alts, you can even allow alts.
The username filter has 2 modes: the first one kicks/bans the player if their username contains the exact filter and the second one kicks/bans them if their username in lower case matches the filter. You can add specific usernames to the exceptions list.
Example
Mode: 1
Filter: example1, example2
Exceptions: myexample1, myexample2
Players that get kicked/banned : Notexample1, Theexample2, example12, myexample1, myexample2
Players that don't get kicked/banned: Example1, Example2, exAmple21
Mode: 2
Filter: example1, example2
Exceptions: MyExample1, MyExample2
Players that get kicked/banned : Notexample1, Theexample2, example12, Example1, Example2, exAmple21, MyExample1, MyExample2
Players that don't get kicked/banned: 3xample1, Ex4mple2, exAmpl321
The basic logger announces bans/kicks in chat and the custom logger saves them to log.yml where it stores the username, time, IP, reason, type and if the player is an alt the owner of the IP.
Example
example:
23/06/1940 12:00:00:
IP: 127.0.0.1
Reason: Impersonator
Type: Kick
example2:
23/06/1940 12:00:00:
IP: 127.0.0.1
Reason: Username filter
Type: Kick
example3:
23/06/1940 12:00:00:
IP: 127.0.0.1
Reason: Alt
Type: Kick
Owner(s):
- example0
Security
IPLogin provides a simple and effective way to restrict server access based on IP address. However, it is important to remember that IP addresses can be easily changed. For example, someone can use a free VPN to change their IP to a random one. Therefore, IPLogin should not be relied upon as the sole method of securing your server, you should also have moderators.
Support
If you have any questions or issues with IPLogin, you can use the issue tracker on GitHub.
Credits
IPLogin was developed by TheOnlySD12 and is licensed under the MIT License. Special thanks to the following people for their contributions to the project:
- Me (Code Review)
- Myself (Ideas)
- I (Testing)
I hope you enjoy using IPLogin! Please don't hesitate to use the issue tracker if you have any feedback or suggestions.
评论 0
登录后参与评分
还没有评论,来抢沙发吧