updates
All checks were successful
release-tag / release-image (push) Successful in 3m29s

This commit is contained in:
2025-11-10 21:24:16 +01:00
parent 19143fd8c1
commit 5b48c30a98

30
main.go
View File

@@ -204,14 +204,18 @@ func fetchAndSave(client *http.Client, t target, outDir string) error {
// Import-Logik // Import-Logik
func importBlocklists() error { func importBlocklists() error {
client := &http.Client{Timeout: 60 * time.Second} client := &http.Client{Timeout: 60 * time.Second}
t := target{Name: "Catalog", URL: os.Getenv("FLOD_IMPORT_URL") + "/lists.json"} t := target{Name: "Catalog", URL: os.Getenv("FLOD_IMPORT_URL")}
if err := os.MkdirAll("./lists/", 0o755); err != nil { if err := os.MkdirAll("/lists/", 0o755); err != nil {
fmt.Println("creating output dir", err) fmt.Println("creating output dir", err)
} }
if err := fetchAndSave(client, t, "./lists/"); err != nil { if err := fetchAndSave(client, t, "/lists/"); err != nil {
log.Printf("ERROR %s → %v", t.URL, err) log.Printf("ERROR %s → %v", t.URL, err)
} }
blocklistURLs, _ = ImportListJSON("./lists/lists.json") fileName := filepath.Base(t.URL)
if fileName == "" {
fileName = strings.ReplaceAll(strings.ToLower(strings.ReplaceAll(t.Name, " ", "_")), "..", "")
}
blocklistURLs, _ = ImportListJSON("/lists/" + fileName)
var wg sync.WaitGroup var wg sync.WaitGroup
errCh := make(chan error, len(blocklistURLs)) errCh := make(chan error, len(blocklistURLs))
@@ -658,7 +662,7 @@ func errorhtml(w http.ResponseWriter, r *http.Request) {
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Too Many Requests - Error 429</title> <title>Blocked by the First-Line-Of-Defense-Project</title>
<style> <style>
:root{ :root{
--bg:#f6f7f9;--text:#1f2937;--muted:#6b7280;--card:#ffffff; --bg:#f6f7f9;--text:#1f2937;--muted:#6b7280;--card:#ffffff;
@@ -701,11 +705,11 @@ func errorhtml(w http.ResponseWriter, r *http.Request) {
<body> <body>
<div class="wrap"> <div class="wrap">
<header> <header>
<h1>Too Many Requests - HTTP-ERROR 429</h1> <h1>You have been blocked by the First-Line-Of-Defense-Project</h1>
<span class="pill">ERROR&nbsp;429 <small>(Edge-Proxy denied connection)</small></span> <span class="pill">ERROR&nbsp;403 <small>Forbidden</small></span>
</header> </header>
<p class="lead"> <p class="lead">
Your browser is working, the Edge proxy is reachable but blocking your connection - the Origin server is responding and functional. Your connection attempt to the target server was blocked by the First-Line-Of-Defense-Project. Your IP address is listed on at least one blacklist.
</p> </p>
<section class="grid" aria-label="Diagnostic chain"> <section class="grid" aria-label="Diagnostic chain">
@@ -726,15 +730,15 @@ func errorhtml(w http.ResponseWriter, r *http.Request) {
</article> </article>
<!-- Edge / Proxy --> <!-- Edge / Proxy -->
<article class="node" aria-label="Edge/Proxy Status"> <article class="node" aria-label="FLODP Status">
<div class="icon" aria-hidden="true"> <div class="icon" aria-hidden="true">
<svg width="96" height="64" viewBox="0 0 96 64" xmlns="http://www.w3.org/2000/svg" role="img"> <svg width="96" height="64" viewBox="0 0 96 64" xmlns="http://www.w3.org/2000/svg" role="img">
<path d="M33 44h32a14 14 0 0 0 0-28 18 18 0 0 0-34-5 16 16 0 0 0-4 31z" fill="#e5e7eb" stroke="#d1d5db"/> <path d="M33 44h32a14 14 0 0 0 0-28 18 18 0 0 0-34-5 16 16 0 0 0-4 31z" fill="#e5e7eb" stroke="#d1d5db"/>
</svg> </svg>
<div class="status err" title="Blocked">✕</div> <div class="status err" title="Blocked">✕</div>
</div> </div>
<h3>Edge-Proxy</h3> <h3>FLODP-SERVICE</h3>
<p class="sub">Intermediate</p> <p class="sub">Security-Gateway</p>
<p class="state err">Blocked your request</p> <p class="state err">Blocked your request</p>
</article> </article>
@@ -763,10 +767,10 @@ func errorhtml(w http.ResponseWriter, r *http.Request) {
<details id="details" class="meta"> <details id="details" class="meta">
<summary><strong>Technical details</strong></summary> <summary><strong>Technical details</strong></summary>
<ul> <ul>
<li>Error: <strong>429</strong> - The client (e.g., a browser, bot, script, or API integration) sends more requests in a short period of time than the server or its protection layer (proxy, WAF, rate limiter) allows. To protect itself, the server temporarily rejects further requests.</li> <li>Error: <strong>403</strong> - Your IP address is listed on at least one blacklist. The service's security system has therefore rejected your connection.</li>
<li>Time: <span id="now">-</span></li> <li>Time: <span id="now">-</span></li>
</ul> </ul>
<p>Tips: You have sent too many requests in a short period of time. Please wait a moment and try again.</p> <p>Tips: Check if your system (browser, API, or similar) has a high connection frequency and has been blocked on other systems protected by FLODP.</p>
</details> </details>
<footer> <footer>