Release 0.1.0
This commit is contained in:
19
compose.yml
19
compose.yml
@@ -1,5 +1,18 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
flodpodmaster:
|
||||||
|
image: git.send.nrw/sendnrw/flod-pod:latest
|
||||||
|
container_name: ipblock-master
|
||||||
|
networks:
|
||||||
|
- flod_nw
|
||||||
|
environment:
|
||||||
|
# Beispiel – mehrere Listen in einer Kategorie „spam“
|
||||||
|
BLOCKLIST_MODE: master
|
||||||
|
REDIS_ADDR: redis:6379
|
||||||
|
HASH_NAME: bl:flodpod
|
||||||
|
MASTER_URL: https://flod-proxy.send.nrw
|
||||||
|
#ports:
|
||||||
|
#- "8080:8080" # <host>:<container>
|
||||||
|
restart: unless-stopped
|
||||||
api:
|
api:
|
||||||
image: git.send.nrw/sendnrw/flod:latest
|
image: git.send.nrw/sendnrw/flod:latest
|
||||||
container_name: ipblock-api
|
container_name: ipblock-api
|
||||||
@@ -15,8 +28,8 @@ services:
|
|||||||
REDIS_ADDR: redis:6379
|
REDIS_ADDR: redis:6379
|
||||||
ROLE: worker
|
ROLE: worker
|
||||||
TTL_HOURS: "720"
|
TTL_HOURS: "720"
|
||||||
ports:
|
#ports:
|
||||||
- "8080:8080" # <host>:<container>
|
#- "8080:8080" # <host>:<container>
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
|
26
main.go
26
main.go
@@ -20,7 +20,7 @@ import (
|
|||||||
// Redis + Context
|
// Redis + Context
|
||||||
var ctx = context.Background()
|
var ctx = context.Background()
|
||||||
var rdb = redis.NewClient(&redis.Options{
|
var rdb = redis.NewClient(&redis.Options{
|
||||||
Addr: "10.10.5.249:6379",
|
Addr: "redis:6379",
|
||||||
})
|
})
|
||||||
|
|
||||||
// URLs der Blocklisten
|
// URLs der Blocklisten
|
||||||
@@ -29,6 +29,27 @@ var blocklistURLs = map[string]string{
|
|||||||
"bitwire": "https://raw.githubusercontent.com/bitwire-it/ipblocklist/refs/heads/main/ip-list.txt",
|
"bitwire": "https://raw.githubusercontent.com/bitwire-it/ipblocklist/refs/heads/main/ip-list.txt",
|
||||||
"RU": "https://ipv64.net/blocklists/countries/ipv64_blocklist_RU.txt",
|
"RU": "https://ipv64.net/blocklists/countries/ipv64_blocklist_RU.txt",
|
||||||
"CN": "https://ipv64.net/blocklists/countries/ipv64_blocklist_CN.txt",
|
"CN": "https://ipv64.net/blocklists/countries/ipv64_blocklist_CN.txt",
|
||||||
|
"blocklist_de_ssh": "https://lists.blocklist.de/lists/ssh.txt",
|
||||||
|
"blocklist_de_mail": "https://lists.blocklist.de/lists/mail.txt",
|
||||||
|
"blocklist_de_apache": "https://lists.blocklist.de/lists/apache.txt",
|
||||||
|
"blocklist_de_imap": "https://lists.blocklist.de/lists/imap.txt",
|
||||||
|
"blocklist_de_ftp": "https://lists.blocklist.de/lists/ftp.txt",
|
||||||
|
"blocklist_de_sip": "https://lists.blocklist.de/lists/sip.txt",
|
||||||
|
"blocklist_de_bots": "https://lists.blocklist.de/lists/bots.txt",
|
||||||
|
"blocklist_de_strongips": "https://lists.blocklist.de/lists/strongips.txt",
|
||||||
|
"blocklist_de_bruteforcelogin": "https://lists.blocklist.de/lists/bruteforcelogin.txt",
|
||||||
|
"firehol_org_botscout_30d": "https://iplists.firehol.org/files/botscout_30d.ipset",
|
||||||
|
"firehol_org_cleantalk_30d": "https://iplists.firehol.org/files/cleantalk_30d.ipset",
|
||||||
|
"firehol_org_cleantalk_new_30d": "https://iplists.firehol.org/files/cleantalk_new_30d.ipset",
|
||||||
|
"firehol_org_abuse_30d": "https://iplists.firehol.org/files/firehol_abusers_30d.netset",
|
||||||
|
"firehol_org_gpf_comics": "https://iplists.firehol.org/files/gpf_comics.ipset",
|
||||||
|
"firehol_org_stopforumspam_365d": "https://iplists.firehol.org/files/stopforumspam_365d.ipset",
|
||||||
|
"firehol_org_tor_exit_30d": "https://iplists.firehol.org/files/tor_exits_30d.ipset",
|
||||||
|
"firehol_org_shield_30d": "https://iplists.firehol.org/files/dshield_30d.netset",
|
||||||
|
"firehol_org_firehol_webserver": "https://iplists.firehol.org/files/firehol_webserver.netset",
|
||||||
|
"firehol_org_php_dictionary_30d": "https://iplists.firehol.org/files/php_dictionary_30d.ipset",
|
||||||
|
"firehol_org_php_harvesters_30d": "https://iplists.firehol.org/files/php_harvesters_30d.ipset",
|
||||||
|
"firehol_org_php_spammers_30d": "https://iplists.firehol.org/files/php_spammers_30d.ipset",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Präfix-Cache
|
// Präfix-Cache
|
||||||
@@ -106,6 +127,7 @@ func importBlocklists() error {
|
|||||||
return fmt.Errorf("Blocklisten-Import teilweise fehlgeschlagen")
|
return fmt.Errorf("Blocklisten-Import teilweise fehlgeschlagen")
|
||||||
}
|
}
|
||||||
fmt.Println("✅ Blocklisten-Import abgeschlossen")
|
fmt.Println("✅ Blocklisten-Import abgeschlossen")
|
||||||
|
blocklistURLs["flodpod"] = "null"
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +172,7 @@ func importCategory(cat, url string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := scanner.Err(); err != nil {
|
if err := scanner.Err(); err != nil {
|
||||||
return fmt.Errorf("Lesefehler: %v", err)
|
return fmt.Errorf("lesefehler: %v", err)
|
||||||
}
|
}
|
||||||
if batchCount > 0 {
|
if batchCount > 0 {
|
||||||
if _, err := pipe.Exec(ctx); err != nil {
|
if _, err := pipe.Exec(ctx); err != nil {
|
||||||
|
Reference in New Issue
Block a user