feat: 添加网络监控URL白名单

Signed-off-by: 502647092 <admin@yumc.pw>
dev 2.3
502647092 2016-06-29 20:38:51 +08:00
parent 1c3da1f010
commit 4ef3f38624
4 changed files with 19 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pw.yumc</groupId>
<artifactId>Yum</artifactId>
<version>2.2</version>
<version>2.3</version>
<name>Yum</name>
<description>Minecraft 服务器插件管理系统</description>
<build>
@ -58,12 +58,12 @@
<url>http://ci.yumc.pw/job/${project.artifactId}/</url>
</ciManagement>
<properties>
<update.description>&amp;a全新 2.2 版本 添加线程安全管理</update.description>
<update.description>&amp;a全新 2.X 版本 更多守护与优化</update.description>
<update.changes>
&amp;b2.2 &amp;6- &amp;e新增线程安全拦截 主线程IO拦截...;
&amp;b2.3 &amp;6- &amp;a网络监控添加域名白名单功能...;
&amp;b2.2 &amp;6- &amp;b新增线程安全拦截 主线程IO拦截...;
&amp;b2.1 &amp;6- &amp;e新增网络管理 防止主线程卡IO...;
&amp;b &amp;6- &amp;d新增安全管理系统(需要&amp;dbBukkitInjectedTools&amp;d)...;
&amp;b2.0.3 &amp;6- &amp;a重载所有插件时忽略部分已注册服务插件...;
</update.changes>
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -36,6 +36,9 @@ public class PluginNetworkListener implements Listener {
if (urlinfo.startsWith("socket")) {
return;
}
if (ConfigManager.i().getNetworkWhiteURL().contains(e.getUrl().getHost())) {
return;
}
if (urlinfo.contains("yumc") || urlinfo.contains("502647092")) {
final String = "反编译的大神们我知道你们又要说了这货有后门";
.isEmpty();

View File

@ -46,6 +46,10 @@ public class ConfigManager {
return network.getStringList(IGNORE);
}
public List<String> getNetworkWhiteURL() {
return network.getStringList("WhiteURL");
}
public List<String> getSetOpBlackList() {
return setop.getStringList(BLACK);
}

View File

@ -1,5 +1,5 @@
#配置版本号 请勿修改!!!
Version: 1.1
Version: 1.2
#是否开启
Enable: true
@ -15,4 +15,10 @@ Black:
- FeatherBoard
#忽略检测列表
Ignore:
- Essentials
- Essentials
#白名单域名(例如: http://report.mcstats.org/plugin/Vault 只需要填写 report.mcstats.org 即可)
WhiteURL:
- mcstats.org
- report.mcstats.org
- www.spigotmc.org
- dev.bukkit.org