improving config

This commit is contained in:
2026-03-02 23:51:50 +01:00
parent 6cfea15b9e
commit caa2bd4897
5 changed files with 70 additions and 1 deletions

35
run_test.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
echo "Starting proxy-to-logbull test with dummy log files..."
echo "====================================================="
# Create dummy log files if they don't exist
if [ ! -f "dummy_access.log" ]; then
echo "Creating dummy access log..."
cat > dummy_access.log << 'EOF'
45.153.34.68 - - [02/Mar/2026:21:22:38 +0000] "GET / HTTP/1.1" 444 0 "-" "Mozilla/5.0"
176.65.134.20 - - [02/Mar/2026:21:30:25 +0000] "PROPFIND / HTTP/1.1" 444 0 "http://89.47.50.242:443/" "-"
176.65.149.233 - - [02/Mar/2026:21:34:35 +0000] "GET / HTTP/1.1" 444 0 "-" "Mozilla/1.0"
20.64.104.237 - - [02/Mar/2026:21:48:03 +0000] "GET /login HTTP/1.1" 444 0 "-" "Mozilla/5.0 zgrab/0.x"
79.124.40.174 - - [02/Mar/2026:21:53:05 +0000] "GET /?XDEBUG_SESSION_START=phpstorm HTTP/1.1" 444 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
EOF
fi
if [ ! -f "dummy_error.log" ]; then
echo "Creating dummy error log..."
cat > dummy_error.log << 'EOF'
2026/03/02 04:11:13 [error] 1083281#1083281: *3381930 connect() failed (113: No route to host) while connecting to upstream, client: 185.71.113.95, server: jellyfin.nussnougate.net, request: "POST /Sessions/Playing/Progress HTTP/1.1", upstream: "http://192.168.100.101:8096/Sessions/Playing/Progress", host: "jellyfin.nussnougate.net"
2026/03/02 04:11:21 [error] 1083281#1083281: *3383437 connect() failed (113: No route to host) while connecting to upstream, client: 185.143.100.163, server: jellyfin.nussnougate.net, request: "GET / HTTP/1.1", upstream: "http://192.168.100.101:8096/", host: "jellyfin.nussnougate.net"
2026/03/02 14:13:56 [error] 1083281#1083281: *3426455 {"ip":"192.253.248.11","server":"jellyfin.nussnougate.net","uri":"/","config":"block","rid":"a3da57ce31e7a5489d0625abe261f6e0","cscore0":"$UWA","score0":8,"zone0":"HEADERS","id0":10000034,"var_name0":"user-agent"}, client: 192.253.248.11, server: jellyfin.nussnougate.net, request: "GET / HTTP/1.1", host: "jellyfin.nussnougate.net", referrer: "http://jellyfin.nussnougate.net//.git/HEAD"
EOF
fi
# Run the service with test configuration for 10 seconds
echo "Running proxy-to-logbull with test configuration for 10 seconds..."
echo "Press Ctrl+C to stop early"
timeout 10s uv run main.py config_test.yaml
echo ""
echo "Test completed! The logs should now be visible in Logbull."
echo "You can check the dummy log files: dummy_access.log and dummy_error.log"