summaryrefslogtreecommitdiff
path: root/config-example.json
diff options
context:
space:
mode:
authorLoyalsoldier <[email protected]>2024-08-06 04:48:42 +0800
committerLoyalsoldier <[email protected]>2024-08-06 04:48:42 +0800
commitb5b24293ef86fd00d2673b1133b853a511ef9211 (patch)
tree5c9019c9e6f840a5d251f3afd53aa44efedbf14f /config-example.json
parentee3687e191acbde3aabc13cf4f5dca93a3d80af5 (diff)
Feat: support extended text format with prefix & suffix in line as input
IP and CIDR with prefix and suffix in one line now can be processed by using `text` format as input, specified by args `removePrefixesInLine` and `removeSuffixesInLine`.
Diffstat (limited to 'config-example.json')
-rw-r--r--config-example.json33
1 files changed, 33 insertions, 0 deletions
diff --git a/config-example.json b/config-example.json
index 253d1746..d4e02631 100644
--- a/config-example.json
+++ b/config-example.json
@@ -108,6 +108,19 @@
"type": "text",
"action": "add",
"args": {
+ "inputDir": "./data",
+ "onlyIPType": "ipv4",
+ "removePrefixesInLine": [
+ "iptables -A INPUT -s",
+ "iptables -A INPUT -d"
+ ],
+ "removeSuffixesInLine": ["-j ACCEPT", "-j DROP"]
+ }
+ },
+ {
+ "type": "text",
+ "action": "add",
+ "args": {
"name": "mylist",
"uri": "./an/example/dir/mycidr.txt",
"onlyIPType": "ipv6"
@@ -117,6 +130,26 @@
"type": "text",
"action": "add",
"args": {
+ "name": "mylist",
+ "uri": "./an/example/dir/mycidr.txt",
+ "onlyIPType": "ipv6",
+ "removePrefixesInLine": ["allow from", "deny from"]
+ }
+ },
+ {
+ "type": "text",
+ "action": "add",
+ "args": {
+ "name": "mylist",
+ "uri": "./an/example/dir/mycidr.txt",
+ "onlyIPType": "ipv6",
+ "removeSuffixesInLine": [";", ","]
+ }
+ },
+ {
+ "type": "text",
+ "action": "add",
+ "args": {
"name": "cn",
"uri": "https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt",
"onlyIPType": "ipv4"