Skip to content

Commit

Permalink
Merge pull request #191 from PBH-BTN/master
Browse files Browse the repository at this point in the history
4.2.3
  • Loading branch information
Ghost-chu authored Jun 26, 2024
2 parents 683d496 + 05a91ea commit 4c4f04f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ghostchu.peerbanhelper</groupId>
<artifactId>peerbanhelper</artifactId>
<version>4.2.2</version>
<version>4.2.3</version>
<packaging>takari-jar</packaging>

<name>PeerBanHelper</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ private void save(Context ctx, String ruleId, boolean isAdd) throws SQLException
}
ctx.status(HttpStatus.BAD_REQUEST);
ctx.json(new SlimMsg(false, Lang.IP_BAN_RULE_URL_WRONG.replace("{}", ruleName), HttpStatus.BAD_REQUEST.getCode()));
log.warn("Unable to retrieve the sub from given URL", e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public IPMatcher(String ruleId, String ruleName, List<IPAddress> ruleData) {
* @param ruleData 规则数据
*/
public void setData(String ruleName, List<IPAddress> ruleData) {
setRuleName(ruleName);
this.ips = new ArrayList<>();
this.subnets = new ArrayList<>();
ruleData.forEach(ipAddress -> {
Expand Down
15 changes: 11 additions & 4 deletions src/main/resources/profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,23 @@ module:
# 规则ID(任意)
dt_torrents:
# 是否启用
enabled: false
enabled: true
# 显示名称
name: dt_torrents_示例规则
# 规则文件订阅地址
url: https://raw.githubusercontent.com/PBH-BTN/BTN-Collected-Rules/main/dt_torrent.txt
url: https://cdn.jsdelivr.net/gh/PBH-BTN/BTN-Collected-Rules@master/dt_torrent.txt
# 规则ID(任意)
hp_torrents:
# 是否启用
enabled: false
enabled: true
# 显示名称
name: hp_torrents_示例规则
# 规则文件订阅地址
url: https://raw.githubusercontent.com/PBH-BTN/BTN-Collected-Rules/main/hp_torrent.txt
url: https://cdn.jsdelivr.net/gh/PBH-BTN/BTN-Collected-Rules@master/hp_torrent.txt
multi-dial:
# 是否启用
enabled: true
# 显示名称
name: dt_torrents_示例规则
# 规则文件订阅地址
url: https://cdn.jsdelivr.net/gh/PBH-BTN/BTN-Collected-Rules@master/multi-dial.txt

0 comments on commit 4c4f04f

Please sign in to comment.