feat: Streamlit ZIP flatten, mitmproxy bot whitelist, Fabricator app
- Add extract_zip_flatten() to Streamlit RPCD for nested ZIP handling - Add bot whitelist to mitmproxy WAF (Facebook, Google, Bing crawlers) - Skip threat detection for whitelisted legitimate crawlers - Track Fabricator app and stats evolution in HISTORY.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a00f4b6b84
commit
adec1144d6
@ -910,3 +910,11 @@ _Last updated: 2026-02-07_
|
||||
- `parseCountries()` now correctly handles countries as array of objects
|
||||
- Data format: `[{country: "US", count: 67}, ...]` vs plain `{US: 67}`
|
||||
- Commit: 58b6dc1d
|
||||
|
||||
22. **Stats Evolution & Fabricator (2026-02-07)**
|
||||
- Silenced CrowdSec kernel log spam (deny_log=0 in bouncer config)
|
||||
- Added metablogizer-json to cron for blog site status updates
|
||||
- Created Widget Fabricator Streamlit app (port 8520): Collectors, Apps, Blogs, Services, Widgets
|
||||
- Added bot whitelist to mitmproxy WAF (Facebook, Google, Bing, etc.) to prevent false positive SSRF alerts
|
||||
- Fixed Streamlit ZIP upload with extract_zip_flatten() for nested root directories
|
||||
- Emancipated yijing-360 and fabricator apps with DNS + SSL
|
||||
|
||||
@ -5,6 +5,30 @@
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
n# Extract ZIP with flatten for single root directories
|
||||
extract_zip_flatten() {
|
||||
local zip_file="$1"
|
||||
local target_dir="$2"
|
||||
local tmpextract="/tmp/streamlit_extract_$$"
|
||||
|
||||
mkdir -p "$tmpextract" "$target_dir"
|
||||
unzip -o "$zip_file" -d "$tmpextract" >/dev/null 2>&1
|
||||
|
||||
local root_items=$(ls -1 "$tmpextract" 2>/dev/null | wc -l)
|
||||
if [ "$root_items" = "1" ]; then
|
||||
local single_dir="$tmpextract/$(ls -1 "$tmpextract" | head -1)"
|
||||
if [ -d "$single_dir" ]; then
|
||||
mv "$single_dir"/* "$target_dir/" 2>/dev/null
|
||||
mv "$single_dir"/.* "$target_dir/" 2>/dev/null
|
||||
else
|
||||
mv "$single_dir" "$target_dir/"
|
||||
fi
|
||||
else
|
||||
mv "$tmpextract"/* "$target_dir/" 2>/dev/null
|
||||
mv "$tmpextract"/.* "$target_dir/" 2>/dev/null
|
||||
fi
|
||||
rm -rf "$tmpextract"
|
||||
}
|
||||
|
||||
CONFIG="streamlit"
|
||||
LXC_NAME="streamlit"
|
||||
@ -616,7 +640,7 @@ upload_finalize() {
|
||||
|
||||
local app_dir="$data_path/apps/$name"
|
||||
mkdir -p "$app_dir"
|
||||
unzip -o "$tmpzip" -d "$app_dir" >/dev/null 2>&1
|
||||
extract_zip_flatten "$tmpzip" "$app_dir"
|
||||
rm -f "$tmpzip"
|
||||
|
||||
local main_py
|
||||
@ -934,7 +958,7 @@ upload_zip() {
|
||||
done
|
||||
else
|
||||
# Extract all
|
||||
unzip -o "$tmpzip" -d "$app_dir" >/dev/null 2>&1
|
||||
extract_zip_flatten "$tmpzip" "$app_dir"
|
||||
fi
|
||||
|
||||
rm -f "$tmpzip"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user